diff --git a/Cargo.lock b/Cargo.lock index e3a3faa962..f3a477ca62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -610,6 +610,7 @@ dependencies = [ "gekkouga", "hash40 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hid-hdr", + "iceclimber", "ike", "inkling", "jack", @@ -637,7 +638,6 @@ dependencies = [ "miigunner", "miiswordsman", "murabito", - "nana", "ness", "ninput", "once_cell", @@ -653,7 +653,6 @@ dependencies = [ "pit", "pitb", "plizardon", - "popo", "purin", "pzenigame", "rand 0.7.4", @@ -719,6 +718,17 @@ dependencies = [ "skyline-web", ] +[[package]] +name = "iceclimber" +version = "0.1.0" +dependencies = [ + "dynamic", + "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "skyline_smash", + "smash_script", + "smashline", +] + [[package]] name = "ike" version = "0.1.0" @@ -1182,17 +1192,6 @@ dependencies = [ "smashline", ] -[[package]] -name = "nana" -version = "0.1.0" -dependencies = [ - "dynamic", - "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skyline_smash", - "smash_script", - "smashline", -] - [[package]] name = "ness" version = "0.1.0" @@ -1497,17 +1496,6 @@ dependencies = [ "smashline", ] -[[package]] -name = "popo" -version = "0.1.0" -dependencies = [ - "dynamic", - "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skyline_smash", - "smash_script", - "smashline", -] - [[package]] name = "ppv-lite86" version = "0.2.17" diff --git a/Cargo.toml b/Cargo.toml index 9de4803671..273928be20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ gamewatch = { path = "fighters/gamewatch" } ganon = { path = "fighters/ganon" } gaogaen = { path = "fighters/gaogaen" } gekkouga = { path = "fighters/gekkouga" } +iceclimber = { path = "fighters/iceclimber" } ike = { path = "fighters/ike" } inkling = { path = "fighters/inkling" } jack = { path = "fighters/jack" } @@ -67,7 +68,6 @@ miifighter = { path = "fighters/miifighter" } miigunner = { path = "fighters/miigunner" } miiswordsman = { path = "fighters/miiswordsman" } murabito = { path = "fighters/murabito" } -nana = { path = "fighters/nana" } ness = { path = "fighters/ness" } packun = { path = "fighters/packun" } pacman = { path = "fighters/pacman" } @@ -81,7 +81,6 @@ pikmin = { path = "fighters/pikmin" } pit = { path = "fighters/pit" } pitb = { path = "fighters/pitb" } plizardon = { path = "fighters/plizardon" } -popo = { path = "fighters/popo" } purin = { path = "fighters/purin" } pzenigame = { path = "fighters/pzenigame" } reflet = { path = "fighters/reflet" } @@ -143,6 +142,7 @@ gamewatch = { workspace = true, optional = true } ganon = { workspace = true, optional = true } gaogaen = { workspace = true, optional = true } gekkouga = { workspace = true, optional = true } +iceclimber = { workspace = true, optional = true } ike = { workspace = true, optional = true } inkling = { workspace = true, optional = true } jack = { workspace = true, optional = true } @@ -169,7 +169,6 @@ miifighter = { workspace = true, optional = true } miigunner = { workspace = true, optional = true } miiswordsman = { workspace = true, optional = true } murabito = { workspace = true, optional = true } -nana = { workspace = true, optional = true } ness = { workspace = true, optional = true } packun = { workspace = true, optional = true } pacman = { workspace = true, optional = true } @@ -183,7 +182,6 @@ pikmin = { workspace = true, optional = true } pit = { workspace = true, optional = true } pitb = { workspace = true, optional = true } plizardon = { workspace = true, optional = true } -popo = { workspace = true, optional = true } purin = { workspace = true, optional = true } pzenigame = { workspace = true, optional = true } reflet = { workspace = true, optional = true } @@ -253,6 +251,7 @@ default = [ "ganon", "gaogaen", "gekkouga", + "iceclimber", "ike", "inkling", "jack", @@ -279,7 +278,6 @@ default = [ "miigunner", "miiswordsman", "murabito", - "nana", "ness", "packun", "pacman", @@ -293,7 +291,6 @@ default = [ "pit", "pitb", "plizardon", - "popo", "purin", "pzenigame", "reflet", diff --git a/fighters/Cargo.toml b/fighters/Cargo.toml index 8ba10e0af8..f830f987f8 100644 --- a/fighters/Cargo.toml +++ b/fighters/Cargo.toml @@ -28,7 +28,6 @@ lucario = { path = "./lucario", optional = true } zelda = { path = "./zelda", optional = true } kamui = { path = "./kamui", optional = true } wolf = { path = "./wolf", optional = true } -nana = { path = "./nana", optional = true } tantan = { path = "./tantan", optional = true } koopag = { path = "./koopag", optional = true } ridley = { path = "./ridley", optional = true } @@ -94,7 +93,7 @@ bayonetta = { path = "./bayonetta", optional = true } samus = { path = "./samus", optional = true } koopa = { path = "./koopa", optional = true } simon = { path = "./simon", optional = true } -popo = { path = "./popo", optional = true } +iceclimber = { path = "./iceclimber", optional = true } dedede = { path = "./dedede", optional = true } snake = { path = "./snake", optional = true } demon = { path = "./demon", optional = true } @@ -123,7 +122,6 @@ include-lucario = ["lucario"] include-zelda = ["zelda"] include-kamui = ["kamui"] include-wolf = ["wolf"] -include-nana = ["nana"] include-tantan = ["tantan"] include-koopag = ["koopag"] include-ridley = ["ridley"] @@ -189,7 +187,7 @@ include-bayonetta = ["bayonetta"] include-samus = ["samus"] include-koopa = ["koopa"] include-simon = ["simon"] -include-popo = ["popo"] +include-iceclimber = ["iceclimber"] include-dedede = ["dedede"] include-snake = ["snake"] include-demon = ["demon"] diff --git a/fighters/bayonetta/src/acmd/aerials.rs b/fighters/bayonetta/src/acmd/aerials.rs index 88afe8531d..e9681cf544 100644 --- a/fighters/bayonetta/src/acmd/aerials.rs +++ b/fighters/bayonetta/src/acmd/aerials.rs @@ -1,435 +1,433 @@ - use super::*; -unsafe extern "C" fn bayonetta_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.5, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.5, 3.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.5); - FT_MOTION_RATE_RANGE(fighter, 20.5, 23.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 20.5, 23.0, 2.0); frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 40.0, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 48, 102, 0, 35, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 48, 102, 0, 35, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 8.0, 48, 102, 0, 35, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 23.0, 40.0, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 48, 102, 0, 35, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 48, 102, 0, 35, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 8.0, 48, 102, 0, 35, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 40, 0, 70, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 70, 40, 0, 70, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 70, 40, 0, 70, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 40, 0, 70, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 70, 40, 0, 70, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 70, 40, 0, 70, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); //29faf - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); //29faf + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_CHECK_HOLD); } frame(lua_state, 43.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), false); AttackModule::clear_all(boma); //clear ba hitbox } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 70.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 bayonetta_attack_air_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.0, 361, 65, 0, 30, 4.8, 3.0, 0.0, 1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 361, 65, 0, 30, 3.3, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, -6.0, Some(0.0), Some(14.0), Some(-66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, 2.0, Some(0.0), Some(-26.799999), Some(54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); +unsafe extern "C" fn game_attackairnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.0, 361, 65, 0, 30, 4.8, 3.0, 0.0, 1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 361, 65, 0, 30, 3.3, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, -6.0, Some(0.0), Some(14.0), Some(-66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, 2.0, Some(0.0), Some(-26.799999), Some(54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 7, false); AttackModule::clear(boma, 8, false); AttackModule::clear(boma, 9, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, 6.0, Some(0.0), Some(14.0), Some(66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, -13.0, Some(0.0), Some(11.0), Some(-73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, -2.0, Some(0.0), Some(-26.799999), Some(-54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); + if is_excute(agent) { + ATTACK(agent, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, 6.0, Some(0.0), Some(14.0), Some(66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, -13.0, Some(0.0), Some(11.0), Some(-73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, -2.0, Some(0.0), Some(-26.799999), Some(-54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 7, false); AttackModule::clear(boma, 8, false); AttackModule::clear(boma, 9, false); } - } -unsafe extern "C" fn bayonetta_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.5, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 5.5, 2.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 11.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 2.5, 0.0, 9.2, 3.2, Some(0.0), Some(9.2), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 2.5, 0.0, 14.8, 3.2, Some(0.0), Some(14.8), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 3.0, 66, 10, 0, 68, 1.8, 0.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 7.0, 11.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 2.5, 0.0, 9.2, 3.2, Some(0.0), Some(9.2), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 2.5, 0.0, 14.8, 3.2, Some(0.0), Some(14.8), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 3.0, 66, 10, 0, 68, 1.8, 0.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 1); } frame(lua_state, 11.0);//7 - FT_MOTION_RATE_RANGE(fighter, 11.0, 31.0, 19.0); //26 faf - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.0, 31.0, 19.0); //26 faf + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 31.0);//25 - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 36.0); //35 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 9.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 3.5, 0.0, 9.5, 6.0, Some(0.0), Some(9.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 3.5, 0.0, 14.5, 6.0, Some(0.0), Some(14.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 7.0, 9.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 3.5, 0.0, 9.5, 6.0, Some(0.0), Some(9.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 3.5, 0.0, 14.5, 6.0, Some(0.0), Some(14.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 2); } frame(lua_state, 9.0);//10 - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0);//11 - FT_MOTION_RATE_RANGE(fighter, 10.0, 35.0, 15.0); //26 - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); + FT_MOTION_RATE_RANGE(agent, 10.0, 35.0, 15.0); //26 + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 39.0); //35 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_f3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 2.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 10, 3, 10, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 2.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 11.5, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 11.5, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.5); //7 - FT_MOTION_RATE_RANGE(fighter, 11.5, 16.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 3.6, -4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.1, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.6, 6.95, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 11.5, 16.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 3.6, -4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.1, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.6, 6.95, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 0); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 20.0); //15 - FT_MOTION_RATE_RANGE(fighter, 20.0, 45.0, 17.0); //37 + FT_MOTION_RATE_RANGE(agent, 20.0, 45.0, 17.0); //37 frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10, 3, 10, 5, true); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 8.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10, 3, 10, 5, true); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 40, 120, 0, 20, 3.6, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 40, 120, 0, 15, 4.2, 6.8, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 50, 120, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 50, 70, 0, 40, 1.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 40, 120, 0, 20, 3.6, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 40, 120, 0, 15, 4.2, 6.8, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 50, 120, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 50, 70, 0, 40, 1.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 26.0); //15 - FT_MOTION_RATE_RANGE(fighter, 26.0, 45.0, 16.0);//31 + FT_MOTION_RATE_RANGE(agent, 26.0, 45.0, 16.0);//31 frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn bayonetta_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.45); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20, 3, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.45); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20, 3, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); //8 - FT_MOTION_RATE_RANGE(fighter, 10.0, 20.3, 5.55); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 10.0, 20.3, 5.55); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.3);//14 - FT_MOTION_RATE_RANGE(fighter, 20.3, 28.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 20.3, 28.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 28.0);//17 - FT_MOTION_RATE_RANGE(fighter, 28.0, 37.0, 13.0); //28 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 28.0, 37.0, 13.0); //28 + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_CHECK_HOLD); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), false); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 0, 14.6, -0.1, 0, -55, -90, 1.14, true); - LAST_EFFECT_SET_RATE(fighter, 0.84); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 0, 14.6, -0.1, 0, -55, -90, 1.14, true); + LAST_EFFECT_SET_RATE(agent, 0.84); } - frame(fighter.lua_state_agent, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, false, true); + frame(lua_state, 29.0); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, false, true); } } -unsafe extern "C" fn bayonetta_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn bayonetta_attack_air_hi_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhihold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } } -unsafe extern "C" fn bayonetta_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 25.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 25.0, 15.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_KEEP_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 70, 120, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 70, 120, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 7.0, 70, 100, 50, 0, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 9.0, 270, 100, 85, 0, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 9.0, 230, 100, 85, 0, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 7.0, 70, 100, 50, 0, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 9.0, 270, 100, 85, 0, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 9.0, 230, 100, 85, 0, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 33.0); - FT_MOTION_RATE_RANGE(fighter, 33.0, 43.0, 8.0); //48 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 33.0, 43.0, 8.0); //48 + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 3, 0, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 3, 0, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -437,20 +435,22 @@ unsafe extern "C" fn bayonetta_landing_air_lw_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attackairn", bayonetta_attack_air_n_game) - .acmd("game_attackairnhold", bayonetta_attack_air_n_hold_game) - .acmd("game_attackairf", bayonetta_attack_air_f_game) - .acmd("game_attackairf2", bayonetta_attack_air_f2_game) - .acmd("game_attackairf3", bayonetta_attack_air_f3_game) - .acmd("game_attackairb", bayonetta_attack_air_b_game) - .acmd("expression_attackairb", bayonetta_attack_air_b_expression) - .acmd("game_attackairhi", bayonetta_attack_air_hi_game) - .acmd("effect_attackairhi", bayonetta_attack_air_hi_effect) - .acmd("expression_attackairhi", bayonetta_attack_air_hi_expression) - .acmd("game_attackairhihold", bayonetta_attack_air_hi_hold_game) - .acmd("game_attackairlw", bayonetta_attack_air_lw_game) - .acmd("game_landingairlw", bayonetta_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairnhold", game_attackairnhold); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf2", game_attackairf2); + agent.acmd("game_attackairf3", game_attackairf3); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairhihold", game_attackairhihold); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/bayonetta/src/acmd/ground.rs b/fighters/bayonetta/src/acmd/ground.rs index 29affc235d..3583ffd903 100644 --- a/fighters/bayonetta/src/acmd/ground.rs +++ b/fighters/bayonetta/src/acmd/ground.rs @@ -1,112 +1,111 @@ - use super::*; -unsafe extern "C" fn bayonetta_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 3.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); //5 - FT_MOTION_RATE_RANGE(fighter, 9.0, 13.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 13.0, 3.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 52, 10, 0, 35, 3.5, 0.0, 10.0, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 58, 10, 0, 35, 3.5, 0.0, 10.0, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 64, 10, 0, 32, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 52, 10, 0, 35, 3.5, 0.0, 10.0, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 58, 10, 0, 35, 3.5, 0.0, 10.0, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 64, 10, 0, 32, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 13.0); //8 - FT_MOTION_RATE_RANGE(fighter, 13.0, 27.0, 12.0);//20f - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 27.0, 12.0);//20f + if is_excute(agent) { AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn bayonetta_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 52, 10, 0, 40, 3.0, 0.0, 10.8, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 58, 10, 0, 40, 3.2, 0.0, 10.6, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 64, 10, 0, 40, 4.0, 0.0, 10.3, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.0, 0.0, 4.5, 6.0, Some(0.0), Some(4.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 52, 10, 0, 40, 3.0, 0.0, 10.8, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 58, 10, 0, 40, 3.2, 0.0, 10.6, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 64, 10, 0, 40, 4.0, 0.0, 10.3, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.0, 0.0, 4.5, 6.0, Some(0.0), Some(4.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 1.0, false); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 12.0);//10 - FT_MOTION_RATE_RANGE(fighter, 12.0, 27.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 12.0, 27.0, 10.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 27.0);//20f - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 5.0, 57, 101, 0, 57, 4.0, 0.0, 0.0, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 5.0, 57, 101, 0, 57, 4.0, 0.0, 0.0, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -114,152 +113,151 @@ unsafe extern "C" fn bayonetta_attack_13_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_attack_100_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..99 { - frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); - //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); + frame(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); + //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); + } + wait_loop_clear(agent); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + //loc.imp._Unwind_Resume(); } - wait_loop_clear(fighter); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - //loc.imp._Unwind_Resume(); -} } -unsafe extern "C" fn bayonetta_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), true); GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); + WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 90, 100, 30, 0, 3.0, 0.0, 6.0, 23.5, Some(0.0), Some(6.0), Some(8.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 90, 100, 20, 0, 4.5, 0.0, 11.0, 22.5, Some(0.0), Some(11.0), Some(9.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 90, 100, 30, 0, 3.0, 0.0, 6.0, 23.5, Some(0.0), Some(6.0), Some(8.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 90, 100, 20, 0, 4.5, 0.0, 11.0, 22.5, Some(0.0), Some(11.0), Some(9.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 136, 0, 60, 6.5, 0.0, 8.5, 6.8, Some(0.0), Some(8.5), Some(13.8), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 136, 0, 60, 6.5, 0.0, 8.5, 6.8, Some(0.0), Some(8.5), Some(13.8), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); } frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 18/(41-30)); + FT_MOTION_RATE(agent, 18/(41-30)); } -unsafe extern "C" fn bayonetta_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.5, 10.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.5, 10.5); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); } frame(lua_state, 16.5); - FT_MOTION_RATE_RANGE(fighter, 16.5, 27.0, 11.5); + FT_MOTION_RATE_RANGE(agent, 16.5, 27.0, 11.5); frame(lua_state, 17.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 5.0, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 5.0, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 4.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 4.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 28.0); - FT_MOTION_RATE_RANGE(fighter, 28.0, 43.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 28.0, 43.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attack11", bayonetta_attack_11_game) - .acmd("game_attack12", bayonetta_attack_12_game) - .acmd("game_attack13", bayonetta_attack_13_game) - .acmd("game_attack100", bayonetta_attack_100_game) - .acmd("game_attack100end", bayonetta_attack_100_end_game) - .acmd("game_attackdash", bayonetta_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100", game_attack100); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/bayonetta/src/acmd/mod.rs b/fighters/bayonetta/src/acmd/mod.rs index 6312b876a0..d8a22387b4 100644 --- a/fighters/bayonetta/src/acmd/mod.rs +++ b/fighters/bayonetta/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 3351ccce10..26b97e8643 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -1,696 +1,315 @@ 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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_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 !StopModule::is_stop(fighter.module_accessor) { + 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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_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_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_bayonetta_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_bayonetta_step_right_l")); } } -unsafe extern "C" fn 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, 14.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 bayonetta_wickedweavearm_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 38.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_show") as i64); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - wait(lua_state, 40.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_show") as i64); - } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - wait(lua_state, 40.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ModelModule::set_scale(boma, 0.96); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 51.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweaveleg_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_specialn_bullet_move_charge_bullet_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"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 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_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } } -unsafe extern "C" fn bayonetta_specialn_bullet_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); - if is_excute(fighter) { - if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 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_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, 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_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } - AttackModule::enable_safe_pos(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, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } 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, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } 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 escape_n_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapen(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_escapef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn escape_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeb(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn down_left_taunt_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 175.0); - if is_excute(fighter) { - StatusModule::change_status_request(fighter.module_accessor, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 175.0); + if is_excute(agent) { + StatusModule::change_status_request(boma, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } } -unsafe extern "C" fn side_taunt_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 144/(90-1)); +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 144/(90-1)); } -unsafe extern "C" fn up_taunt_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 210/(100-1)); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 210/(100-1)); } -unsafe extern "C" fn sound_appealhi (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("vc_bayonetta_appeal01")); - sv_animcmd::PLAY_DAMAGESTOP(fighter.lua_state_agent); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("vc_bayonetta_appeal01")); + sv_animcmd::PLAY_DAMAGESTOP(lua_state); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h02")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_s")); } frame(lua_state, 38.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("vc_bayonetta_appeal01_02")); - sv_animcmd::PLAY_DAMAGESTOP(fighter.lua_state_agent); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("vc_bayonetta_appeal01_02")); + sv_animcmd::PLAY_DAMAGESTOP(lua_state); } frame(lua_state, 41.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h03")); } frame(lua_state, 45.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_m")); } } -unsafe extern "C" fn sound_appeallwr(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01")); - } - frame(fighter.lua_state_agent, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_02")); - } - frame(fighter.lua_state_agent, 50.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_03")); - } - frame(fighter.lua_state_agent, 67.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_bayonetta_win08")); +unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 21.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01")); } - frame(fighter.lua_state_agent, 90.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_m")); - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_04")); + frame(lua_state, 40.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_02")); } - frame(fighter.lua_state_agent, 106.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_05")); + frame(lua_state, 50.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_03")); } - frame(fighter.lua_state_agent, 127.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_06")); + frame(lua_state, 67.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_bayonetta_win08")); } -} - -unsafe extern "C" fn sound_appeallwl(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win02_02")); + frame(lua_state, 90.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_m")); + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_04")); } - frame(fighter.lua_state_agent, 55.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win02_03")); + frame(lua_state, 106.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_05")); } - frame(fighter.lua_state_agent, 85.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_bayonetta_win09")); + frame(lua_state, 127.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_06")); } } -unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); + frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(boma); + PLAY_SE(agent, Hash40::new("se_bayonetta_win02_02")); } - frame(lua_state, 4.0); + frame(lua_state, 55.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.7, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_catch_only_all(boma, true, false); + PLAY_SE(agent, Hash40::new("se_bayonetta_win02_03")); } - wait(lua_state, 1.0); + frame(lua_state, 85.0); if is_excute(agent) { - AttackModule::clear_all(boma); + PLAY_SE(agent, Hash40::new("vc_bayonetta_win09")); } } -unsafe extern "C" fn just_shield_off_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 1, true); let rate = WorkModule::get_float(boma, *WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_FLOAT_MOTION_RATE); - LAST_EFFECT_SET_RATE(fighter, rate); + LAST_EFFECT_SET_RATE(agent, rate); } - // if fighter.get_int(*WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_INT_COSTUME_KIND) == *FIGHTER_BAYONETTA_COSTUME_KIND_BAYONETTA_1 { - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin_bat"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); + // if agent.get_int(*WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_INT_COSTUME_KIND) == *FIGHTER_BAYONETTA_COSTUME_KIND_BAYONETTA_1 { + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin_bat"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); // } // } else { - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin_bat2"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin_bat2"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); // } // } - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("bayonetta_batwithin_change"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("bayonetta_batwithin_change"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn just_shield_off_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_batwithin02")); +unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_batwithin02")); let rng = app::sv_math::rand(hash40("fighter"), 6) as i32; if rng >= 2 { match rng { - 2 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l02")), - 3 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l03")), - 4 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l04")), - _ => PLAY_SE(fighter, Hash40::new("vc_bayonetta_win09")), + 2 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l02")), + 3 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l03")), + 4 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l04")), + _ => PLAY_SE(agent, Hash40::new("vc_bayonetta_win09")), } } } } -pub fn install() { - smashline::Agent::new("bayonetta") - .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("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("game_escapen", escape_n_game) - .acmd("game_escapef", escape_f_game) - .acmd("game_escapeb", escape_b_game) - .acmd("game_appeallwl", down_left_taunt_game) - .acmd("game_appealsr", side_taunt_game) - .acmd("game_appealsl", side_taunt_game) - .acmd("game_appealhir", up_taunt_game) - .acmd("game_appealhil", up_taunt_game) - .acmd("sound_appealhir", sound_appealhi) - .acmd("sound_appealhil", sound_appealhi) - .acmd("sound_appeallwr", sound_appeallwr) - .acmd("sound_appeallwl", sound_appeallwl) - .acmd("game_catchattack", game_catchattack) - .acmd("effect_justshieldoff", just_shield_off_effect) - .acmd("sound_justshieldoff", just_shield_off_sound) - .install(); - smashline::Agent::new("bayonetta_wickedweavearm") - .acmd("game_attacks4", bayonetta_wickedweavearm_attack_s4_game) - .acmd("game_attacks4lw", bayonetta_wickedweavearm_attack_s4_lw_game) - .acmd("game_attacks4hi",bayonetta_wickedweavearm_attack_s4_hi_game) - .acmd("game_attackhi4", bayonetta_wickedweavearm_attack_hi4_game) - .install(); - smashline::Agent::new("bayonetta_wickedweaveleg") - .acmd("game_attacklw4", bayonetta_wickedweaveleg_attack_lw4_game) - .install(); - smashline::Agent::new("bayonetta_specialn_bullet") - .acmd("game_movechargebullet", bayonetta_specialn_bullet_move_charge_bullet_game) - .acmd("game_move", bayonetta_specialn_bullet_move_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + 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("game_escapen", game_escapen); + agent.acmd("game_escapef", game_escapef); + agent.acmd("game_escapeb", game_escapeb); + + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("game_appealsl", game_appealsr); + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhir); + agent.acmd("sound_appealhir", sound_appealhil); + agent.acmd("sound_appealhil", sound_appealhil); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("sound_appeallwl", sound_appeallwl); + + + agent.acmd("effect_justshieldoff", effect_justshieldoff); + agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/bayonetta/src/acmd/smashes.rs b/fighters/bayonetta/src/acmd/smashes.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/bayonetta/src/acmd/smashes.rs +++ b/fighters/bayonetta/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index f203022e8f..9898a3bfb3 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -1,508 +1,512 @@ - use super::*; -unsafe extern "C" fn bayonetta_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstarth(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 30.0, 15.0);//van + 1 + FT_MOTION_RATE_RANGE(agent, 1.0, 30.0, 15.0);//van + 1 } -unsafe extern "C" fn bayonetta_special_n_charge_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnchargef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.65); //van + FT_MOTION_RATE(agent, 1.65); //van } -unsafe extern "C" fn bayonetta_special_n_end_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnendh(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 58.0, 25.0);//32 > 26 + FT_MOTION_RATE_RANGE(agent, 1.0, 58.0, 25.0);//32 > 26 } -unsafe extern "C" fn bayonetta_special_n_end_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnendf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 48.0, 25.0);//32 > 26 + FT_MOTION_RATE_RANGE(agent, 1.0, 48.0, 25.0);//32 > 26 } -unsafe extern "C" fn bayonetta_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); GroundModule::set_correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 42, 8, 0, 95, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 42, 8, 0, 95, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 47, 8, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 47, 8, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.5, 50, 8, 0, 79, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.5, 50, 8, 0, 79, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); //57faf - FT_MOTION_RATE_RANGE(fighter, 40.0, 62.0, 17.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 40.0, 62.0, 17.0); + if is_excute(agent) { AttackModule::clear_all(boma); //fighter.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); //fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); } } -unsafe extern "C" fn bayonetta_special_s_edge_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsedge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); + agent.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); //fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 24.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_s_edge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsedge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_heelslide_burst"), Hash40::new("kneer"), 9.5, 0, 0, 0, 90, 0, 1.1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_heelslide_burst"), Hash40::new("kneer"), 9.5, 0, 0, 0, 90, 0, 1.1, true); EffectModule::enable_sync_init_pos_last(boma); - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_PARTICLE_SET_COLOR(fighter, 1.5, 0.095, 0.163); } - else {LAST_PARTICLE_SET_COLOR(fighter, 0.048, 0.452, 1); } + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_PARTICLE_SET_COLOR(agent, 1.5, 0.095, 0.163); } + else {LAST_PARTICLE_SET_COLOR(agent, 0.048, 0.452, 1); } } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("bayonetta_heelslide_burst"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("bayonetta_heelslide_burst"), false, false); } } -unsafe extern "C" fn bayonetta_special_s_edge_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsedge(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn bayonetta_special_s_edge_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialsedge(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn bayonetta_special_s_hold_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsholdend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.5, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 2, 0, 0, 0, false); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 70, 8, 0, 50, 4.0, 0.5, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 1.0, 34.5, 11.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 2, 0, 0, 0, false); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 70, 8, 0, 50, 4.0, 0.5, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); - AttackModule::clear_all(fighter.module_accessor); + AttackModule::clear_all(boma); //fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_END_SPECIAL_S); } frame(lua_state, 34.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 37.5); - FT_MOTION_RATE_RANGE(fighter, 37.5, 40.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 5.0, 98, 66, 0, 60, 4.8, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 98, 66, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("waist"), 5.0, 90, 66, 0, 60, 3.9, 0.0, -0.9, -1.1, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 37.5, 40.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 5.0, 98, 66, 0, 60, 4.8, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 98, 66, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("waist"), 5.0, 90, 66, 0, 60, 3.9, 0.0, -0.9, -1.1, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 44.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 44.0, 2.0); frame(lua_state, 44.0); - FT_MOTION_RATE_RANGE(fighter, 44.0, 61.0, 15.0); //35 faf kick - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 44.0, 61.0, 15.0); //35 faf kick + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn bayonetta_special_air_s_u_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 6.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 6.5); + if is_excute(agent) { JostleModule::set_status(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 5, 0, 20, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 5); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 5, 0, 20, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 5); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 65, 27, 0, 72, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 65, 27, 0, 72, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 70, 27, 0, 66, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 70, 27, 0, 66, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 47, 100, 70, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 47, 100, 70, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.7, 47, 100, 65, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.7, 47, 100, 65, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.7, 51, 100, 50, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.7, 51, 100, 50, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } JostleModule::set_status(boma, true); AttackModule::clear_all(boma); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 32.0); //28 - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { //filters out bullet hits - CancelModule::enable_cancel(fighter.module_accessor); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { //filters out bullet hits + CancelModule::enable_cancel(boma); } } frame(lua_state, 38.0); //32 - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_air_s_u_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 13.0, 12.1, -21.1, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.15); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 13.8, 13.5, -21, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.15); - } - frame(fighter.lua_state_agent, 26.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("bayonetta_afterburner_line2"), -1); +unsafe extern "C" fn effect_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 13.0, 12.1, -21.1, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.15); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 13.8, 13.5, -21, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.15); + } + frame(lua_state, 26.0); + if is_excute(agent) { + EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, -1); + EFFECT_DETACH_KIND(agent, Hash40::new("bayonetta_afterburner_line2"), -1); } } -unsafe extern "C" fn bayonetta_special_air_s_u_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn bayonetta_shootinglegl_atk_on_special_air_s_u_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if !fighter.is_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_DISABLE_ROOT_ATTACK) { - ATTACK(fighter, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_00 as u64, 0, Hash40::new("top"), 0.5, 340, 100, 0, 10, 3.5, 0.0, 4.5, -0.5, Some(0.0), Some(4.5), Some(3.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_shootinglegl_atkon_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !agent.is_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_DISABLE_ROOT_ATTACK) { + ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_00 as u64, 0, Hash40::new("top"), 0.5, 340, 100, 0, 10, 3.5, 0.0, 4.5, -0.5, Some(0.0), Some(4.5), Some(3.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); } - ATTACK(fighter, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01 as u64, 0, Hash40::new("top"), 0.5, 340, 0, 0, 0, 2.5, 0.0, 2.5, 3.0, Some(0.0), Some(-18.0), Some(59.4), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01, 6, 4.05); + ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01 as u64, 0, Hash40::new("top"), 0.5, 340, 0, 0, 0, 2.5, 0.0, 2.5, 3.0, Some(0.0), Some(-18.0), Some(59.4), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01, 6, 4.05); } } -unsafe extern "C" fn bayonetta_special_air_s_d_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsd(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) { JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.5, 86, 35, 0, 95, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.5, 86, 35, 0, 95, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.5, 86, 35, 0, 95, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.5, 86, 35, 0, 95, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear_all(boma); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_LANDING_FALL_SPECIAL); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_LANDING_FALL_SPECIAL); VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_special_air_s_d_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 0, 7, 45, -6, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.85); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 0, 7, 45, -5, 0, 1.1, true); +unsafe extern "C" fn effect_specialairsd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 0, 7, 45, -6, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.85); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 0, 7, 45, -5, 0, 1.1, true); } } -unsafe extern "C" fn bayonetta_special_air_s_d_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairsd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn bayonetta_special_air_s_d_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsdlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } } -unsafe extern "C" fn bayonetta_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.0, 0.0, 4.5, 0.0, Some(0.0), Some(12.5), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.5, 0.0, 5.5, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.0, 0.0, 4.5, 0.0, Some(0.0), Some(12.5), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.5, 0.0, 5.5, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 0.5, y: 33.0}, 11, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: -0.3, y: 33.0}, 11, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 4.3, 0.0, 18.2, 0.5, Some(0.0), Some(20.4), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 2.6, 0.0, 16.0, 0.5, Some(0.0), Some(23.7), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 4.3, 0.0, 18.2, 0.5, Some(0.0), Some(20.4), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 2.6, 0.0, 16.0, 0.5, Some(0.0), Some(23.7), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("head"), &Vector2f{x: 0.0, y: 15.5}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("head"), &Vector2f{x: 0.0, y: 14.5}, 10, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 22, 35, 0, 40, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 22, 35, 0, 40, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 42, 55, 0, 45, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 42, 55, 0, 45, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), true); - if !VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), true); + if !VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { - CancelModule::enable_cancel(fighter.module_accessor); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { + CancelModule::enable_cancel(boma); } } frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_hi_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.86, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 0.82, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.86, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 0.82, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.7); } } - frame(fighter.lua_state_agent, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); - EffectModule::kill_kind(fighter.module_accessor, Hash40::new("bayonetta_afterburner_line2"), false, true); + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); + EffectModule::kill_kind(boma, Hash40::new("bayonetta_afterburner_line2"), false, true); } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, false, true); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, false, true); + frame(lua_state, 24.0); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, false, true); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, false, true); } } -unsafe extern "C" fn bayonetta_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_bayonetta_rnd_attack01")); - PLAY_SE(fighter, Hash40::new("se_bayonetta_special_h01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_bayonetta_rnd_attack01")); + PLAY_SE(agent, Hash40::new("se_bayonetta_special_h01")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_attackair_f02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_attackair_f02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_special_h02")); } } -unsafe extern "C" fn bayonetta_special_lw (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 1.3); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 1.3); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 4.0); //5 - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 4.0); //5 + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); - SEARCH(fighter, 0, 0, Hash40::new("top"), 11.5, -2.0, 10.0, 0.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); + SEARCH(agent, 0, 0, Hash40::new("top"), 11.5, -2.0, 10.0, 0.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); //9 - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + FT_MOTION_RATE(agent, 1.0); //9 + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 31.0, 7.0); //15 - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + FT_MOTION_RATE_RANGE(agent, 21.0, 31.0, 7.0); //15 + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 31.0);//22 - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 28.0); - } else { FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 23.0); } - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 28.0); + } else { FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 23.0); } + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } frame(lua_state, 44.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); } } //faf 50/45 -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_specialnstarth", bayonetta_special_n_start_game) - .acmd("game_specialnstartf", bayonetta_special_n_start_game) - .acmd("game_specialairnstarth", bayonetta_special_n_start_game) - .acmd("game_specialairnstartf", bayonetta_special_n_start_game) - .acmd("game_specialnchargef", bayonetta_special_n_charge_game) - .acmd("game_specialnchargeh", bayonetta_special_n_charge_game) - .acmd("game_specialairnchargef", bayonetta_special_n_charge_game) - .acmd("game_specialairnchargeh", bayonetta_special_n_charge_game) - .acmd("game_specialnendh", bayonetta_special_n_end_h_game) - .acmd("game_specialnendf", bayonetta_special_n_end_f_game) - .acmd("game_specialairnendh", bayonetta_special_n_end_h_game) - .acmd("game_specialairnendf", bayonetta_special_n_end_f_game) - .acmd("game_specials", bayonetta_special_s_game) - .acmd("game_specialsedge", bayonetta_special_s_edge_game) - .acmd("effect_specialsedge", bayonetta_special_s_edge_effect) - .acmd("sound_specialsedge", bayonetta_special_s_edge_sound) - .acmd("expression_specialsedge", bayonetta_special_s_edge_expression) - .acmd("game_specialsholdend", bayonetta_special_s_hold_end_game) - .acmd("game_specialairsu", bayonetta_special_air_s_u_game) - .acmd("effect_specialairsu", bayonetta_special_air_s_u_effect) - .acmd("expression_specialairsu", bayonetta_special_air_s_u_expression) - .acmd("game_shootinglegl_atkon_specialairsu", bayonetta_shootinglegl_atk_on_special_air_s_u_game) - .acmd("game_specialairsd", bayonetta_special_air_s_d_game) - .acmd("effect_specialairsd", bayonetta_special_air_s_d_effect) - .acmd("expression_specialairsd", bayonetta_special_air_s_d_expression) - .acmd("game_specialairsdlanding", bayonetta_special_air_s_d_landing_game) - .acmd("game_specialairhi", bayonetta_special_hi_game) - .acmd("game_specialhi", bayonetta_special_hi_game) - .acmd("effect_specialairhi", bayonetta_special_hi_effect) - .acmd("effect_specialhi", bayonetta_special_hi_effect) - .acmd("sound_specialhi", bayonetta_special_hi_sound) - .acmd("sound_specialairhi", bayonetta_special_hi_sound) - .acmd("game_speciallw", bayonetta_special_lw) - .acmd("game_specialairlw", bayonetta_special_lw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstarth", game_specialnstarth); + agent.acmd("game_specialnstartf", game_specialnstarth); + agent.acmd("game_specialairnstarth", game_specialnstarth); + agent.acmd("game_specialairnstartf", game_specialnstarth); + agent.acmd("game_specialnchargef", game_specialnchargef); + agent.acmd("game_specialnchargeh", game_specialnchargef); + agent.acmd("game_specialairnchargef", game_specialnchargef); + agent.acmd("game_specialairnchargeh", game_specialnchargef); + agent.acmd("game_specialnendh", game_specialnendh); + agent.acmd("game_specialnendf", game_specialnendf); + agent.acmd("game_specialairnendh", game_specialnendh); + agent.acmd("game_specialairnendf", game_specialnendf); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsedge", game_specialsedge); + agent.acmd("effect_specialsedge", effect_specialsedge); + agent.acmd("sound_specialsedge", sound_specialsedge); + agent.acmd("expression_specialsedge", expression_specialsedge); + agent.acmd("game_specialsholdend", game_specialsholdend); + agent.acmd("game_specialairsu", game_specialairsu); + agent.acmd("effect_specialairsu", effect_specialairsu); + agent.acmd("expression_specialairsu", expression_specialairsu); + agent.acmd("game_shootinglegl_atkon_specialairsu", game_shootinglegl_atkon_specialairsu); + agent.acmd("game_specialairsd", game_specialairsd); + agent.acmd("effect_specialairsd", effect_specialairsd); + agent.acmd("expression_specialairsd", expression_specialairsd); + agent.acmd("game_specialairsdlanding", game_specialairsdlanding); + + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("effect_specialhi", effect_specialairhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("sound_specialairhi", sound_specialhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/bayonetta/src/acmd/throws.rs b/fighters/bayonetta/src/acmd/throws.rs index 18bdd63aef..eaf3e9bce5 100644 --- a/fighters/bayonetta/src/acmd/throws.rs +++ b/fighters/bayonetta/src/acmd/throws.rs @@ -1,46 +1,46 @@ use super::*; -unsafe extern "C" fn bayonetta_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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); + if is_excute(agent) { + CATCH(agent, 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); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { 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); + 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(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -60,90 +60,118 @@ unsafe extern "C" fn bayonetta_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 165, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.7, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 165, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 55, 160, 0, 30, 6.0, 0.0, 10.0, 5.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 55, 160, 0, 30, 6.0, 0.0, 10.0, 5.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 14, 7); + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 50.0, 28.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 50.0, 28.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.5, 85, 78, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.5, 85, 78, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 18); + CHECK_FINISH_CAMERA(agent, 8, 18); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 81, 170, 0, 26, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 81, 170, 0, 26, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 68, 140, 0, 60, 6.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 68, 140, 0, 60, 6.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 0); + CHECK_FINISH_CAMERA(agent, 15, 0); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 41.0, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 21.0, 41.0, 16.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -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) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchattack", game_catchattack); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/bayonetta/src/acmd/tilts.rs b/fighters/bayonetta/src/acmd/tilts.rs index d1c0ca4f5f..1811184807 100644 --- a/fighters/bayonetta/src/acmd/tilts.rs +++ b/fighters/bayonetta/src/acmd/tilts.rs @@ -1,146 +1,145 @@ - use super::*; -unsafe extern "C" fn bayonetta_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 22.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 22.0, 4.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 62, 15, 0, 55, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 50, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 50, 4.0, 5.5, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0, 52, 15, 0, 45, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 35, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 35, 4.0, 4.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 62, 15, 0, 55, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 50, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 50, 4.0, 5.5, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0, 52, 15, 0, 45, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 35, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 35, 4.0, 4.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 46.0, 16.0); //25 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 26.0, 46.0, 16.0); //25 + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 6.0); AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } } -unsafe extern "C" fn bayonetta_attack_s3_s_expression(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_attacks3(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); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 45.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn bayonetta_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.75, 9.0); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.75, 9.0); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 16.75); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.75); - FT_MOTION_RATE_RANGE(fighter, 18.75, 20.5, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 62, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 4.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 18.75, 20.5, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 62, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 4.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.5); - FT_MOTION_RATE_RANGE(fighter, 20.5, 47.0, 14.0); //28faf - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.5, 47.0, 14.0); //28faf + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -unsafe extern "C" fn bayonetta_attack_s3_s2_expression(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_L); +unsafe extern "C" fn expression_attacks32(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_L); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn bayonetta_attack_s3_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks33(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 9.0); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 9.0); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 21.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 21.5, 1.0); frame(lua_state, 21.5); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.0); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 5.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 5.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 25.0); - FT_MOTION_RATE_RANGE(fighter, 25.0, 53.0, 22.0); //38 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 25.0, 53.0, 22.0); //38 + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -148,155 +147,153 @@ unsafe extern "C" fn bayonetta_attack_s3_s3_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 6.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 110, 100, 100, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 123, 100, 110, 0, 3.2, 0.9, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 128, 100, 128, 0, 3.8, 3.85, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 110, 100, 100, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 123, 100, 110, 0, 3.2, 0.9, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 128, 100, 128, 0, 3.8, 3.85, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 108, 27, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 128, 27, 0, 65, 3.2, 1.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 138, 27, 0, 75, 3.8, 4.6, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 108, 27, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 128, 27, 0, 65, 3.2, 1.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 138, 27, 0, 75, 3.8, 4.6, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.0, 94, 64, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.4, 6.3, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.0, 94, 64, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.4, 6.3, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.4); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.8, 6.7, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.8, 6.7, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 25.0, 8.0); //30 + FT_MOTION_RATE_RANGE(agent, 20.0, 25.0, 8.0); //30 frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let facing = PostureModule::lr(boma); frame(lua_state, 6.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_attack_arc4_red"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } - else {EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_attack_arc4_blue"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {EFFECT_FOLLOW(agent, Hash40::new("bayonetta_attack_arc4_red"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } + else {EFFECT_FOLLOW(agent, Hash40::new("bayonetta_attack_arc4_blue"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("bayonetta_butterfly_walk"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("bayonetta_butterfly_walk"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 26, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 26, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_beretta_rotation"), Hash40::new("haver"), 0, 0, 0, -10, -60, -10, 1, true); - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_EFFECT_SET_COLOR(fighter, 1, 0.118, 0.118); } - else {LAST_EFFECT_SET_COLOR(fighter, 0.059, 0.38, 1); } + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("bayonetta_beretta_rotation"), Hash40::new("haver"), 0, 0, 0, -10, -60, -10, 1, true); + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_EFFECT_SET_COLOR(agent, 1, 0.118, 0.118); } + else {LAST_EFFECT_SET_COLOR(agent, 0.059, 0.38, 1); } } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("bayonetta_beretta_rotation"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("bayonetta_beretta_rotation"), true, true); } } -unsafe extern "C" fn bayonetta_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 15, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, false, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, false, 10); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 15, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, false, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, false, 10); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.5); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0);//26faf - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 85, 63, 0, 71, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0);//26faf + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 85, 63, 0, 71, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -unsafe extern "C" fn bayonetta_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 5.7, 3.55, 1.5, 2.4, 3, 2, 1.29, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 5.7, 3.55, 1.5, 2.4, 3, 2, 1.29, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 5.7, 0, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 5.7, 0, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn bayonetta_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 3, true); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attacks3", bayonetta_attack_s3_s_game) - .acmd("expression_attacks3", bayonetta_attack_s3_s_expression) - .acmd("game_attacks32", bayonetta_attack_s3_s2_game) - .acmd("expression_attacks32", bayonetta_attack_s3_s2_expression) - .acmd("game_attacks33", bayonetta_attack_s3_s3_game) - .acmd("game_attackhi3", bayonetta_attack_hi3_game) - .acmd("effect_attackhi3", bayonetta_attack_hi3_effect) - .acmd("game_attacklw3", bayonetta_attack_lw3_game) - .acmd("effect_attacklw3", bayonetta_attack_lw3_effect) - .acmd("expression_attacklw3", bayonetta_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks32", game_attacks32); + agent.acmd("expression_attacks32", expression_attacks32); + agent.acmd("game_attacks33", game_attacks33); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/bayonetta/src/lib.rs b/fighters/bayonetta/src/lib.rs index 8e2ddcc726..3c1721d4e3 100644 --- a/fighters/bayonetta/src/lib.rs +++ b/fighters/bayonetta/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod specialn_bullet; +mod wickedweavearm; +mod wickedweaveleg; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("bayonetta"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + specialn_bullet::install(); + wickedweavearm::install(); + wickedweaveleg::install(); } diff --git a/fighters/bayonetta/src/opff.rs b/fighters/bayonetta/src/opff.rs index baababa933..4af915b34b 100644 --- a/fighters/bayonetta/src/opff.rs +++ b/fighters/bayonetta/src/opff.rs @@ -146,14 +146,13 @@ pub unsafe extern "C" fn bayonetta_frame_wrapper(fighter: &mut L2CFighterCommon) common::opff::fighter_common_opff(fighter); bayonetta_frame(fighter); } + pub unsafe fn bayonetta_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.frame); } } -pub fn install() { - smashline::Agent::new("bayonetta") - .on_line(Main, bayonetta_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, bayonetta_frame_wrapper); } \ No newline at end of file diff --git a/fighters/bayonetta/src/specialn_bullet/acmd.rs b/fighters/bayonetta/src/specialn_bullet/acmd.rs new file mode 100644 index 0000000000..c38bebee15 --- /dev/null +++ b/fighters/bayonetta/src/specialn_bullet/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_movechargebullet(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 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_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); + if is_excute(agent) { + if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 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_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, 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_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movechargebullet", game_movechargebullet); + agent.acmd("game_move", game_move); +} diff --git a/fighters/bayonetta/src/specialn_bullet/mod.rs b/fighters/bayonetta/src/specialn_bullet/mod.rs new file mode 100644 index 0000000000..2ae6017d19 --- /dev/null +++ b/fighters/bayonetta/src/specialn_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta_specialn_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index 7e0a54cad5..a0ac4943e6 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; - +// FIGHTER_STATUS_KIND_ATTACK -// FIGHTER_STATUS_KIND_ATTACK // - -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); if !StopModule::is_stop(fighter.module_accessor) { fighter.check_attack_mtrans(); @@ -15,8 +12,6 @@ unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); } \ No newline at end of file diff --git a/fighters/bayonetta/src/status/attackair.rs b/fighters/bayonetta/src/status/attackair.rs index 5550ebf1f3..ebf61443a2 100644 --- a/fighters/bayonetta/src/status/attackair.rs +++ b/fighters/bayonetta/src/status/attackair.rs @@ -1,16 +1,13 @@ use super::*; -use globals::*; - - -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) } -// FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F // +// FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F unsafe extern "C" fn attack_air_f_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); @@ -67,13 +64,8 @@ unsafe extern "C" fn fair_motion(fighter: &mut L2CFighterCommon) -> L2CValue { false.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F, - attack_air_f_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F,attack_air_f_main); } diff --git a/fighters/bayonetta/src/status/batwithin.rs b/fighters/bayonetta/src/status/batwithin.rs index 2303da122a..d4b599b238 100644 --- a/fighters/bayonetta/src/status/batwithin.rs +++ b/fighters/bayonetta/src/status/batwithin.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN // +// FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN unsafe extern "C" fn batwithin_end(fighter: &mut L2CFighterCommon) -> L2CValue { let batwithin_status_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_BAYONETTA_STATUS_WORK_ID_BATWITHIN_INT_STATUS_KIND); @@ -24,8 +21,6 @@ unsafe extern "C" fn batwithin_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN, batwithin_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN, batwithin_end); } diff --git a/fighters/bayonetta/src/status/escape.rs b/fighters/bayonetta/src/status/escape.rs index c7b7955ddb..4e5f1fe089 100644 --- a/fighters/bayonetta/src/status/escape.rs +++ b/fighters/bayonetta/src/status/escape.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_STATUS_KIND_ESCAPE_F // +// FIGHTER_STATUS_KIND_ESCAPE_F unsafe extern "C" fn escape_f_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] != FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN { @@ -12,7 +9,7 @@ unsafe extern "C" fn escape_f_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -// FIGHTER_STATUS_KIND_ESCAPE_B // +// FIGHTER_STATUS_KIND_ESCAPE_B unsafe extern "C" fn escape_b_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] != FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN { @@ -21,9 +18,7 @@ unsafe extern "C" fn escape_b_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_F, escape_f_end) - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_B, escape_b_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_F, escape_f_end); + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_B, escape_b_end); } diff --git a/fighters/bayonetta/src/status/jumpaerial.rs b/fighters/bayonetta/src/status/jumpaerial.rs index fc1f766d7d..7620239c85 100644 --- a/fighters/bayonetta/src/status/jumpaerial.rs +++ b/fighters/bayonetta/src/status/jumpaerial.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; - +// FIGHTER_STATUS_KIND_JUMP_AERIAL -// FIGHTER_STATUS_KIND_JUMP_AERIAL // - -unsafe extern "C" fn jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_JumpAerial(); let frame = fighter.global_table[CURRENT_FRAME].get_i32() as f32; if frame <= fighter.get_param_float("param_special_hi", "jump_count_reset_frame") { @@ -21,8 +18,6 @@ unsafe extern "C" fn jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_end); } diff --git a/fighters/bayonetta/src/status/mod.rs b/fighters/bayonetta/src/status/mod.rs index a22a708e79..772baae544 100644 --- a/fighters/bayonetta/src/status/mod.rs +++ b/fighters/bayonetta/src/status/mod.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; mod attack; mod batwithin; @@ -9,13 +10,13 @@ mod specialn; mod specials; mod jumpaerial; -pub fn install() { - attack::install(); - batwithin::install(); - escape::install(); - attackair::install(); - specialairs::install(); - specialn::install(); - specials::install(); - jumpaerial::install(); +pub fn install(agent: &mut Agent) { + attack::install(agent); + batwithin::install(agent); + escape::install(agent); + attackair::install(agent); + specialairs::install(agent); + specialn::install(agent); + specials::install(agent); + jumpaerial::install(agent); } \ No newline at end of file diff --git a/fighters/bayonetta/src/status/specialairs.rs b/fighters/bayonetta/src/status/specialairs.rs index a79f2f4ac7..5bd252b648 100644 --- a/fighters/bayonetta/src/status/specialairs.rs +++ b/fighters/bayonetta/src/status/specialairs.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; - +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D // - -unsafe extern "C" fn bayonetta_specialairs_d_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_d_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_BAYONETTA_SPECIAL_AIR_S); if fighter.is_prev_status(*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U) { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_d"), 6.0, 1.0, false, 0.0, false, false); @@ -15,10 +12,10 @@ unsafe extern "C" fn bayonetta_specialairs_d_main(fighter: &mut L2CFighterCommon fighter.change_status(FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_HIT.into(), false.into()); } } - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_air_s_d_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_air_s_d_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_air_s_d_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_d_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if (CancelModule::is_enable_cancel(fighter.module_accessor) && fighter.sub_air_check_fall_common().get_bool()) || fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); @@ -40,17 +37,17 @@ unsafe extern "C" fn bayonetta_special_air_s_d_main_loop(fighter: &mut L2CFighte 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U -unsafe extern "C" fn bayonetta_specialairs_u_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_u_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_u"), 0.0, 1.0, false, 0.0, false, false); fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_U_FLAG_SITUATION_KEEP); fighter.set_situation_keep(L2CValue::I32(*SITUATION_KIND_AIR), 1.into()); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_air_s_u_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_air_s_u_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_air_s_u_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_u_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let frame = fighter.global_table[CURRENT_FRAME].get_i32(); if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_U_FLAG_SITUATION_KEEP) { if fighter.get_param_int("param_special_s", "ab_u_disable_landing_frame") <= frame { @@ -240,17 +237,8 @@ unsafe fn joint_rotator(fighter: &mut L2CFighterCommon, frame: f32, joint: Hash4 } } -pub fn install() { - smashline::Agent::new("bayonetta") - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, - bayonetta_specialairs_d_main, - ) - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U, - bayonetta_specialairs_u_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, special_air_s_d_main); + + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U, special_air_s_u_main); } diff --git a/fighters/bayonetta/src/status/specialn.rs b/fighters/bayonetta/src/status/specialn.rs index 1e6bee9937..8560032456 100644 --- a/fighters/bayonetta/src/status/specialn.rs +++ b/fighters/bayonetta/src/status/specialn.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_STATUS_KIND_SPECIAL_N // +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { @@ -30,7 +27,7 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE unsafe extern "C" fn special_n_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); @@ -79,7 +76,7 @@ unsafe extern "C" fn special_n_charge_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -// statuses::bayonetta::SPECIAL_N_CANCEL // +// statuses::bayonetta::SPECIAL_N_CANCEL unsafe extern "C" fn special_n_cancel_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -223,15 +220,14 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -pub fn install() { - smashline::Agent::new("bayonetta") - //.on_start(bayonetta_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init) - .status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Pre, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + + agent.status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init); + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + + agent.status(Pre, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_end); } diff --git a/fighters/bayonetta/src/status/specials.rs b/fighters/bayonetta/src/status/specials.rs index ce8770e11e..1fab50899a 100644 --- a/fighters/bayonetta/src/status/specials.rs +++ b/fighters/bayonetta/src/status/specials.rs @@ -1,27 +1,26 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -unsafe extern "C" fn bayonetta_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), false); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_HIT_BEFORE_GUARD); smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) } -unsafe extern "C" fn bayonetta_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } let frame = fighter.global_table[CURRENT_FRAME].get_i32() + 1; //0 index or whatev if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { //gr checks - bayonetta_special_s_slow_hit(fighter); + special_s_slow_hit(fighter); if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) && !fighter.is_in_hitlag() { if fighter.is_cat_flag(Cat1::SpecialAny | Cat1::AttackN) && frame >= 20 && frame <= 35 { GroundModule::set_correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); @@ -50,9 +49,9 @@ unsafe extern "C" fn bayonetta_special_s_main_loop(fighter: &mut L2CFighterCommo 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_edge // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_EDGE -unsafe extern "C" fn bayonetta_special_s_edge_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), @@ -80,17 +79,17 @@ unsafe extern "C" fn bayonetta_special_s_edge_pre(fighter: &mut L2CFighterCommon 0.into() } -unsafe extern "C" fn bayonetta_special_s_edge_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_main(fighter: &mut L2CFighterCommon) -> L2CValue { let frame = fighter.global_table[PREV_STATUS_FRAME].get_f32() - 18.0; MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_edge"), frame.clamp(0.0, 16.0), 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_edge_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_edge_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_edge_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn bayonetta_special_s_edge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -98,9 +97,9 @@ unsafe extern "C" fn bayonetta_special_s_edge_main_loop(fighter: &mut L2CFighter 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_KICK // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_KICK -unsafe extern "C" fn bayonetta_special_s_kick_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -128,30 +127,30 @@ unsafe extern "C" fn bayonetta_special_s_kick_pre(fighter: &mut L2CFighterCommon 0.into() } -unsafe extern "C" fn bayonetta_special_s_kick_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_hold_end"), 0.0, 1.0, false, 0.0, false, false); let frame = fighter.global_table[PREV_STATUS_FRAME].get_i32() - 20; let speed = 1.12 - (0.016 * frame as f32); //instant kick = 1.12, last second kick ~ 0.88 sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, speed); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_kick_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_kick_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_kick_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_FORBID); fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); 0.into() } -unsafe extern "C" fn bayonetta_special_s_kick_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } if MotionModule::is_end(fighter.module_accessor) {fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); } - bayonetta_special_s_slow_hit(fighter); + special_s_slow_hit(fighter); 0.into() } -unsafe extern "C" fn bayonetta_special_s_slow_hit(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_slow_hit(fighter: &mut L2CFighterCommon) -> L2CValue { let mul_x = fighter.get_param_float("param_special_s", "hs_shooting_speed_mul_x"); let shield_x = fighter.get_param_float("param_special_s", "guard_speed_mul_x"); if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { @@ -164,19 +163,15 @@ unsafe extern "C" fn bayonetta_special_s_slow_hit(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_end) - .install(); - smashline::Agent::new("bayonetta") - .status(Pre, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_pre) - .status(Main, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_main) - .status(End, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_end) - .install(); - smashline::Agent::new("bayonetta") - .status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_pre) - .status(Main, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_main) - .status(End, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + + agent.status(Pre, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_end); + + agent.status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_end); } \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs new file mode 100644 index 0000000000..cbab51e4eb --- /dev/null +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -0,0 +1,217 @@ +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 38.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 40.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 40.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ModelModule::set_scale(boma, 0.96); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attacks4hi",game_attacks4hi); + agent.acmd("game_attackhi4", game_attackhi4); +} diff --git a/fighters/bayonetta/src/wickedweavearm/mod.rs b/fighters/bayonetta/src/wickedweavearm/mod.rs new file mode 100644 index 0000000000..de12da99cd --- /dev/null +++ b/fighters/bayonetta/src/wickedweavearm/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta_wickedweavearm"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd.rs b/fighters/bayonetta/src/wickedweaveleg/acmd.rs new file mode 100644 index 0000000000..c9028df686 --- /dev/null +++ b/fighters/bayonetta/src/wickedweaveleg/acmd.rs @@ -0,0 +1,43 @@ +use super::*; + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 14.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 16.0); + if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw4", game_attacklw4); +} diff --git a/fighters/bayonetta/src/wickedweaveleg/mod.rs b/fighters/bayonetta/src/wickedweaveleg/mod.rs new file mode 100644 index 0000000000..596a69823d --- /dev/null +++ b/fighters/bayonetta/src/wickedweaveleg/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta_wickedweaveleg"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/acmd/aerials.rs b/fighters/brave/src/acmd/aerials.rs index 6282c5d4fb..021008f3fc 100644 --- a/fighters/brave/src/acmd/aerials.rs +++ b/fighters/brave/src/acmd/aerials.rs @@ -1,257 +1,252 @@ - use super::*; -unsafe extern "C" fn brave_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 14.0/(42.0 - 25.0)); + FT_MOTION_RATE_RANGE(agent, 25.0, 42.0, 14.0); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 4.0/(17.2 - 14.0)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.2, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 17.2); - FT_MOTION_RATE(fighter, 1.0/(19.0 - 17.2)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.2, 19.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn brave_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 3.0/(17.5 - 14.0)); + FT_MOTION_RATE_RANGE(agent, 14.0, 17.5, 3.0); frame(lua_state, 17.5); - FT_MOTION_RATE(fighter, 4.0/(21.0 - 17.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 17.5, 21.0, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn brave_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn brave_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 3.0, 3.0, 5.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0/(5.5 - 5.0)); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0/(6.0 - 5.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 75, 86, 0, 53, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 75, 86, 0, 53, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 5.5, 6.0, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 75, 86, 0, 53, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 75, 86, 0, 53, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 15.0/(29.0 - 8.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 70, 72, 0, 53, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 7.0, 70, 72, 0, 53, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 29.0, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 70, 72, 0, 53, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 7.0, 70, 72, 0, 53, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 10.0/(35.0 - 29.0)); + FT_MOTION_RATE_RANGE(agent, 29.0, 35.0, 10.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn brave_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 18.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 18.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 18.0, 270, 61, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 18.0, 270, 61, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 13.0, 270, 64, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 13.0, 270, 64, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 10.0/(33.0 - 18.0)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 18.0, 33.0, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); @@ -259,25 +254,26 @@ unsafe extern "C" fn brave_attack_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::clear(boma, 7, false); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attackairn", brave_attack_air_n_game) - .acmd("game_attackairf", brave_attack_air_f_game) - .acmd("game_attackairb", brave_attack_air_b_game) - .acmd("expression_attackairb", brave_attack_air_b_expression) - .acmd("game_attackairhi", brave_attack_air_hi_game) - .acmd("expression_attackairhi", brave_attack_air_hi_expression) - .acmd("game_attackairlw", brave_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/brave/src/acmd/ground.rs b/fighters/brave/src/acmd/ground.rs index 9e7905381f..9e261d3a1b 100644 --- a/fighters/brave/src/acmd/ground.rs +++ b/fighters/brave/src/acmd/ground.rs @@ -1,174 +1,172 @@ - use super::*; -unsafe extern "C" fn brave_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 90, 25, 0, 25, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 90, 25, 0, 25, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); AttackModule::set_add_reaction_frame(boma, 3, 3.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn brave_attack_11_expression(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_attack11(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); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn brave_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 18.0, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 18.0, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn brave_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 2.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 17.0 / (19.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 19.0, 17.0); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 18.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 18.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_dash_expression(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_attackdash(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); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attack11", brave_attack_11_game) - .acmd("expression_attack11", brave_attack_11_expression) - .acmd("game_attack12", brave_attack_12_game) - .acmd("game_attack13", brave_attack_13_game) - .acmd("game_attackdash", brave_attack_dash_game) - .acmd("expression_attackdash", brave_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/brave/src/acmd/mod.rs b/fighters/brave/src/acmd/mod.rs index 5528b4b735..d8a22387b4 100644 --- a/fighters/brave/src/acmd/mod.rs +++ b/fighters/brave/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; mod smashes; -mod other; -mod ground; +mod aerials; mod specials; mod throws; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - smashes::install(); - other::install(); - ground::install(); - specials::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index 05e65a3408..4f420bc772 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -1,557 +1,176 @@ - 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_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_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(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_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_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_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_brave_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_brave_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + 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); - } -} - -unsafe extern "C" fn brave_spark_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 82, 76, 0, 80, 8.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 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_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 82, 76, 0, 80, 15.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 90, 40, 0, 100, 6.0, 0.0, 22.0, 0.0, Some(0.0), Some(75.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_fireball_burst_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 115, 100, 50, 0, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 56, 70, 0, 60, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, true, 0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 345, 0, 15, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn brave_tornado_special_hi1_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("tornado1"), 7.0, 108, 100, 160, 0, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado1"), 7.0, 108, 55, 0, 85, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_tornado_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado1"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); - } -} - -unsafe extern "C" fn brave_tornado_special_hi2_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("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado1"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_tornado_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado2"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); - } -} - -unsafe extern "C" fn brave_tornado_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - for _ in 0..i32::MAX { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado2"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("tornado1"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("tornado2"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("tornado1"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("tornado2"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - if WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) <= 2 { - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 1, Hash40::new("top"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 5.0, 0.0, Some(0.0), Some(18.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - } - wait(lua_state, 1.0); - } - -} - -unsafe extern "C" fn brave_tornado_special_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado3"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado3"), Hash40::new("tornado2"), 0, 0, 0, 0, 180, 0, 0.75, true); - } -} - -unsafe extern "C" fn brave_special_lw8_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); +unsafe extern "C" fn effect_speciallw8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - FLASH(fighter, 0.8, 0.8, 2, 0.1); - BURN_COLOR(fighter, 4, 1.6, 8, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + FLASH(agent, 0.8, 0.8, 2, 0.1); + BURN_COLOR(agent, 4, 1.6, 8, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 1, 1, 1, 0); - BURN_COLOR_FRAME(fighter, 4, 1, 1, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 4, 1, 1, 1, 0); + BURN_COLOR_FRAME(agent, 4, 1, 1, 1, 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); + BURN_COLOR_NORMAL(agent); } } -unsafe extern "C" fn brave_special_air_lw8_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); +unsafe extern "C" fn effect_specialairlw8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - FLASH(fighter, 0.8, 0.8, 2, 0.1); - BURN_COLOR(fighter, 4, 1.6, 8, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + FLASH(agent, 0.8, 0.8, 2, 0.1); + BURN_COLOR(agent, 4, 1.6, 8, 0.8); } frame(lua_state, 32.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 1, 1, 1, 0); - BURN_COLOR_FRAME(fighter, 4, 1, 1, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 4, 1, 1, 1, 0); + BURN_COLOR_FRAME(agent, 4, 1, 1, 1, 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); + BURN_COLOR_NORMAL(agent); } } -unsafe extern "C" fn brave_crash_crash1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 366, 5, 0, 10, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 115, 5, 0, 10, 12.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 105, 5, 0, 10, 14.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 100, 5, 0, 10, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 18.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 53.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 20.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 22.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 73.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 24.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 81.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 63, 135, 0, 80, 26.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 93.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} +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); -unsafe extern "C" fn brave_crash_crash1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.6, true); - } - } - else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.6, true); - } - } - frame(lua_state, 80.0); - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.5, true); - } - } - else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.5, true); - } - } - frame(lua_state, 82.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("brave_fullburst_finish"), -1); - } -} - -unsafe extern "C" fn brave_crash_crash_end1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, false); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("brave_fullburst_end"), -1); - } -} - -unsafe extern "C" fn brave_explosion_explode2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 366, 100, 100, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 366, 100, 50, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AREA_WIND_2ND_RAD(fighter, 0, 0.5, 0.01, 1000, 1, 0, 0, 40); - ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 14, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear(boma, 2, false); - AttackModule::clear(boma, 3, false); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ATTACK(fighter, 0, 0, Hash40::new("top"), 26.0, 65, 50, 0, 80, 13.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -13, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 60, 50, 0, 80, 18.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 18.0); - AttackModule::set_size(boma, 1, 23.0); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 23.0); - AttackModule::set_size(boma, 1, 28.0); - AREA_WIND_2ND_RAD(fighter, 0, 1, 0.1, 1000, 1, 0, 0, 40); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -unsafe extern "C" fn brave_deathball_deathball2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 16.0, 0.0, 0.0, -5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 1.0, 0.0, -5.0, -24.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn brave_deathball_deathball2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("brave_deathball_hit2"), Hash40::new("top"), 0, 0, -5, 0, 90, 0, 1.65, 0, 0, 0, 0, 0, 0, true); - } -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -pub fn install() { - smashline::Agent::new("brave_tornado") - .acmd("game_specialhi1", brave_tornado_special_hi1_game) - .acmd("effect_specialhi1", brave_tornado_special_hi1_effect) - .acmd("game_specialhi2", brave_tornado_special_hi2_game) - .acmd("effect_specialhi2", brave_tornado_special_hi2_effect) - .acmd("game_specialhi3", brave_tornado_special_hi3_game) - .acmd("effect_specialhi3", brave_tornado_special_hi3_effect) - .install(); - smashline::Agent::new("brave") - .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("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_speciallw8", brave_special_lw8_effect) - .acmd("effect_specialairlw8", brave_special_air_lw8_effect) - .install(); - smashline::Agent::new("brave_spark") - .acmd("game_specials1", brave_spark_special_s1_game) - .install(); - smashline::Agent::new("brave_crash") - .acmd("game_crash1", brave_crash_crash1_game) - .acmd("effect_crash1", brave_crash_crash1_effect) - .acmd("effect_crashend1", brave_crash_crash_end1_effect) - .install(); - smashline::Agent::new("brave_fireball") - .acmd("game_burstl", brave_fireball_burst_l_game) - .install(); - smashline::Agent::new("brave_explosion") - .acmd("game_explode2", brave_explosion_explode2_game) - .install(); - smashline::Agent::new("brave_deathball") - .acmd("game_deathball2", brave_deathball_deathball2_game) - .acmd("effect_deathball2", brave_deathball_deathball2_effect) - .install(); + agent.acmd("effect_speciallw8", effect_speciallw8); + agent.acmd("effect_specialairlw8", effect_specialairlw8); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/smashes.rs b/fighters/brave/src/acmd/smashes.rs index 96378c8a7d..c89e42ca0d 100644 --- a/fighters/brave/src/acmd/smashes.rs +++ b/fighters/brave/src/acmd/smashes.rs @@ -1,111 +1,108 @@ - use super::*; -unsafe extern "C" fn brave_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0 / (16.5 - 15.0)); + FT_MOTION_RATE_RANGE(agent, 15.0, 16.5, 2.0); frame(lua_state, 16.5); - FT_MOTION_RATE(fighter, 5.0 / (21.0 - 16.5)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.5, 21.0, 5.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 24.0, 361, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 24.0, 361, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 42, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 42, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } - } -unsafe extern "C" fn brave_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_devil_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.1, 5.0); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.1, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_devil_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.1, 5.0); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.1, 4.0); } } frame(lua_state, 16.0); - let psyche_up = VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + let psyche_up = VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); if psyche_up { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if psyche_up { 1.2 } else { 1.0 }; - EFFECT(fighter, Hash40::new("brave_smash_ground"), Hash40::new("top"), 15, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("brave_smash_ground"), Hash40::new("top"), 15, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, false); if psyche_up { - LAST_EFFECT_SET_RATE(fighter, 0.5); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + LAST_EFFECT_SET_RATE(agent, 0.5); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_devil_sword"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + EFFECT_OFF_KIND(agent, Hash40::new("brave_devil_sword"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } - } -unsafe extern "C" fn brave_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_smash")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_smash")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_s01")); } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { @@ -113,313 +110,306 @@ unsafe extern "C" fn brave_attack_s4_sound(fighter: &mut L2CAgentBase) { WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l21_04")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l21_04")); } } frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_s02")); } - } -unsafe extern "C" fn brave_attack_s4_expression(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_attacks4(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); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 14.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn brave_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 90, 82, 0, 50, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 23.0, 90, 82, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 23.0, 90, 82, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 90, 82, 0, 50, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 23.0, 90, 82, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 23.0, 90, 82, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, 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_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 90, 82, 0, 60, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 90, 82, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 90, 82, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 90, 82, 0, 60, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 90, 82, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 90, 82, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn brave_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_h01")); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_attack09")); - } - frame(lua_state, 13.0); - if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { - frame(lua_state, 17.0); - WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - PLAY_SE(fighter, Hash40::new("se_brave_special_s05")); - } - frame(lua_state, 43.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_h02")); - } - } -unsafe extern "C" fn brave_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_lightning3_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW(agent, Hash40::new("brave_lightning3_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 16, 0, -90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.4, 0.6, 1); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT(fighter, Hash40::new("brave_lightning3_hit"), Hash40::new("sword1"), 3, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("brave_lightning3_hit2"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 16, 0, -90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.4, 0.6, 1); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT(agent, Hash40::new("brave_lightning3_hit"), Hash40::new("sword1"), 3, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("brave_lightning3_hit2"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 11, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 11, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_lightning3_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_lightning3_sword"), false, true); } +} +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h01")); + } + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_attack09")); + } + frame(lua_state, 13.0); + if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { + frame(lua_state, 17.0); + WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); + PLAY_SE(agent, Hash40::new("se_brave_special_s05")); + } + frame(lua_state, 43.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h02")); + } } -unsafe extern "C" fn brave_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 22.0, 60, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 60, 95, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 22.0, 60, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 60, 95, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 89, 0, 47, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 60, 89, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 89, 0, 47, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 60, 89, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 22.0, 46, 90, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 46, 90, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 22.0, 46, 90, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 46, 90, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 46, 100, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 46, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 46, 100, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 46, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn brave_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.7, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.7, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 9.0); - let psyche_up = VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + let psyche_up = VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 1); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 1); + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if psyche_up { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.6, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.6, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); if psyche_up { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_ice_sword"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + EFFECT_OFF_KIND(agent, Hash40::new("brave_ice_sword"), false, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } - } -unsafe extern "C" fn brave_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_attack08")); - PLAY_SE(fighter, Hash40::new("se_brave_smash_l01")); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_attack08")); + PLAY_SE(agent, Hash40::new("se_brave_smash_l01")); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l02")); } } frame(lua_state, 9.0); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_l02")); } } frame(lua_state, 22.0); WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_l02")); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l19")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_l02")); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l19")); } } - } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attacks4", brave_attack_s4_s_game) - .acmd("effect_attacks4", brave_attack_s4_effect) - .acmd("sound_attacks4", brave_attack_s4_sound) - .acmd("expression_attacks4", brave_attack_s4_expression) - .acmd("game_attackhi4", brave_attack_hi4_game) - .acmd("sound_attackhi4", brave_attack_hi4_sound) - .acmd("effect_attackhi4", brave_attack_hi4_effect) - .acmd("game_attacklw4", brave_attack_lw4_game) - .acmd("effect_attacklw4", brave_attack_lw4_effect) - .acmd("sound_attacklw4", brave_attack_lw4_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); } diff --git a/fighters/brave/src/acmd/specials.rs b/fighters/brave/src/acmd/specials.rs index 946898ef19..23789e9be5 100644 --- a/fighters/brave/src/acmd/specials.rs +++ b/fighters/brave/src/acmd/specials.rs @@ -1,85 +1,85 @@ use super::*; -unsafe extern "C" fn brave_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 14.0/(44.0 - 20.0)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 44.0, 14.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 6.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_HOP); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 52.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 26.0, 52.0, 16.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_n3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 19.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 6.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 38.0); - FT_MOTION_RATE_RANGE(fighter, 38.0, 68.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 38.0, 68.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 9.0); + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); @@ -87,412 +87,408 @@ unsafe extern "C" fn brave_special_s1_game(fighter: &mut L2CAgentBase) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 11.0, 6.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_ENABLE_SPARK); } if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_SUCCESS_SP) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 100, 0, 35, 8.0, 0.0, 8.0, 11.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 100, 0, 35, 8.0, 0.0, 8.0, 11.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 17.0, Some(0.0), Some(10.5), Some(17.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 17.0, Some(0.0), Some(10.5), Some(17.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 22.0, Some(0.0), Some(10.5), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 22.0, Some(0.0), Some(10.5), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 26.5, Some(0.0), Some(10.5), Some(26.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 26.5, Some(0.0), Some(10.5), Some(26.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 5.5, 0.0, 10.5, 29.0, Some(0.0), Some(10.5), Some(29.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 5.5, 0.0, 10.5, 29.0, Some(0.0), Some(10.5), Some(29.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } else { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 45, 100, 0, 30, 7.0, 0.0, 9.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 45, 100, 0, 30, 7.0, 0.0, 9.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 6.0); } } -unsafe extern "C" fn brave_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 13.0); + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_ENABLE_SPARK); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_SUCCESS_SP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 90, 0, 25, 4.5, 0.0, 11.5, 12.0, Some(0.0), Some(11.5), Some(50.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 90, 0, 25, 4.5, 0.0, 11.5, 12.0, Some(0.0), Some(11.5), Some(50.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 10, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 10, 4); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(4.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 7.0); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 11.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); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 11.0/(41.0 - 20.0)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 41.0, 11.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0/(6.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 11.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 20.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); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } - } -unsafe extern "C" fn brave_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 14.0/(8.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 14.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 18.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); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } - } -unsafe extern "C" fn brave_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 17.0); frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_8_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_CRASH, false, -1); WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_FULLBURST_INTERRUPT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 8.0, 0.0, 16.0, 0.0, -3.0, 8.0, 0.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 8.0, 0.0, 16.0, 0.0, -3.0, 8.0, 0.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 116.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_FULLBURST_INTERRUPT); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 136.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn brave_special_air_lw10_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw10(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 270, 30, 0, 80, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 270, 40, 0, 38, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 270, 30, 0, 80, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 270, 40, 0, 38, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); } -unsafe extern "C" fn brave_special_lw_14_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw14(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_SLEEP, false, -1); WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_FLAG_ENABLE_CONTROL_ENERGY); } } -unsafe extern "C" fn brave_special_lw_17_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 46, 67, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 15.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 46, 67, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 15.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 22.0, 46, 67, 0, 68, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 6.0, 31.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 22.0, 46, 67, 0, 68, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 6.0, 31.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_17_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.2, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 7, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 7, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, false, true); } } -unsafe extern "C" fn brave_special_lw_18_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 17.0, 50, 7, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 15.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 17.0, 50, 7, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 15.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); AttackModule::set_ice_frame_mul(boma, 0, 2.0, false); AttackModule::set_ice_frame_mul(boma, 1, 2.0, false); AttackModule::set_ice_frame_mul(boma, 2, 2.0, false); AttackModule::set_ice_frame_mul(boma, 4, 2.0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 50, 7, 0, 70, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 6.0, 31.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 50, 7, 0, 70, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 6.0, 31.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); AttackModule::set_ice_frame_mul(boma, 3, 2.0, false); AttackModule::set_ice_frame_mul(boma, 4, 2.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_18_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 8, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 8, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.3, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.3, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_ice_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_ice_sword"), false, true); } } -unsafe extern "C" fn brave_special_lw_19_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw19(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.3, 8.8, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.8, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 1.0, 361, 220, 10, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.3, 8.8, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.8, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 1.0, 361, 220, 10, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_special_lw20_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw20(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 35.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 35.0, 29.0); frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 35.0, 55, 89, 0, 36, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 35.0, 55, 89, 0, 36, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_specialn1", brave_special_n1_game) - .acmd("game_specialairn1", brave_special_n1_game) - .acmd("game_specialn2", brave_special_n2_game) - .acmd("game_specialair2", brave_special_n2_game) - .acmd("game_specialn3", brave_special_n3_game) - .acmd("game_specialairn3", brave_special_n3_game) - .acmd("game_specials1", brave_special_s1_game) - .acmd("game_specialairs1", brave_special_s1_game) - .acmd("game_specials2", brave_special_s2_game) - .acmd("game_specialairs2", brave_special_s2_game) - .acmd("game_specialhi1", brave_special_hi1_game) - .acmd("game_specialairhi1", brave_special_hi1_game) - .acmd("game_specialhi2", brave_special_hi2_game) - .acmd("game_specialairhi2", brave_special_hi2_game) - .acmd("game_specialhi3", brave_special_hi3_game) - .acmd("game_specialairhi3", brave_special_hi3_game) - .acmd("game_speciallwstart", brave_special_lw_start_game) - .acmd("game_specialairlwstart", brave_special_lw_start_game) - .acmd("game_speciallw8", brave_special_lw_8_game) - .acmd("game_specialairlw8", brave_special_lw_8_game) - .acmd("game_specialairlw10", brave_special_air_lw10_game) - .acmd("game_speciallw14", brave_special_lw_14_game) - .acmd("game_specialairlw14", brave_special_lw_14_game) - .acmd("game_speciallw17", brave_special_lw_17_game) - .acmd("game_specialairlw17", brave_special_lw_17_game) - .acmd("effect_speciallw17", brave_special_lw_17_effect) - .acmd("game_specialairlw17", brave_special_lw_17_effect) - .acmd("game_speciallw18", brave_special_lw_18_game) - .acmd("game_specialairlw18", brave_special_lw_18_game) - .acmd("effect_speciallw18", brave_special_lw_18_effect) - .acmd("effect_specialairlw18", brave_special_lw_18_effect) - .acmd("game_speciallw19", brave_special_lw_19_game) - .acmd("game_specialairlw19", brave_special_lw_19_game) - .acmd("game_speciallw20", brave_special_lw20_game) - .acmd("game_specialairlw20", brave_special_lw20_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialair2", game_specialn2); + agent.acmd("game_specialn3", game_specialn3); + agent.acmd("game_specialairn3", game_specialn3); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); + agent.acmd("game_speciallw8", game_speciallw8); + agent.acmd("game_specialairlw8", game_speciallw8); + agent.acmd("game_specialairlw10", game_specialairlw10); + agent.acmd("game_speciallw14", game_speciallw14); + agent.acmd("game_specialairlw14", game_speciallw14); + agent.acmd("game_speciallw17", game_speciallw17); + agent.acmd("game_specialairlw17", game_speciallw17); + agent.acmd("effect_speciallw17", effect_speciallw17); + agent.acmd("game_specialairlw17", effect_speciallw17); + agent.acmd("game_speciallw18", game_speciallw18); + agent.acmd("game_specialairlw18", game_speciallw18); + agent.acmd("effect_speciallw18", effect_speciallw18); + agent.acmd("effect_specialairlw18", effect_speciallw18); + agent.acmd("game_speciallw19", game_speciallw19); + agent.acmd("game_specialairlw19", game_speciallw19); + agent.acmd("game_speciallw20", game_speciallw20); + agent.acmd("game_specialairlw20", game_speciallw20); } diff --git a/fighters/brave/src/acmd/throws.rs b/fighters/brave/src/acmd/throws.rs index 07ac07a29a..ab7450924b 100644 --- a/fighters/brave/src/acmd/throws.rs +++ b/fighters/brave/src/acmd/throws.rs @@ -1,50 +1,49 @@ use super::*; -unsafe extern "C" fn brave_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 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); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { 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); + 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(9.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,104 +63,106 @@ unsafe extern "C" fn brave_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn brave_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 35, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 35, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 44.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 23.0, 44.0, 11.0); frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 47, 57, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 47, 57, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 11, 6); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 42.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 26.0, 42.0, 12.0); frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 85, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 85, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 31); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 31); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn brave_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 76, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 76, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 9, 1); - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 9, 1); + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -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) - .acmd("game_throwlw", brave_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/brave/src/acmd/tilts.rs b/fighters/brave/src/acmd/tilts.rs index 281c21dae2..e0c094af4b 100644 --- a/fighters/brave/src/acmd/tilts.rs +++ b/fighters/brave/src/acmd/tilts.rs @@ -1,197 +1,193 @@ - use super::*; -unsafe extern "C" fn brave_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shield"), 6.0, 60, 100, 35, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shield"), 6.0, 55, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 55, 100, 50, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 35, 100, 40, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shield"), 6.0, 60, 100, 35, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shield"), 6.0, 55, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 55, 100, 50, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 35, 100, 40, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 4.0, false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn brave_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); AttackModule::clear_inflict_kind_status(boma); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.5, 1.0); frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 7.5, 8.0, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn brave_attack_s3_s2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 5.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn brave_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.5, 1.0); frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 7.5, 8.0, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 94, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 94, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 94, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 8.0, 94, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 94, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 8.0, 94, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-8.0)); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 6.0); frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 86, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 86, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 86, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 8.0, 86, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 86, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 8.0, 86, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn brave_attack_hi3_expression(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_attackhi3(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); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 5.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn brave_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 83, 60, 0, 75, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 88, 60, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 93, 60, 0, 75, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 83, 60, 0, 75, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 88, 60, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 93, 60, 0, 75, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attacks3", brave_attack_s3_s_game) - .acmd("game_attacks3s2", brave_attack_s3_s2_game) - .acmd("expression_attacks3s2", brave_attack_s3_s2_expression) - .acmd("game_attackhi3", brave_attack_hi3_game) - .acmd("expression_attackhi3", brave_attack_hi3_expression) - .acmd("game_attacklw3", brave_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("expression_attacks3s2", expression_attacks3s2); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/brave/src/crash/acmd.rs b/fighters/brave/src/crash/acmd.rs new file mode 100644 index 0000000000..2e1451c9b9 --- /dev/null +++ b/fighters/brave/src/crash/acmd.rs @@ -0,0 +1,106 @@ +use super::*; + +unsafe extern "C" fn game_crash1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 366, 5, 0, 10, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 115, 5, 0, 10, 12.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 105, 5, 0, 10, 14.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 33.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 100, 5, 0, 10, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 18.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 53.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 20.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 22.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 73.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 24.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 81.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 63, 135, 0, 80, 26.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 93.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_crash1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.6, true); + } + } + else { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.6, true); + } + } + frame(lua_state, 80.0); + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.5, true); + } + } + else { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.5, true); + } + } + frame(lua_state, 82.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("brave_fullburst_finish"), -1); + } +} + +unsafe extern "C" fn effect_crashend1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, false); + } + frame(lua_state, 29.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("brave_fullburst_end"), -1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_crash1", game_crash1); + agent.acmd("effect_crash1", effect_crash1); + agent.acmd("effect_crashend1", effect_crashend1); +} \ No newline at end of file diff --git a/fighters/brave/src/crash/mod.rs b/fighters/brave/src/crash/mod.rs new file mode 100644 index 0000000000..24229d64fc --- /dev/null +++ b/fighters/brave/src/crash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_crash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/deathball/acmd.rs b/fighters/brave/src/deathball/acmd.rs new file mode 100644 index 0000000000..90f3dce5ab --- /dev/null +++ b/fighters/brave/src/deathball/acmd.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_deathball2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 16.0, 0.0, 0.0, -5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 1.0, 0.0, -5.0, -24.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_deathball2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("brave_deathball_hit2"), Hash40::new("top"), 0, 0, -5, 0, 90, 0, 1.65, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_deathball2", game_deathball2); + agent.acmd("effect_deathball2", effect_deathball2); +} \ No newline at end of file diff --git a/fighters/brave/src/deathball/mod.rs b/fighters/brave/src/deathball/mod.rs new file mode 100644 index 0000000000..2047508f0d --- /dev/null +++ b/fighters/brave/src/deathball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_deathball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/explosion/acmd.rs b/fighters/brave/src/explosion/acmd.rs new file mode 100644 index 0000000000..bfbc5bbebb --- /dev/null +++ b/fighters/brave/src/explosion/acmd.rs @@ -0,0 +1,44 @@ +use super::*; + +unsafe extern "C" fn game_explode2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 100, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 366, 100, 50, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + AREA_WIND_2ND_RAD(agent, 0, 0.5, 0.01, 1000, 1, 0, 0, 40); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 14, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ATTACK(agent, 0, 0, Hash40::new("top"), 26.0, 65, 50, 0, 80, 13.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -13, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 60, 50, 0, 80, 18.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 18.0); + AttackModule::set_size(boma, 1, 23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 23.0); + AttackModule::set_size(boma, 1, 28.0); + AREA_WIND_2ND_RAD(agent, 0, 1, 0.1, 1000, 1, 0, 0, 40); + } + frame(lua_state, 40.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode2", game_explode2); +} \ No newline at end of file diff --git a/fighters/brave/src/explosion/mod.rs b/fighters/brave/src/explosion/mod.rs new file mode 100644 index 0000000000..01e7fd24d1 --- /dev/null +++ b/fighters/brave/src/explosion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_explosion"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/fireball/acmd.rs b/fighters/brave/src/fireball/acmd.rs new file mode 100644 index 0000000000..71fd755755 --- /dev/null +++ b/fighters/brave/src/fireball/acmd.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn game_burstl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 115, 100, 50, 0, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 56, 70, 0, 60, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, true, 0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 345, 0, 15, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_burstl", game_burstl); +} \ No newline at end of file diff --git a/fighters/brave/src/fireball/mod.rs b/fighters/brave/src/fireball/mod.rs new file mode 100644 index 0000000000..69fe227721 --- /dev/null +++ b/fighters/brave/src/fireball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_fireball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/lib.rs b/fighters/brave/src/lib.rs index 6c0b91218d..ecfbd6ca6c 100644 --- a/fighters/brave/src/lib.rs +++ b/fighters/brave/src/lib.rs @@ -2,6 +2,23 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod opff; +//pub mod status; + +// articles + +mod crash; +mod deathball; +mod explosion; +mod fireball; +mod spark; +mod tornado; + +pub mod menu; +pub use menu::hero_rng_hook_impl; + use smash::{ lib::{ L2CValue, @@ -31,37 +48,39 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; -pub mod acmd; +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // init roll history + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_1, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_2, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_3, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_4, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_1, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_2, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_3, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_4, -1); -pub mod menu; -pub mod opff; -pub use menu::hero_rng_hook_impl; - -extern "C" fn brave_init(fighter: &mut L2CFighterCommon) { - unsafe { - // init roll history - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_1, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_2, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_3, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_4, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_1, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_2, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_3, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_4, -1); - - // roll to get two sets of fresh values - let mut vals = vec![]; - menu::roll_spells(fighter, &mut vals); - menu::roll_spells(fighter, &mut vals); + // roll to get two sets of fresh values + let mut vals = vec![]; + menu::roll_spells(fighter, &mut vals); + menu::roll_spells(fighter, &mut vals); - VarModule::off_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); - } + VarModule::off_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); } pub fn install() { - acmd::install(); - opff::install(); - smashline::Agent::new("brave").on_start(brave_init).install(); + let agent = &mut Agent::new("brave"); + acmd::install(agent); + opff::install(agent); + agent.on_start(on_start); + agent.install(); + + crash::install(); + deathball::install(); + explosion::install(); + fireball::install(); + spark::install(); + tornado::install(); } \ No newline at end of file diff --git a/fighters/brave/src/opff.rs b/fighters/brave/src/opff.rs index 0bd701c1c4..d1475fe5f0 100644 --- a/fighters/brave/src/opff.rs +++ b/fighters/brave/src/opff.rs @@ -106,7 +106,6 @@ unsafe fn woosh_cancel(fighter: &mut L2CFighterCommon) { fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); } } - } unsafe fn kaclang_jc(fighter: &mut L2CFighterCommon) { @@ -174,8 +173,6 @@ pub unsafe extern "C" fn brave_frame_wrapper(fighter: &mut L2CFighterCommon) { ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("sword1"), &Vector3f::new(1.1, 1.05, 1.045)); } -pub fn install() { - smashline::Agent::new("brave") - .on_line(Main, brave_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, brave_frame_wrapper); } \ No newline at end of file diff --git a/fighters/brave/src/spark/acmd.rs b/fighters/brave/src/spark/acmd.rs new file mode 100644 index 0000000000..d9068e5f41 --- /dev/null +++ b/fighters/brave/src/spark/acmd.rs @@ -0,0 +1,16 @@ +use super::*; + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 82, 76, 0, 80, 8.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 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_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 82, 76, 0, 80, 15.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 90, 40, 0, 100, 6.0, 0.0, 22.0, 0.0, Some(0.0), Some(75.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); +} \ No newline at end of file diff --git a/fighters/brave/src/spark/mod.rs b/fighters/brave/src/spark/mod.rs new file mode 100644 index 0000000000..37e95fe81a --- /dev/null +++ b/fighters/brave/src/spark/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_spark"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/tornado/acmd.rs b/fighters/brave/src/tornado/acmd.rs new file mode 100644 index 0000000000..db9236d3d1 --- /dev/null +++ b/fighters/brave/src/tornado/acmd.rs @@ -0,0 +1,85 @@ +use super::*; + +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 7.0, 108, 100, 160, 0, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado1"), 7.0, 108, 55, 0, 85, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado1"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + } +} + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado1"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado2"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + } +} + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..i32::MAX { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado2"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("tornado1"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("tornado2"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("tornado1"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("tornado2"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + if WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) <= 2 { + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 1, Hash40::new("top"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 5.0, 0.0, Some(0.0), Some(18.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado3"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado3"), Hash40::new("tornado2"), 0, 0, 0, 0, 180, 0, 0.75, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("effect_specialhi3", effect_specialhi3); +} \ No newline at end of file diff --git a/fighters/brave/src/tornado/mod.rs b/fighters/brave/src/tornado/mod.rs new file mode 100644 index 0000000000..bef84a3c5d --- /dev/null +++ b/fighters/brave/src/tornado/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_tornado"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index df96cf0141..04c74735ec 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -1,235 +1,233 @@ use super::*; -// Uses smash_script, if you prefer to use the built-in macros instead. - -unsafe extern "C" fn buddy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 73, 0, 48, 5.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 73, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 73, 0, 48, 5.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 73, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 32, 73, 0, 48, 5.0, 0.0, 9.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 32, 73, 0, 48, 5.0, 0.0, 9.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 7.0, 50, 76, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 0, 0, Hash40::new("handr"), 7.0, 50, 76, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 92, 26, 0, 78, 4.75, 0.0, 7.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 92, 26, 0, 78, 4.75, 0.0, 7.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 2.5, 0, 0, 180, 0, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 2.5, 0, 0, 180, 0, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.6); } } -unsafe extern "C" fn buddy_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = app::sv_math::rand(hash40("fighter"), 3); - if play_vc == 0 {PLAY_SE(fighter, Hash40::new("vc_buddy_attack03"));} + if play_vc == 0 {PLAY_SE(agent, Hash40::new("vc_buddy_attack03"));} } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } } -unsafe extern "C" fn buddy_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0 / 10.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0 / 10.5); } frame(lua_state, 14.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0 / 1.5); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0 / 1.5); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 290, 62, 0, 16, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 290, 62, 0, 16, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 275, 75, 0, 41, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 275, 75, 0, 41, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag( boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("k_bust"), 3.0, 110, 35, 0, 35, 3.0, -0.2, 2.0, 0.0, Some(9.4), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("k_bust"), 3.0, 180, 35, 0, 35, 3.0, -0.2, -2.0, 0.0, Some(9.4), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("k_bust"), 3.0, 110, 35, 0, 35, 3.0, -0.2, 2.0, 0.0, Some(9.4), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("k_bust"), 3.0, 180, 35, 0, 35, 3.0, -0.2, -2.0, 0.0, Some(9.4), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("k_bust"), 3.0, 190, 35, 0, 35, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("k_bust"), 3.0, 190, 35, 0, 35, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 136, 0, 50, 4.8, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 5.0, 50, 136, 0, 50, 5.8, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 136, 0, 50, 4.8, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 5.0, 50, 136, 0, 50, 5.8, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 70, 101, 0, 50, 3.75, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 70, 101, 0, 50, 3.75, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -276,159 +274,162 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 60, 0, 54, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 60, 0, 54, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 50, 0, 23, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 50, 0, 23, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 76, 63, 0, 67, 5.5, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 76, 63, 0, 67, 5.5, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 1, false); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - SET_SPEED_EX(fighter, 0, 1.625, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - FT_MOTION_RATE_RANGE(fighter,46.0,57.0,26.0); + SET_SPEED_EX(agent, 0, 1.625, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + FT_MOTION_RATE_RANGE(agent,46.0,57.0,26.0); } } frame(lua_state, 53.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 69.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } } -unsafe extern "C" fn buddy_attack_air_lw_effect(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FLW_POS(agent, Hash40::new("buddy_air_lw"), Hash40::new("top"), 0, -7, 0, 0, 0, 0, 1, true); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.7, true); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, false, true); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { EFFECT_OFF_KIND(agent, Hash40::new("buddy_air_lw"),false,false); EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.1, true); - sv_animcmd::EFFECT_WORK(agent.lua_state_agent); + sv_animcmd::EFFECT_WORK(lua_state); } } - frame(agent.lua_state_agent, 50.0); + frame(lua_state, 50.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, false, true); } } -unsafe extern "C" fn buddy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_landing_air_lw_game(agent: &mut L2CAgentBase) { -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attackairn", buddy_attack_air_n_game) - .acmd("effect_attackairn", buddy_attack_air_n_effect) - .acmd("sound_attackairn", buddy_attack_air_n_sound) - .acmd("expression_attackairn", buddy_attack_air_n_expression) - .acmd("game_attackairf", buddy_attack_air_f_game) - .acmd("expression_attackairf", buddy_attack_air_f_expression) - .acmd("game_attackairb", buddy_attack_air_b_game) - .acmd("game_attackairhi", buddy_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("expression_attackairhi", buddy_attack_air_hi_expression) - .acmd("game_attackairlw", buddy_attack_air_lw_game) - .acmd("effect_attackairlw", buddy_attack_air_lw_effect) - .acmd("expression_attackairlw", buddy_attack_air_lw_expression) - .acmd("game_landingairlw", buddy_landing_air_lw_game) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", stub); } diff --git a/fighters/buddy/src/acmd/ground.rs b/fighters/buddy/src/acmd/ground.rs index 3d05ab0871..d986a5ffa8 100644 --- a/fighters/buddy/src/acmd/ground.rs +++ b/fighters/buddy/src/acmd/ground.rs @@ -1,180 +1,177 @@ use super::*; -unsafe extern "C" fn buddy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 45, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 45, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn buddy_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 75, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 75, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn buddy_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(7.5-4.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 74, 98, 0, 72, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handl"), 4.0, 74, 98, 0, 72, 4.0, 4.0, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(7.5-4.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 74, 98, 0, 72, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handl"), 4.0, 74, 98, 0, 72, 4.0, 4.0, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn buddy_attack_13_expression(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_attack13(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); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn buddy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 66, 66, 0, 75, 6.0, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 66, 66, 0, 75, 6.0, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 66, 38, 0, 59, 5.5, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 66, 38, 0, 59, 5.5, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); } } -unsafe extern "C" fn buddy_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 6, 0, 0, 0, -90, 0.9, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 6, 0, 0, 0, -90, 0.9, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 5, 0, 0, 0, -90, 0.9, false, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 5, 0, 0, 0, -90, 0.9, false, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attack11", buddy_attack_11_game) - .acmd("game_attack12", buddy_attack_12_game) - .acmd("game_attack13", buddy_attack_13_game) - .acmd("expression_attack13", buddy_attack_13_expression) - .acmd("game_attackdash", buddy_attack_dash_game) - .acmd("effect_attackdash", buddy_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/buddy/src/acmd/mod.rs b/fighters/buddy/src/acmd/mod.rs index 6312b876a0..d8a22387b4 100644 --- a/fighters/buddy/src/acmd/mod.rs +++ b/fighters/buddy/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/buddy/src/acmd/other.rs b/fighters/buddy/src/acmd/other.rs index 99e19ec391..bdde172e34 100644 --- a/fighters/buddy/src/acmd/other.rs +++ b/fighters/buddy/src/acmd/other.rs @@ -1,300 +1,129 @@ use super::*; -unsafe extern "C" fn buddy_jump_aerial_f1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); - } -} - -unsafe extern "C" fn buddy_jump_aerial_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); - } -} - -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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_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(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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_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_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} +unsafe extern "C" fn game_jumpaerialf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 26.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_buddy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_buddy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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, 12.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 buddy_bullet_bakyun_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.7, 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_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - //AttackModule::set_add_reaction_frame(boma, 0, 6, false); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, 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_PUNCH, *ATTACK_REGION_OBJECT); - //AttackModule::set_add_reaction_frame(boma, 0, 6, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 361, 8, 0, 8, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.9, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 361, 6, 0, 8, 2.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn buddy_bullet_missile_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - GroundModule::set_offset_y(boma, -1.0); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 361, 20, 0, 52, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.6, 361, 20, 0, 46, 3.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.8, 361, 20, 0, 40, 2.8, 0.0, 0.0, 0.0, None, None, None, 0.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn buddy_pad_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - let pad_length = 6.0; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 70, 0, 40, 2.0, 0.0, 2.2, pad_length, Some(0.0), Some(2.2), Some(-pad_length), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } - //Vanilla code from here on out - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } -} - -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("buddy_bullet") - .acmd("game_bakyun", buddy_bullet_bakyun_game) - .acmd("game_missile", buddy_bullet_missile_game) - .install(); - smashline::Agent::new("buddy") - .acmd("game_jumpaerialf1", buddy_jump_aerial_f1_game) - .acmd("game_jumpaerialf2", buddy_jump_aerial_f2_game) - .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("game_turn", 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) - .install(); - smashline::Agent::new("buddy_pad") - .acmd("game_fall", buddy_pad_fall_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("game_jumpaerialf1", game_jumpaerialf); + agent.acmd("game_jumpaerialf2", game_jumpaerialf); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/buddy/src/acmd/smashes.rs b/fighters/buddy/src/acmd/smashes.rs index afd434a5a6..66336222da 100644 --- a/fighters/buddy/src/acmd/smashes.rs +++ b/fighters/buddy/src/acmd/smashes.rs @@ -1,203 +1,201 @@ use super::*; -unsafe extern "C" fn buddy_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, smash::phx::Hash40::new("attack_s4s"), true, 0.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, smash::phx::Hash40::new("attack_s4s"), true, 11.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 15.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 15.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 22.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 22.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 19.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 19.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -// Uses smash_script, if you prefer to use the built-in macros instead. -unsafe extern "C" fn buddy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 16, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 17, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); + HIT_NO(agent, 16, *HIT_STATUS_NORMAL); + HIT_NO(agent, 17, *HIT_STATUS_NORMAL); FighterAreaModuleImpl::enable_fix_jostle_area( boma, 4.0, 3.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } //Launcher hitbox, chains into main hitbox frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 100, 0, 5.0, 0.0, 3.0, 6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 100, 0, 5.0, 0.0, 3.0, 6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 0, false); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("legr"), 13.0, 86, 116, 0, 40, 4.4, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("footr"), 13.0, 86, 116, 0, 40, 4.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("legl"), 13.0, 86, 116, 0, 40, 4.4, 2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("legr"), 13.0, 86, 116, 0, 40, 4.4, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("footr"), 13.0, 86, 116, 0, 40, 4.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("legl"), 13.0, 86, 116, 0, 40, 4.4, 2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); - HIT_NO(fighter, 16, *HIT_STATUS_OFF); - HIT_NO(fighter, 17, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); + HIT_NO(agent, 16, *HIT_STATUS_OFF); + HIT_NO(agent, 17, *HIT_STATUS_OFF); } } -unsafe extern "C" fn buddy_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -90, 0, 0, 1.7, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -90, 0, 0, 1.7, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -90, 0, 0, 1.2, true); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, -2, 0, 0, 0, 0, 1.4, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -90, 0, 0, 1.2, true); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, -2, 0, 0, 0, 0, 1.4, true, 1.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn buddy_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_attackhard_h01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); } frame(lua_state, 28.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_buddy_attackhard_h02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_buddy_attackhard_h02")); } } -unsafe extern "C" fn buddy_attack_hi4_expression(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_attackhi4(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); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn buddy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 44, 69, 0, 64, 5.0, 0.0, 4.0, 13.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 44, 69, 0, 64, 5.0, 0.0, 4.0, 13.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 48.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attacks4", buddy_attack_s4_game) - .acmd("game_attackhi4", buddy_attack_hi4_game) - .acmd("effect_attackhi4", buddy_attack_hi4_effect) - .acmd("sound_attackhi4", buddy_attack_hi4_sound) - .acmd("expression_attackhi4", buddy_attack_hi4_expression) - .acmd("game_attacklw4", buddy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/buddy/src/acmd/specials.rs b/fighters/buddy/src/acmd/specials.rs index a87ac11e5f..a56bf67e01 100644 --- a/fighters/buddy/src/acmd/specials.rs +++ b/fighters/buddy/src/acmd/specials.rs @@ -2,470 +2,420 @@ use smash::app::sv_animcmd::EFFECT_WORK; use super::*; -unsafe extern "C" fn buddy_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); - JostleModule::set_status( boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - //AttackModule::set_captured_same_time_attack(boma, 0, true); - //AttackModule::set_captured_same_time_attack(boma, 1, true); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.48); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - HIT_NO(fighter, 0, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 1, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 2, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 3, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 4, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 5, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 6, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 7, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 8, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 9, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 10, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 11, *HIT_STATUS_NORMAL); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); - //AttackModule::set_captured_same_time_attack(boma, 0, true); - //AttackModule::set_captured_same_time_attack(boma, 1, true); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.28); - } -} - -unsafe fn will_Bayonet(fighter: &mut L2CAgentBase) -> bool -{ - let is_csticking = ControlModule::get_command_flag_cat(fighter.module_accessor, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; +unsafe fn will_bayonet(agent: &mut L2CAgentBase) -> bool { + let boma = agent.boma(); + let is_csticking = ControlModule::get_command_flag_cat(boma, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; if (is_csticking) { return true; } return false; } -unsafe extern "C" fn buddy_attack_special_n_upperfire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - for _ in 0..4 - { - if is_excute(fighter) && will_Bayonet(fighter){ +unsafe extern "C" fn game_specialnupperfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..4 { + if is_excute(agent) && will_bayonet(agent){ VarModule::on_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); - fighter.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); + agent.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); VarModule::set_int(boma.object(), vars::buddy::instance::BAYONET_EGGS,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); break; } wait(lua_state, 1.0); } - if !VarModule::is_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE) - { + if !VarModule::is_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE) { frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_GENERATE_BULLET); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_START_PRECEDE_CHECK); } } } -unsafe extern "C" fn buddy_attack_special_n_fire2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialnfire2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - for _ in 0..4 - { - if is_excute(fighter) && will_Bayonet(fighter){ + for _ in 0..4 { + if is_excute(agent) && will_bayonet(agent){ VarModule::on_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); - fighter.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); + agent.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); return; } wait(lua_state, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_GENERATE_BULLET); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_START_PRECEDE_CHECK); } } -unsafe extern "C" fn buddy_special_air_s_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - if (fighter.is_situation(*SITUATION_KIND_GROUND)) - { - ItemModule::set_have_item_visibility(boma, false,0); - } - //slope!(fighter,*MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackll"), 0); - } - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - frame(lua_state, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, 0); - } - wait(lua_state, 2.0); +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); + JostleModule::set_status( boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + //AttackModule::set_captured_same_time_attack(boma, 0, true); + //AttackModule::set_captured_same_time_attack(boma, 1, true); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.48); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + HIT_NO(agent, 0, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 1, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 2, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 3, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 4, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 5, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 6, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 7, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 8, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 9, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 10, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 11, *HIT_STATUS_NORMAL); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); + //AttackModule::set_captured_same_time_attack(boma, 0, true); + //AttackModule::set_captured_same_time_attack(boma, 1, true); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.28); + } } -unsafe extern "C" fn buddy_special_air_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //Clear speed + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + KineticModule::clear_speed_all(boma); + GroundModule::set_attach_ground(boma, false); + sv_kinetic_energy!(clear_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + SET_SPEED_EX(agent, -0.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 2.0); + frame(lua_state, 10.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + FT_MOTION_RATE(agent, 1.0); + + frame(lua_state, 12.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 2.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } +} + +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.4, 0, 0.2); + if is_excute(agent) { + FLASH(agent, 1, 0.4, 0, 0.2); } frame(lua_state, 4.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 0, 0, 0, 0); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 0, -6, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH_FRM(agent, 4, 0, 0, 0, 0); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 0, -6, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 12.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.4, 0, 0.3); + if is_excute(agent) { + FLASH(agent, 1, 0.4, 0, 0.3); } } -unsafe extern "C" fn buddy_special_air_s_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); +unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) && !WorkModule::is_flag(boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL){ + PLAY_SE(agent, Hash40::new("se_buddy_special_s01")); + } + frame(lua_state, 3.0); + if is_excute(agent) { + let play_vc = app::sv_math::rand(hash40("fighter"), 3); + if play_vc == 0 { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s01")); + } +} - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("buddy_special_s_flash1"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 1, 0.3, 0); - - EFFECT_FLW_POS(fighter, Hash40::new("buddy_special_s_flash2"), Hash40::new("k_head"), -1, 0, -4, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - EffectModule::enable_sync_init_pos_last(boma); +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //Set control + VarModule::on_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); + let stick_y: f32 = ControlModule::get_stick_y(boma); + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,stick_y.signum()); + if stick_y.abs() < 0.1 { + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); + } + //Clear gravity speed (prevents exponential movement from cliff jump) + sv_kinetic_energy!(clear_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + let shieldDamage = 4; + JostleModule::set_status( boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); + HIT_NO(agent, 16, *HIT_STATUS_NORMAL); + HIT_NO(agent, 17, *HIT_STATUS_NORMAL); + } + //Weaker hitbox + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } +} +unsafe extern "C" fn effect_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("buddy_special_s_flash1"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1, 0.3, 0); + EFFECT_FLW_POS(agent, Hash40::new("buddy_special_s_flash2"), Hash40::new("k_head"), -1, 0, -4, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + EffectModule::enable_sync_init_pos_last(boma); + } if (smash::app::sv_animcmd::get_value_float(lua_state,*SO_VAR_FLOAT_LR)<=0.0){ - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), 2, 0, 3, 0, 0, 0, 1, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), 2, 0, 3, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), 2, 4, 0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), 2, 4, 0, 0, 0, 0, 0.7, true); } } - else if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), -2, 0, 3, 0, 0, 0, 1, true); + else if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), -2, 0, 3, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), -2, 4, 0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), -2, 4, 0, 0, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); } - if is_excute(fighter) { - FLASH(fighter, 1, 1, 0.6, 0.3); - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FLASH(agent, 1, 1, 0.6, 0.3); + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - //buddy_meter(fighter,boma); - + if is_excute(agent) { + //buddy_meter(agent,boma); EffectModule::enable_sync_init_pos_last(boma); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -unsafe extern "C" fn buddy_special_air_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 1.0); - if is_excute(fighter) && !WorkModule::is_flag(boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL){ - PLAY_SE(fighter, Hash40::new("se_buddy_special_s01")); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - let play_vc = app::sv_math::rand(hash40("fighter"), 3); - if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s01")); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn buddy_special_air_s_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_buddy_special_s05")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_buddy_special_s05")); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = app::sv_math::rand(hash40("fighter"), 3); if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_smash_h01_vc")); + PLAY_SE(agent, Hash40::new("vc_buddy_smash_h01_vc")); } } frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } frame(lua_state, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } } -unsafe extern "C" fn buddy_special_air_s_wall_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_down_m_01")); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - let play_vc = app::sv_math::rand(hash40("fighter"), 2); - if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_missfoot02")); +unsafe extern "C" fn expression_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + ItemModule::set_have_item_visibility(boma, false,0); } + //slope!(agent,*MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackll"), 0); + } + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_down_m_02")); - } -} - -unsafe extern "C" fn buddy_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 36.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } -} - -unsafe extern "C" fn buddy_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - //Clear speed - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - KineticModule::clear_speed_all(fighter.module_accessor); - GroundModule::set_attach_ground(fighter.module_accessor, false); - sv_kinetic_energy!( - clear_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY - ); - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - SET_SPEED_EX(fighter, -0.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 2.0); - frame(lua_state, 10.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - FT_MOTION_RATE(fighter, 1.0); - - frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 2.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); } + wait(lua_state, 2.0); } -// Uses smash_script, if you prefer to use the built-in macros instead. - -unsafe extern "C" fn buddy_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - //Set control - VarModule::on_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); - VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); - VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); - let stick_y: f32 = ControlModule::get_stick_y(boma); - VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,stick_y.signum()); - if (stick_y.abs())<0.1 - { - VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); - } - //Clear gravity speed (prevents exponential movement from cliff jump) - sv_kinetic_energy!( - clear_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY - ); - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - - let shieldDamage = 4; - JostleModule::set_status( boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); - - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 16, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 17, *HIT_STATUS_NORMAL); - } - //Weaker hitbox - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } -unsafe extern "C" fn buddy_special_air_s_wall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - +unsafe extern "C" fn game_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); if (!has_hit_shield - && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) - { - CancelModule::enable_cancel(fighter.module_accessor); + && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) { + CancelModule::enable_cancel(boma); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); if (!has_hit_shield - && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) - { + && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } frame(lua_state, 19.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY)) - { - FT_MOTION_RATE(fighter, 1.0); //.75 - } - else - { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY)) { + FT_MOTION_RATE(agent, 1.0); //.75 + } else { + FT_MOTION_RATE(agent, 1.0); } } //frame(lua_state, 42.0); - //FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 1.0); frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } -unsafe extern "C" fn buddy_special_air_s_wall_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); let lr = PostureModule::lr(boma)==0.0; - let size = if (has_hit_shield) {0.5} else {0.75}; let xRot = if (lr) {-90.0} else {90.0}; let yRot = if (lr) {0.0} else {180.0}; + if is_excute(agent) { + EFFECT(agent, Hash40::new("buddy_special_s_wall"), Hash40::new("top"), 5, 12.5, 0, xRot, yRot, 0, size, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_SCATTER, Hash40::new("top"), -7, 12.5, 0, xRot, yRot, 0, 1, false); + } +} - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("buddy_special_s_wall"), Hash40::new("top"), 5, 12.5, 0, xRot, yRot, 0, size, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_SCATTER, Hash40::new("top"), -7, 12.5, 0, xRot, yRot, 0, 1, false); +unsafe extern "C" fn sound_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_m_01")); + } + frame(lua_state, 6.0); + if is_excute(agent) { + let play_vc = app::sv_math::rand(hash40("fighter"), 2); + if play_vc == 0 { + PLAY_SE(agent, Hash40::new("vc_buddy_missfoot02")); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_m_02")); } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_specialsdash", buddy_special_s_dash_game) - .acmd("game_specialnupperfire", buddy_attack_special_n_upperfire_game) - .acmd("game_specialnfire2", buddy_attack_special_n_fire2_game) - .acmd("expression_specialairsdash", buddy_special_air_s_dash_expression) - .acmd("effect_specialairsstart", buddy_special_air_s_start_effect) - .acmd("effect_specialairsdash", buddy_special_air_s_dash_effect) - .acmd("sound_specialairsstart", buddy_special_air_s_start_sound) - .acmd("sound_specialairsdash", buddy_special_air_s_dash_sound) - .acmd("sound_specialairswall", buddy_special_air_s_wall_sound) - .acmd("game_specialairsend", buddy_special_air_s_end_game) - .acmd("game_specialairsstart", buddy_special_air_s_start_game) - .acmd("game_specialairsdash", buddy_special_air_s_dash_game) - .acmd("game_specialairswall", buddy_special_air_s_wall_game) - .acmd("effect_specialairswall", buddy_special_air_s_wall_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnupperfire", game_specialnupperfire); + agent.acmd("game_specialnfire2", game_specialnfire2); + + agent.acmd("game_specialsdash", game_specialsdash); + + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("sound_specialairsstart", sound_specialairsstart); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("effect_specialairsdash", effect_specialairsdash); + agent.acmd("sound_specialairsdash", sound_specialairsdash); + agent.acmd("expression_specialairsdash", expression_specialairsdash); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialairswall", game_specialairswall); + agent.acmd("effect_specialairswall", effect_specialairswall); + agent.acmd("sound_specialairswall", sound_specialairswall); } \ No newline at end of file diff --git a/fighters/buddy/src/acmd/throws.rs b/fighters/buddy/src/acmd/throws.rs index 25f318b012..aa48320fd6 100644 --- a/fighters/buddy/src/acmd/throws.rs +++ b/fighters/buddy/src/acmd/throws.rs @@ -1,26 +1,26 @@ use super::*; -unsafe extern "C" fn buddy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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); + if is_excute(agent) { + CATCH(agent, 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); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn buddy_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -60,162 +60,161 @@ unsafe extern "C" fn buddy_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 52, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 52, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("k_footr"), 6.0, 64, 34, 0, 82, 4.6, 2.8, 2.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("k_footr"), 6.0, 64, 34, 0, 82, 4.6, 2.8, 2.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 2); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn buddy_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 80, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 80, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 8.0, 50, 70, 0, 100, 4.0, 7.0, 0.0, 0.0, Some(8.0), Some(-6.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 8.0, 50, 70, 0, 100, 4.0, 7.0, 0.0, 0.0, Some(8.0), Some(-6.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 20, 3); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 20, 3); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn buddy_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 104, 64, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 104, 64, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 361, 100, 0, 10, 4.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 361, 100, 0, 10, 4.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -1, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -1, 18); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 56.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn buddy_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 25.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 25.0, 10.0); frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.25); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.25); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn buddy_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18, 6, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18, 6, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("buddy_attack_arc_b"), Hash40::new("buddy_attack_arc_b"), Hash40::new("top"), 3, 10, 1.5, 30, -20, -90, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("buddy_attack_arc_b"), Hash40::new("buddy_attack_arc_b"), Hash40::new("top"), 3, 10, 1.5, 30, -20, -90, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 33.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 10, 0, 1, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 10, 0, 1, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn buddy_throw_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_jump01")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_03")); } frame(lua_state, 34.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_l")); - PLAY_SE(fighter, Hash40::new("se_common_down_m_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_kick_hit_l")); + PLAY_SE(agent, Hash40::new("se_common_down_m_01")); } } -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) - .acmd("game_throwlw", buddy_throw_lw_game) - .acmd("effect_throwlw", buddy_throw_lw_effect) - .acmd("sound_throwlw", buddy_throw_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); + agent.acmd("sound_throwlw", sound_throwlw); } diff --git a/fighters/buddy/src/acmd/tilts.rs b/fighters/buddy/src/acmd/tilts.rs index c5d80baa05..94a06431ae 100644 --- a/fighters/buddy/src/acmd/tilts.rs +++ b/fighters/buddy/src/acmd/tilts.rs @@ -1,265 +1,263 @@ use super::*; -unsafe extern "C" fn buddy_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_hi"), false, 0.0); + ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_s"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.2, 0.0, 14.2, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 46, 2.6, 0.0, 16.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.6, 0.0, 12.4, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.2, 0.0, 7.2, 13.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 45, 71, 0, 46, 2.6, 0.0, 7.2, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.6, 0.0, 7.2, 7.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn buddy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_s"), false, 0.0); + ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_hi"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.2, 0.0, 7.2, 13.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 45, 71, 0, 46, 2.6, 0.0, 7.2, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.6, 0.0, 7.2, 7.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.2, 0.0, 14.2, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 46, 2.6, 0.0, 16.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.6, 0.0, 12.4, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn buddy_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_lw"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.2, 0.0, 2.8, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 71, 0, 46, 2.6, 0.0, 1.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.6, 0.0, 4.2, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.2, 0.0, 2.8, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 71, 0, 46, 2.6, 0.0, 1.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.6, 0.0, 4.2, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn buddy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //Banjo// - ATTACK(fighter, 0, 0, Hash40::new("handl"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.5, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.5, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 6.25, -7.5, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 6.25, -7.5, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 16.0, -4.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 16.0, -4.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("k_wingr4"), 6.5, 82, 50, 0, 73, 4.8, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("k_wingr4"), 6.5, 82, 50, 0, 73, 4.8, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //Banjo// - ATTACK(fighter, 0, 0, Hash40::new("handl"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } //Remove kazooie hitbox frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma,2,false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn buddy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("buddy_attack100"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("buddy_attack100"), false, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); //Banjo - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 4, 11.5, 6, 0, 4, 115, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter,1.4); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 4, 11.5, 6, 0, 4, 115, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent,1.4); //Kazooie - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -0.25, 14, 1.5, 180, 4, 76, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter,1.4); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -0.25, 14, 1.5, 180, 4, 76, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent,1.4); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.3, 0); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.3, 0); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.35, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.35, 0.1); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.2, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.5); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.2, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.2, 0.35); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.35, 0.35, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.35); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.3, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.3, 0.1); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 1, 0.2, 0.2); + LAST_EFFECT_SET_COLOR(agent, 1, 0.2, 0.2); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.05, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.05, 0.1); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 3, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 3, 0, 0, 0, 0, 0, 0.9, true); } - } -unsafe extern "C" fn buddy_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; //frame(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_buddy_attack100_01")); - PLAY_SE(fighter, Hash40::new("se_buddy_attack100_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_buddy_attack100_01")); + PLAY_SE(agent, Hash40::new("se_buddy_attack100_02")); } frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_attack100_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_attack100_03")); } } -unsafe extern "C" fn buddy_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn buddy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let slide_speed = 0.9; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0 / 1.571); // originally was MotionModule::set_rate, but let's use the lua macros for consistency + FT_MOTION_RATE(agent, 1.0 / 1.571); // originally was MotionModule::set_rate, but let's use the lua macros for consistency frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); KineticModule::add_speed(boma, &Vector3f::new(slide_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 59, 3.9, 0.0, 4.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 59, 3.9, 0.0, 4.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 90, 67, 0, 73, 3.5, 0.0, 3.9, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 90, 67, 0, 73, 3.5, 0.0, 3.9, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 17.5); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); wait(lua_state, 1.0); for _ in 0..20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new((-1.0*slide_speed)/20.0, 0.0, 0.0)); } wait(lua_state, 1.0); } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attacks3hi", buddy_attack_s3_hi_game) - .acmd("game_attacks3", buddy_attack_s3_s_game) - .acmd("game_attacks3lw", buddy_attack_s3_lw_game) - .acmd("game_attackhi3", buddy_attack_hi3_game) - .acmd("effect_attackhi3", buddy_attack_hi3_effect) - .acmd("sound_attackhi3", buddy_attack_hi3_sound) - .acmd("expression_attackhi3", buddy_attack_hi3_expression) - .acmd("game_attacklw3", buddy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/buddy/src/bullet/acmd.rs b/fighters/buddy/src/bullet/acmd.rs new file mode 100644 index 0000000000..8dd1c43a24 --- /dev/null +++ b/fighters/buddy/src/bullet/acmd.rs @@ -0,0 +1,50 @@ +use super::*; + +unsafe extern "C" fn game_bakyun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.7, 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_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + //AttackModule::set_add_reaction_frame(boma, 0, 6, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, 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_PUNCH, *ATTACK_REGION_OBJECT); + //AttackModule::set_add_reaction_frame(boma, 0, 6, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 361, 8, 0, 8, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.9, 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_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 361, 6, 0, 8, 2.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_missile(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); + GroundModule::set_offset_y(boma, -1.0); + + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 361, 20, 0, 52, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 361, 20, 0, 46, 3.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 40.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.8, 361, 20, 0, 40, 2.8, 0.0, 0.0, 0.0, None, None, None, 0.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_bakyun", game_bakyun); + agent.acmd("game_missile", game_missile); +} diff --git a/fighters/buddy/src/bullet/mod.rs b/fighters/buddy/src/bullet/mod.rs new file mode 100644 index 0000000000..8d8f6f911f --- /dev/null +++ b/fighters/buddy/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("buddy_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/buddy/src/lib.rs b/fighters/buddy/src/lib.rs index c033917585..ede6b45794 100644 --- a/fighters/buddy/src/lib.rs +++ b/fighters/buddy/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bullet; +mod pad; use smash::{ lib::{ @@ -37,9 +42,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; + +static mut BAYONET_EGGS:[i32;8] = [0; 8]; //I have no idea why varmod doesn't work with this, so this will have to do pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("buddy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bullet::install(); + pad::install(); } \ No newline at end of file diff --git a/fighters/buddy/src/opff.rs b/fighters/buddy/src/opff.rs index 749a6b035f..645c6b4b4e 100644 --- a/fighters/buddy/src/opff.rs +++ b/fighters/buddy/src/opff.rs @@ -5,8 +5,6 @@ const HUD_DISPLAY_TIME_MAX: i32 = 90; const FEATHERS_RED_COOLDOWN_GROUND_RATE: f32 = 1.25; const FEATHERS_RED_COOLDOWN_MAX: f32 = 450.0; const BEAKBOMB_END_FRAME: i32 = 25; //Dash timer is shared between ground and air in vl.prc - -static mut BAYONET_EGGS:[i32;8] = [0; 8]; //I have no idea why varmod doesn't work with this, so this will have to do utils::import_noreturn!(common::opff::fighter_common_opff); @@ -140,7 +138,6 @@ unsafe fn beakbomb_checkForCancel(fighter: &mut L2CFighterCommon, boma: &mut Bat { fighter.change_status_req(*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_END, true); } - } unsafe fn beakbomb_control(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor){ @@ -159,8 +156,8 @@ unsafe fn beakbomb_control(fighter: &mut L2CFighterCommon, boma: &mut BattleObje let motion_offset = -0.125; let motion_vec = Vector3f{x: 0.0, y: motion_offset+(VarModule::get_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE)*motion_factor), z: 0.0}; KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &motion_vec); - } + unsafe fn beakbomb_update(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor,status: i32){ let sideSpecial = [ *FIGHTER_STATUS_KIND_SPECIAL_S, @@ -194,7 +191,6 @@ unsafe fn beakbomb_update(fighter: &mut L2CFighterCommon, boma: &mut BattleObjec { VarModule::off_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); } - } //Check to see if Banjo hit a shield during beakbomb. @@ -258,7 +254,6 @@ unsafe fn beakbomb_checkForGround(fighter: &mut L2CFighterCommon, boma: &mut Bat { fighter.change_status_req(*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_END, true); } - } unsafe fn breegull_bayonet(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor,status: i32){ @@ -444,7 +439,6 @@ unsafe fn training_reset(fighter: &mut L2CFighterCommon,boma: &mut BattleObjectM } } } - } // upB freefalls after one use per airtime @@ -535,14 +529,6 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod } } -extern "C" fn buddy_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - on_rebirth(fighter, boma); - } -} - pub unsafe extern "C" fn buddy_frame_wrapper(fighter: &mut L2CFighterCommon) { common::opff::fighter_common_opff(fighter); buddy_frame(fighter); @@ -554,9 +540,6 @@ pub unsafe fn buddy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("buddy") - .on_start(buddy_reset) - .on_line(Main, buddy_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, buddy_frame_wrapper); } diff --git a/fighters/buddy/src/pad/acmd.rs b/fighters/buddy/src/pad/acmd.rs new file mode 100644 index 0000000000..9317beb319 --- /dev/null +++ b/fighters/buddy/src/pad/acmd.rs @@ -0,0 +1,39 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let pad_length = 6.0; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 70, 0, 40, 2.0, 0.0, 2.2, pad_length, Some(0.0), Some(2.2), Some(-pad_length), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } + //Vanilla code from here on out + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); + } + frame(lua_state, 23.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); + } + frame(lua_state, 26.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 42.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/buddy/src/pad/mod.rs b/fighters/buddy/src/pad/mod.rs new file mode 100644 index 0000000000..4b9d70d7d9 --- /dev/null +++ b/fighters/buddy/src/pad/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("buddy_pad"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/buddy/src/status/bayonet_end.rs b/fighters/buddy/src/status/bayonet_end.rs new file mode 100644 index 0000000000..dcd07c83f1 --- /dev/null +++ b/fighters/buddy/src/status/bayonet_end.rs @@ -0,0 +1,82 @@ +use super::*; + +// BUDDY_BAYONET_END + +/// pre status for bayonet +/// handles initialization +pub unsafe extern "C" fn bayonet_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_GROUND), + *FIGHTER_KINETIC_TYPE_MOTION_BIND, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, + 0 + ); + + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + 0, + 0, + 0, + 0 + ); + + 0.into() +} + +/// main status loop for bayonet_end +unsafe extern "C" fn bayonet_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + // exit if the animation is not done yet + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + + // if the animation is over, transition to shoot + fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); + 1.into() +} + +pub unsafe extern "C" fn bayonet_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + // change summon anim depending on LR + let frame = 26.0; + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_shoot_start"), frame, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("special_n_start"), false, frame); + + fighter.main_shift(bayonet_end_main_loop) +} + +pub unsafe extern "C" fn bayonet_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { + // re-enable energies and remove the screenwide effect + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + let next_status = StatusModule::status_kind_next(fighter.module_accessor); + let is_still_blasting = [*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_F,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_B, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_SQUAT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_LANDING, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_AERIAL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_FALL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_END].contains(&next_status); + + if !is_still_blasting { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, ArticleOperationTarget(0)); + ItemModule::set_change_status_event(fighter.module_accessor, true); + WorkModule::set_int(fighter.module_accessor, 0,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_pre); + agent.status(Main, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_main); + agent.status(End, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_end); +} \ No newline at end of file diff --git a/fighters/buddy/src/status/mod.rs b/fighters/buddy/src/status/mod.rs new file mode 100644 index 0000000000..e53064638f --- /dev/null +++ b/fighters/buddy/src/status/mod.rs @@ -0,0 +1,49 @@ +use super::*; +use globals::*; +// status script import + +mod run; +mod special_s; +mod bayonet_end; + +/// Re-enables the ability to use aerial specials when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)){ + VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); + } + return true.into(); +} + +//Called on rebirth and entry +unsafe fn on_rebirth(fighter: &mut L2CFighterCommon,boma: &mut BattleObjectModuleAccessor) { + let entry = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + + VarModule::off_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); + VarModule::off_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); + + VarModule::set_int(boma.object(), vars::buddy::instance::HUD_DISPLAY_TIME,60); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BAYONET_EGGS,0); + BAYONET_EGGS[entry]=0; + + VarModule::set_float(boma.object(), vars::buddy::instance::FEATHERS_RED_COOLDOWN,0.0); + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + + let lua_state = fighter.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + on_rebirth(fighter, boma); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + run::install(agent); + special_s::install(agent); + bayonet_end::install(agent); +} \ No newline at end of file diff --git a/fighters/buddy/src/status/run.rs b/fighters/buddy/src/status/run.rs new file mode 100644 index 0000000000..08c447aeb7 --- /dev/null +++ b/fighters/buddy/src/status/run.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_STATUS_KIND_RUN + +pub unsafe extern "C" fn run_end(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::remove_motion_partial(fighter.module_accessor, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, false); + fighter.status_end_Run(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_RUN, run_end); +} \ No newline at end of file diff --git a/fighters/buddy/src/status.rs b/fighters/buddy/src/status/special_s.rs similarity index 54% rename from fighters/buddy/src/status.rs rename to fighters/buddy/src/status/special_s.rs index 99539d46ce..d789d4c7e4 100644 --- a/fighters/buddy/src/status.rs +++ b/fighters/buddy/src/status/special_s.rs @@ -1,24 +1,16 @@ use super::*; -use globals::*; -// status script import +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn end_run(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::remove_motion_partial(fighter.module_accessor, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, false); - fighter.status_end_Run(); - 0.into() -} - -pub unsafe extern "C" fn buddy_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if (fighter.is_situation(*SITUATION_KIND_GROUND) ) - { - let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); - if feathers_g <= 0 { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); - PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); - return 1.into(); +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if (fighter.is_situation(*SITUATION_KIND_GROUND) ) { + let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); + if feathers_g <= 0 { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); + PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); + return 1.into(); + } } -} if (fighter.is_situation(*SITUATION_KIND_AIR) ) { @@ -68,7 +60,7 @@ pub unsafe extern "C" fn buddy_special_s_pre(fighter: &mut L2CFighterCommon) -> return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter); } -unsafe extern "C" fn buddy_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); //Bypass if transitioning into Air Fail if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -87,18 +79,18 @@ unsafe extern "C" fn buddy_special_s_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_set_ground_correct_by_situation(false.into()); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - fighter.sub_shift_status_main(L2CValue::Ptr(buddy_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn buddy_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { /* if fighter.sub_transition_group_check_air_cliff().get_bool() { return 0.into(); }*/ fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_s").into()); - buddy_special_s_armor(fighter); + special_s_armor(fighter); if MotionModule::is_end(fighter.module_accessor) { fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH.into(), false.into()); @@ -106,7 +98,8 @@ unsafe extern "C" fn buddy_special_s_main_loop(fighter: &mut L2CFighterCommon) - } 0.into() } -unsafe extern "C" fn buddy_special_s_armor(fighter: &mut L2CFighterCommon) { + +unsafe extern "C" fn special_s_armor(fighter: &mut L2CFighterCommon) { let needsarmor_on = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); let needsarmor_off = !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); if needsarmor_on { @@ -119,7 +112,9 @@ unsafe extern "C" fn buddy_special_s_armor(fighter: &mut L2CFighterCommon) { } } -pub unsafe extern "C" fn buddy_special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ +// FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH + +pub unsafe extern "C" fn special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ if (fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR)) { fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); @@ -157,7 +152,7 @@ pub unsafe extern "C" fn buddy_special_s_dash_pre(fighter: &mut L2CFighterCommon return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); } -unsafe extern "C" fn buddy_special_s_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); } @@ -167,7 +162,9 @@ unsafe extern "C" fn buddy_special_s_dash_main(fighter: &mut L2CFighterCommon) - return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); } -pub unsafe extern "C" fn buddy_special_s_fail_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ +// FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL + +pub unsafe extern "C" fn special_s_fail_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ if (fighter.is_situation(*SITUATION_KIND_AIR)) { if VarModule::is_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED) @@ -195,106 +192,12 @@ pub unsafe extern "C" fn buddy_special_s_fail_pre(fighter: &mut L2CFighterCommon return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL)(fighter); } -/// pre status for bayonet -/// handles initialization -pub unsafe extern "C" fn bayonet_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_GROUND), - *FIGHTER_KINETIC_TYPE_MOTION_BIND, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, - 0 - ); - - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - 0, - 0, - 0, - 0 - ); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); - 0.into() -} - -/// main status loop for bayonet_end -unsafe extern "C" fn bayonet_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - // exit if the animation is not done yet - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - - // if the animation is over, transition to shoot - fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); - 1.into() -} - -pub unsafe extern "C" fn bayonet_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { - // change summon anim depending on LR - let frame = 26.0; - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_shoot_start"), frame, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("special_n_start"), false, frame); - - fighter.main_shift(bayonet_end_main_loop) -} -pub unsafe extern "C" fn bayonet_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { - // re-enable energies and remove the screenwide effect - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - let next_status = StatusModule::status_kind_next(fighter.module_accessor); - let is_still_blasting = [*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_F,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_B, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_SQUAT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_LANDING, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_AERIAL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_FALL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_END].contains(&next_status); - - if !is_still_blasting { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, ArticleOperationTarget(0)); - ItemModule::set_change_status_event(fighter.module_accessor, true); - WorkModule::set_int(fighter.module_accessor, 0,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); - } - - 0.into() -} - -/// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)){ - VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); - } - return true.into(); -} - -extern "C" fn buddy_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } -} + agent.status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_pre); + agent.status(Main, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main); -pub fn install() { - smashline::Agent::new("buddy") - .status(End, *FIGHTER_STATUS_KIND_RUN, end_run) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, buddy_special_s_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, buddy_special_s_main) - .status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, buddy_special_s_dash_pre) - .status(Main, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, buddy_special_s_dash_main) - .status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL, buddy_special_s_fail_pre) - .on_start(buddy_init) - .install(); - smashline::Agent::new("buddy") - .status(Pre, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_pre) - .status(Main, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_main) - .status(End, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_end) - .install(); + agent.status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL, special_s_fail_pre); } \ No newline at end of file diff --git a/fighters/captain/src/acmd/aerials.rs b/fighters/captain/src/acmd/aerials.rs index 6be8332caf..3c63e12b73 100644 --- a/fighters/captain/src/acmd/aerials.rs +++ b/fighters/captain/src/acmd/aerials.rs @@ -1,269 +1,262 @@ - use super::*; -// x = into screen, y = up down, z = forward back - -unsafe extern "C" fn captain_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 4.5, 3.0, -148, -141, -3.0, 1.1, true, 0.7); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -5.0, -15.0, 5.0, 0.0, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.8); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - //EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 12.0, 14.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.5); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 6.0, -0.7, 0.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); - } -} - -unsafe extern "C" fn captain_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.7, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0.0, 15.0, 0.0, 90.0, 0.0, 0, 1.1, true, 0.75); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 15.0, 2.0, 90.0, 0.0, 0.0, 1.1, true, 0.75); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); - } -} - -unsafe extern "C" fn captain_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0.0, 10.0, 1.0, 0.0, 100.0, 90.0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - } -} - -unsafe extern "C" fn captain_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 7.75, 8.5, -20.0, 0.0, 0.0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 2.0, 7.75, 8.0, 0.0, 0.0, 0.0, 1.3, true); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("captain_at_thrust"), Hash40::new("top"), 0.0, 5.75, 2.0, -20.0, 10.0, 0.0, 0.85, true, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1); - } -} - -unsafe extern "C" fn captain_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 5.0/(9.1-7.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 82, 100, 45, 0, 5.5, 5.2, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 100, 45, 0, 6.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 74, 100, 45, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 5.0/(9.1-7.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 82, 100, 45, 0, 5.5, 5.2, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 100, 45, 0, 6.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 74, 100, 45, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.1); - FT_MOTION_RATE(fighter, 1.0/(10.0-9.1)); + FT_MOTION_RATE(agent, 1.0/(10.0-9.1)); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 5.0/(11.5-10.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(11.5-10.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.5); - FT_MOTION_RATE(fighter, (1.0)/(14.0-12.5)); + FT_MOTION_RATE(agent, (1.0)/(14.0-12.5)); frame(lua_state, 14.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.333); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 361, 92, 0, 55, 5.7, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 361, 92, 0, 55, 6.25, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 361, 92, 0, 55, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.333); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 361, 92, 0, 55, 5.7, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 361, 92, 0, 55, 6.25, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 361, 92, 0, 55, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 4.5, 3.0, -148, -141, -3.0, 1.1, true, 0.7); + //LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -5.0, -15.0, 5.0, 0.0, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 14.0); + if is_excute(agent) { + //EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 12.0, 14.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.5); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 6.0, -0.7, 0.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); + } +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_CAPTAIN_STATUS_ATTACK_AIR_WORK_INT_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 3.25, 0.1, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 4.5, 4.4, -0.2, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 3.25, 0.1, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 4.5, 4.4, -0.2, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 0.591); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.591); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CAPTAIN_STATUS_ATTACK_AIR_WORK_FLAG_CRITICAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 3.0, 1.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 4.0, 4.4, -0.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 3.0, 1.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 4.0, 4.4, -0.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_captain_swing_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_captain_rnd_attack")); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 7.75, 8.5, -20.0, 0.0, 0.0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 2.0, 7.75, 8.0, 0.0, 0.0, 0.0, 1.3, true); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("captain_at_thrust"), Hash40::new("top"), 0.0, 5.75, 2.0, -20.0, 10.0, 0.0, 0.85, true, 0.5); + LAST_EFFECT_SET_RATE(agent, 1); + } +} + +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_captain_swing_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_captain_rnd_attack")); } - } -unsafe extern "C" fn captain_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.0, -2.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.0, -2.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.0, -1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.0, -1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 361, 86, 0, 30, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 88, 0, 29, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 361, 86, 0, 30, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 88, 0, 29, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 30, 70, 0, 15, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 30, 70, 0, 15, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 30, 70, 0, 15, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 30, 70, 0, 15, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0.0, 10.0, 1.0, 0.0, 100.0, 90.0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + } +} + +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn captain_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); JostleModule::set_status(boma, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("footl"), 16.0, 270, 100, 0, 30, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 270, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 16.0, 290, 100, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("footl"), 16.0, 270, 100, 0, 30, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 270, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("bust"), 16.0, 290, 100, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 31, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 31, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("bust"), 16.0, 290, 56, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 31, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 31, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("bust"), 16.0, 290, 56, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("effect_attackairn", captain_attack_air_n_effect) - .acmd("effect_attackairlw", captain_attack_air_lw_effect) - .acmd("effect_attackairhi", captain_attack_air_hi_effect) - .acmd("effect_attackairf", captain_attack_air_f_effect) - .acmd("game_attackairn", captain_attack_air_n_game) - .acmd("game_attackairf", captain_attack_air_f_game) - .acmd("sound_attackairf", captain_attack_air_f_sound) - .acmd("game_attackairb", captain_attack_air_b_game) - .acmd("game_attackairhi", captain_attack_air_hi_game) - .acmd("expression_attackairhi", captain_attack_air_hi_expression) - .acmd("game_attackairlw", captain_attack_air_lw_game) - .install(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.7, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0.0, 15.0, 0.0, 90.0, 0.0, 0, 1.1, true, 0.75); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 15.0, 2.0, 90.0, 0.0, 0.0, 1.1, true, 0.75); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/captain/src/acmd/ground.rs b/fighters/captain/src/acmd/ground.rs index 3dab916675..acab336ada 100644 --- a/fighters/captain/src/acmd/ground.rs +++ b/fighters/captain/src/acmd/ground.rs @@ -1,140 +1,137 @@ - use super::*; -unsafe extern "C" fn captain_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 10.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.0, 0.0, 10.0, 8.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 20, 0, 30, 3.5, 0.0, 10.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 10.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.0, 0.0, 10.0, 8.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 20, 0, 30, 3.5, 0.0, 10.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn captain_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.5, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 4.0, 0.0, 9.0, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.5, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 4.0, 0.0, 9.0, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn captain_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 11.5, 3, 10, 12, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 11.5, 3, 10, 12, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 17.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 360, true, 0.5); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 17.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn captain_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 100, 0, 70, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 70, 3.8, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 100, 0, 70, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 70, 3.8, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 7.0, Some(0.0), Some(5.5), Some(7.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 13.5, Some(0.0), Some(5.5), Some(13.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 7.0, Some(0.0), Some(5.5), Some(7.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 13.5, Some(0.0), Some(5.5), Some(13.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 51, 80, 0, 70, 5.5, 0.0, 10.0, 8.5, Some(0.0), Some(8.0), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 51, 80, 0, 70, 4.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 51, 80, 0, 70, 5.5, 0.0, 10.0, 8.5, Some(0.0), Some(8.0), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 51, 80, 0, 70, 4.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 51, 80, 0, 70, 4.0, 0.0, 10.0, 9.5, Some(0.0), Some(6.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 51, 80, 0, 70, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 51, 80, 0, 70, 4.0, 0.0, 10.0, 9.5, Some(0.0), Some(6.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 51, 80, 0, 70, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); } frame(lua_state, 28.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attack11", captain_attack_11_game) - .acmd("game_attack12", captain_attack_12_game) - .acmd("effect_attack12", captain_attack_12_effect) - .acmd("game_attack13", captain_attack_13_game) - .acmd("game_attack100end", captain_attack_100_end_game) - .acmd("game_attackdash", captain_attack_dash_game) - .acmd("effect_attackdash", captain_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/captain/src/acmd/mod.rs b/fighters/captain/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/captain/src/acmd/mod.rs +++ b/fighters/captain/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/captain/src/acmd/other.rs b/fighters/captain/src/acmd/other.rs index 6f712cd717..4a3ce75f96 100644 --- a/fighters/captain/src/acmd/other.rs +++ b/fighters/captain/src/acmd/other.rs @@ -1,196 +1,119 @@ - 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_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_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(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_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_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_captain_rnd_futtobi01"), Hash40::new("seq_captain_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, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_captain_metal")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_captain_metal")); } wait(lua_state, 1.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_captain_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_captain_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, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_captain_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_captain_step_right_l")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_captain_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_captain_step_left_l")); } } -unsafe extern "C" fn captain_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, 16.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("captain") - .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", captain_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_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); } diff --git a/fighters/captain/src/acmd/smashes.rs b/fighters/captain/src/acmd/smashes.rs index 2928c345a5..156b35565f 100644 --- a/fighters/captain/src/acmd/smashes.rs +++ b/fighters/captain/src/acmd/smashes.rs @@ -1,164 +1,161 @@ - use super::*; -unsafe extern "C" fn captain_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 45, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0, 45, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 45, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0, 45, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 38, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 38, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0, 38, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0, 38, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 22.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 110, 90, 150, 0, 5.7, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 96, 90, 80, 0, 6.0, 0.0, 17.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 367, 90, 20, 30, 4.8, 0.0, 21.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 367, 90, 10, 8, 4.8, 0.0, 28.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 110, 90, 150, 0, 5.7, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 96, 90, 80, 0, 6.0, 0.0, 17.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 367, 90, 20, 30, 4.8, 0.0, 21.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 367, 90, 10, 8, 4.8, 0.0, 28.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_vec_target_pos(boma, 3, smash::phx::Hash40::new("top"), &Vector2f::new(0.0, 29.0), 7.5 as u32, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 83, 81, 0, 70, 6.0, 0.0, 29.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 85, 81, 0, 70, 5.5, 0.0, 21.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 89, 0, 70, 5.0, 0.0, 16.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 83, 81, 0, 70, 6.0, 0.0, 29.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 85, 81, 0, 70, 5.5, 0.0, 21.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 89, 0, 70, 5.0, 0.0, 16.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 14.0, 28, 95, 0, 30, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 14.0, 28, 95, 0, 30, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 18.0, 28, 90, 0, 20, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 18.0, 28, 90, 0, 20, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attacks4hi", captain_attack_s4_hi_game) - .acmd("game_attacks4", captain_attack_s4_s_game) - .acmd("game_attacks4lw", captain_attack_s4_lw_game) - .acmd("game_attackhi4", captain_attack_hi4_game) - .acmd("game_attacklw4", captain_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/captain/src/acmd/specials.rs b/fighters/captain/src/acmd/specials.rs index 5c42045f64..70ec98d7ac 100644 --- a/fighters/captain/src/acmd/specials.rs +++ b/fighters/captain/src/acmd/specials.rs @@ -1,397 +1,390 @@ - use super::*; -unsafe extern "C" fn captain_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 53.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_special_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 0.667); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.667); + if is_excute(agent) { PostureModule::reverse_lr(boma); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 28.0, 361, 65, 0, 85, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 28.0, 361, 65, 0, 85, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(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) { KineticModule::add_speed(boma, &Vector3f::new(0.0, 0.5, 0.0)); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 51.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_DIR_DECIDE); WorkModule::set_int(boma, 1, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.9, 2.4, 0.0)); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 69.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } - } -unsafe extern "C" fn captain_special_air_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 0.667); - if is_excute(fighter) { - REVERSE_LR(fighter); + FT_MOTION_RATE(agent, 0.667); + if is_excute(agent) { + REVERSE_LR(agent); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_DIR_DECIDE); WorkModule::set_int(boma, 1, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.9, 2.4, 0.0)); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } - } -unsafe extern "C" fn captain_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 4.0, 0.0, 12.0, 7.0, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 4.0, 0.0, 12.0, 7.0, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KNUCKLE_HIT_CHECK_ONOFF); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 0); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 0.0, 5.5); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KNUCKLE_HIT_CHECK_ONOFF); } - } -unsafe extern "C" fn captain_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, -2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, -2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.750); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.750); + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn captain_special_s_end_expression(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_TOP); +unsafe extern "C" fn expression_specialsend(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_TOP); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn captain_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 270, 28, 0, 59, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 2.5, -2.0, 0.0, 0.0, Some(-5.0), Some(0.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 270, 28, 0, 59, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 2.5, -2.0, 0.0, 0.0, Some(-5.0), Some(0.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.5, 2.5, 0.0)); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 60, 80, 0, 60, 4.0, 0.0, 8.0, 5.5, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 60, 80, 0, 60, 4.0, 0.0, 8.0, 5.5, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn captain_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.867); - frame(lua_state, 15.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.82); - frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KICK_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 15.0, 361, 57, 0, 80, 5.76, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + boma.select_cliff_hangdata_from_name("special_hi"); } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 13.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 13.0, 7.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.0, 0.0, 7.75, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_G); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 15.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 14.25, 5.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.0, 0.0, 11.0, 6.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); } -} - -unsafe extern "C" fn captain_special_air_lw_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_fk_hold"), Hash40::new("bust"), 0, 0, 0, 0, 0, 0, 0.7, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_fk_air"), Hash40::new("toel"), 1, 1, 0, 0, 0, 140, 0.45, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } -} - -unsafe extern "C" fn captain_special_air_lw_end_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, 0.790); + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 35, 0, 80, 4.8, 0.0, 2.0, 7.2, Some(0.0), Some(2.0), Some(-7.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); } - wait(lua_state, 2.0); - if is_excute(fighter) { + frame(lua_state, 31.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); } - + frame(lua_state, 36.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + } } -unsafe extern "C" fn game_specialhithrow(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 50, 62, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 8.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - CHECK_FINISH_CAMERA(fighter, 2, 1); +unsafe extern "C" fn game_specialhithrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 50, 62, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 8.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + CHECK_FINISH_CAMERA(agent, 2, 1); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: 3.0, z: 0.0}); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_THROW_FLAG_FALL); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 59.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - boma.select_cliff_hangdata_from_name("special_hi"); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 13.0, 7.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.0, 0.0, 7.75, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_G); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - } +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.867); frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 14.25, 5.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.0, 0.0, 11.0, 6.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.82); + frame(lua_state, 16.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KICK_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 15.0, 361, 57, 0, 80, 5.76, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(lua_state, 31.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 36.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +} + +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_fk_hold"), Hash40::new("bust"), 0, 0, 0, 0, 0, 0, 0.7, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_fk_air"), Hash40::new("toel"), 1, 1, 0, 0, 0, 140, 0.45, true); + EffectModule::enable_sync_init_pos_last(boma); + } +} + +unsafe extern "C" fn game_specialairlwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 35, 0, 80, 4.8, 0.0, 2.0, 7.2, Some(0.0), Some(2.0), Some(-7.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_specialn", captain_special_n_game) - .acmd("game_specialnturn", captain_special_n_turn_game) - .acmd("game_specialairn", captain_special_air_n_game) - .acmd("game_specialairnturn", captain_special_air_n_turn_game) - .acmd("game_specialsstart", captain_special_s_start_game) - .acmd("game_specialsend", captain_special_s_end_game) - .acmd("expression_specialsend", captain_special_s_end_expression) - .acmd("game_specialairsend", captain_special_air_s_end_game) - .acmd("game_specialairlw", captain_special_air_lw_game) - .acmd("effect_specialairlw", captain_special_air_lw_effect) - .acmd("game_specialairlwend", captain_special_air_lw_end_game) - .acmd("game_specialhithrow", game_specialhithrow) - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialhi", game_specialairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialnturn", game_specialnturn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialairnturn", game_specialairnturn); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("expression_specialsend", expression_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("game_specialhithrow", game_specialhithrow); + + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("game_specialairlwend", game_specialairlwend); } diff --git a/fighters/captain/src/acmd/throws.rs b/fighters/captain/src/acmd/throws.rs index 1f23020b9b..5db1c1252c 100644 --- a/fighters/captain/src/acmd/throws.rs +++ b/fighters/captain/src/acmd/throws.rs @@ -1,96 +1,90 @@ - use super::*; -unsafe extern "C" fn captain_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 captain_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 captain_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-16.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-16.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 85, 105, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 85, 105, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 80, 100, 0, 60, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 80, 100, 0, 60, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 32); + CHECK_FINISH_CAMERA(agent, 8, 32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.5, y: 12.75, z: 5.2 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_catch", captain_catch_game) - .acmd("game_catchdash", captain_catch_dash_game) - .acmd("game_catchturn", captain_catch_turn_game) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/captain/src/acmd/tilts.rs b/fighters/captain/src/acmd/tilts.rs index 38e6843f31..97a28cf4f1 100644 --- a/fighters/captain/src/acmd/tilts.rs +++ b/fighters/captain/src/acmd/tilts.rs @@ -1,156 +1,155 @@ - use super::*; -unsafe extern "C" fn captain_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.812); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.812); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 285, 90, 0, 30, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 285, 90, 0, 30, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 50, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 50, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 7, 11, -30, -84, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 7, 11, -30, -84, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 22.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn captain_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.778); + FT_MOTION_RATE(agent, 0.778); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 80, 75, 0, 46, 4.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 11.0, 80, 75, 0, 46, 5.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 25, 65, 0, 46, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 80, 75, 0, 46, 4.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 11.0, 80, 75, 0, 46, 5.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 25, 65, 0, 46, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -4, 5.5, 6, -9.2, -36, 175, 1.1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -4, 5.5, 6, -9.2, -36, 175, 1.1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attacks3hi", captain_attack_s3_hi_game) - .acmd("game_attacks3", captain_attack_s3_game) - .acmd("game_attacks3lw", captain_attack_s3_lw_game) - .acmd("game_attackhi3", captain_attack_hi3_game) - .acmd("effect_attackhi3", captain_attack_hi3_effect) - .acmd("game_attacklw3", captain_attack_lw3_game) - .acmd("effect_attacklw3", captain_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/captain/src/lib.rs b/fighters/captain/src/lib.rs index 71552adbad..faddf98c80 100644 --- a/fighters/captain/src/lib.rs +++ b/fighters/captain/src/lib.rs @@ -5,8 +5,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("captain"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/captain/src/opff.rs b/fighters/captain/src/opff.rs index 91a7fcad44..7fe83d50fd 100644 --- a/fighters/captain/src/opff.rs +++ b/fighters/captain/src/opff.rs @@ -78,8 +78,6 @@ pub unsafe extern "C" fn captain_frame_wrapper(fighter: &mut L2CFighterCommon) { fastfall_specials(fighter); } -pub fn install() { - smashline::Agent::new("captain") - .on_line(Main, captain_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, captain_frame_wrapper); } diff --git a/fighters/captain/src/status/mod.rs b/fighters/captain/src/status/mod.rs index 74ccd15388..b95c044be5 100644 --- a/fighters/captain/src/status/mod.rs +++ b/fighters/captain/src/status/mod.rs @@ -1,7 +1,9 @@ use super::*; +use globals::*; +// status script import mod special_lw; -pub fn install() { - special_lw::install(); +pub fn install(agent: &mut Agent) { + special_lw::install(agent); } \ No newline at end of file diff --git a/fighters/captain/src/status/special_lw.rs b/fighters/captain/src/status/special_lw.rs index 584ffae85a..87455c6794 100644 --- a/fighters/captain/src/status/special_lw.rs +++ b/fighters/captain/src/status/special_lw.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END unsafe extern "C" fn special_lw_end_init(fighter: &mut L2CFighterCommon) -> L2CValue { let start_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_KICK_START_SITUATION); @@ -23,9 +24,7 @@ unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CV ret } -pub fn install() { - smashline::Agent::new("captain") - .status(Init, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_init) - .status(Main, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_init); + agent.status(Main, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/aerials.rs b/fighters/chrom/src/acmd/aerials.rs index 821d6e9c1a..c5671ecd4c 100644 --- a/fighters/chrom/src/acmd/aerials.rs +++ b/fighters/chrom/src/acmd/aerials.rs @@ -1,200 +1,196 @@ - use super::*; -unsafe extern "C" fn chrom_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 4.0, 100, 50, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 4.0, 100, 50, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 55, 110, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 55, 110, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 55, 110, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 55, 110, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.1); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn chrom_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.545); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.545); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 45, 95, 0, 43, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 45, 95, 0, 43, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 45, 95, 0, 43, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 45, 95, 0, 43, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn chrom_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0 , 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0 , 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn chrom_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 7.0, 65, 110, 0, 45, 2.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 65, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 7.0, 65, 110, 0, 45, 2.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 65, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 7.0, 80, 110, 0, 42, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 80, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 7.0, 80, 110, 0, 42, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 80, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn chrom_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); // Second frame of dair may have interpolation issues } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.0, 0.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.5, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.0, 0.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.5, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); // First to fourth frame of sourspot may have interpolation issues } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attackairn", chrom_attack_air_n_game) - .acmd("game_attackairf", chrom_attack_air_f_game) - .acmd("expression_attackairf", chrom_attack_air_f_expression) - .acmd("game_attackairb", chrom_attack_air_b_game) - .acmd("game_attackairhi", chrom_attack_air_hi_game) - .acmd("game_attackairlw", chrom_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/chrom/src/acmd/ground.rs b/fighters/chrom/src/acmd/ground.rs index d5ee6e3b69..1206c4fae7 100644 --- a/fighters/chrom/src/acmd/ground.rs +++ b/fighters/chrom/src/acmd/ground.rs @@ -1,43 +1,39 @@ - use super::*; -unsafe extern "C" fn chrom_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 64, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 64, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 11.0, 43, 91, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 11.0, 43, 91, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attack11", chrom_attack_11_game) - .acmd("game_attackdash", chrom_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/chrom/src/acmd/mod.rs b/fighters/chrom/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/chrom/src/acmd/mod.rs +++ b/fighters/chrom/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index 497c0e1f3c..0edb50ef46 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -1,214 +1,136 @@ - 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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_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(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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_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_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_chrom_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_chrom_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_chrom_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_chrom_step_right_l")); } } -unsafe extern "C" fn 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 chrom_appeallw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::AppealHi) { - VarModule::on_flag(fighter.battle_object, vars::chrom::instance::TRAIL_EFFECT); + VarModule::on_flag(agent.battle_object, vars::chrom::instance::TRAIL_EFFECT); } } - } -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("chrom") - .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("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_appeallwl", chrom_appeallw_game) - .acmd("game_appeallwr", chrom_appeallw_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_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwl); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/chrom/src/acmd/smashes.rs b/fighters/chrom/src/acmd/smashes.rs index b6a51b1fa7..1edb704f8e 100644 --- a/fighters/chrom/src/acmd/smashes.rs +++ b/fighters/chrom/src/acmd/smashes.rs @@ -1,149 +1,146 @@ - use super::*; -unsafe extern "C" fn chrom_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 3.0/(13.2-10.0)); + FT_MOTION_RATE(agent, 3.0/(13.2-10.0)); frame(lua_state, 13.2); - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 17.0, 361, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 17.0, 361, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn chrom_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 98, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 90, 98, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 98, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 90, 98, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0/(6.1-5.0)); + FT_MOTION_RATE(agent, 1.0/(6.1-5.0)); frame(lua_state, 6.1); - FT_MOTION_RATE(fighter, 3.0/(8.5-6.1)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 50, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(8.5-6.1)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 50, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.5); - FT_MOTION_RATE(fighter, 1.0/(9.0-8.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(9.0-8.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 45, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 45, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attacks4", chrom_attack_s4_s_game) - .acmd("expression_attacks4", chrom_attack_s4_s_expression) - .acmd("game_attackhi4", chrom_attack_hi4_game) - .acmd("game_attacklw4", chrom_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/chrom/src/acmd/specials.rs b/fighters/chrom/src/acmd/specials.rs index 934f2739f9..129b3fa6cb 100644 --- a/fighters/chrom/src/acmd/specials.rs +++ b/fighters/chrom/src/acmd/specials.rs @@ -1,922 +1,636 @@ - use super::*; //Need to match up explosion effect more accurately -unsafe extern "C" fn chrom_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 2.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_special_n_end_expression(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); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); +unsafe extern "C" fn expression_specialnend(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); + //AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } //All levels need to match hitbox placements of level 1 Neutral B -unsafe extern "C" fn chrom_special_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_special_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 2.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.5); + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_special_air_n_end_expression(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); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); +unsafe extern "C" fn expression_specialairnend(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); + //AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn chrom_special_air_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 65, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 65, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_special_air_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 272, 50, 0, 60, 15, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 272, 50, 0, 60, 15, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 272, 75, 0, 60, 35, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 272, 75, 0, 60, 35, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn chrom_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - } -unsafe extern "C" fn chrom_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn chrom_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn chrom_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - -} - -unsafe extern "C" fn chrom_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - } -unsafe extern "C" fn chrom_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), 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) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); + COL_NORMAL(agent); } - -} - -unsafe extern "C" fn chrom_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - COL_NORMAL(fighter); - } - } -unsafe extern "C" fn game_specialhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(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) { boma.select_cliff_hangdata_from_name("special_hi"); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(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) { boma.select_cliff_hangdata_from_name("special_hi"); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 70, 30, 0, 120, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 270, 102, 0, 40, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 70, 30, 0, 120, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 270, 102, 0, 40, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); //AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.5, 270, 102, 0, 40, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.5, 270, 102, 0, 40, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ADD_SPEED_NO_LIMIT(fighter, 0, -1.5); + if is_excute(agent) { + ADD_SPEED_NO_LIMIT(agent, 0, -1.5); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 68.0, 39.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } } -unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -927,45 +641,46 @@ unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_specialnend", chrom_special_n_end_game) - .acmd("expression_specialnend", chrom_special_n_end_expression) - .acmd("game_specialnend2", chrom_special_n_end2_game) - .acmd("game_specialnend3", chrom_special_n_end3_game) - .acmd("game_specialairnend", chrom_special_air_n_end_game) - .acmd("expression_specialairnend", chrom_special_air_n_end_expression) - .acmd("game_specialairnend2", chrom_special_air_n_end2_game) - .acmd("game_specialairnend3", chrom_special_air_n_end3_game) - .acmd("effect_specials1", chrom_special_s1_effect) - .acmd("effect_specialairs1", chrom_special_air_s1_effect) - .acmd("effect_specials2hi", chrom_special_s2_hi_effect) - .acmd("effect_specialairs2hi", chrom_special_air_s2_hi_effect) - .acmd("effect_specials2lw", chrom_special_s2_lw_effect) - .acmd("effect_specialairs2lw", chrom_special_air_s2_lw_effect) - .acmd("effect_specials3hi", chrom_special_s3_hi_effect) - .acmd("effect_specialairs3hi", chrom_special_air_s3_hi_effect) - .acmd("effect_specials3s", chrom_special_s3_s_effect) - .acmd("effect_specialairs3s", chrom_special_air_s3_s_effect) - .acmd("effect_specials3lw", chrom_special_s3_lw_effect) - .acmd("effect_specialairs3lw", chrom_special_air_s3_lw_effect) - .acmd("effect_specials4hi", chrom_special_s4_hi_effect) - .acmd("effect_specialairs4hi", chrom_special_air_s4_hi_effect) - .acmd("effect_specials4s", chrom_special_s4_s_effect) - .acmd("effect_specialairs4s", chrom_special_air_s4_s_effect) - .acmd("effect_specials4lw", chrom_special_s4_lw_effect) - .acmd("effect_specialairs4lw", chrom_special_air_s4_lw_effect) - .acmd("game_specialhi2", game_specialhi2) - .acmd("game_specialairhi2", game_specialairhi2) - .acmd("game_specialhi3", game_specialhi3) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwhit", game_speciallwhit) - .acmd("game_specialairlwhit", game_speciallwhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("expression_specialnend", expression_specialnend); + agent.acmd("game_specialnend2", game_specialnend2); + agent.acmd("game_specialnend3", game_specialnend3); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("expression_specialairnend", expression_specialairnend); + agent.acmd("game_specialairnend2", game_specialairnend2); + agent.acmd("game_specialairnend3", game_specialairnend3); + + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } diff --git a/fighters/chrom/src/acmd/throws.rs b/fighters/chrom/src/acmd/throws.rs index 8185359437..f0e8ed63aa 100644 --- a/fighters/chrom/src/acmd/throws.rs +++ b/fighters/chrom/src/acmd/throws.rs @@ -1,27 +1,26 @@ use super::*; -unsafe extern "C" fn chrom_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 chrom_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -45,7 +44,7 @@ unsafe extern "C" fn chrom_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn chrom_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,10 +64,8 @@ unsafe extern "C" fn chrom_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_catch", chrom_catch_game) - .acmd("game_catchdash", chrom_catch_dash_game) - .acmd("game_catchturn", chrom_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/tilts.rs b/fighters/chrom/src/acmd/tilts.rs index 8ec14b28d4..93e8cc2fbc 100644 --- a/fighters/chrom/src/acmd/tilts.rs +++ b/fighters/chrom/src/acmd/tilts.rs @@ -1,128 +1,125 @@ - use super::*; -unsafe extern "C" fn chrom_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(7.5-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.5-1.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); } frame(lua_state, 7.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 11.0, 40, 108, 0, 45, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 11.0, 40, 108, 0, 45, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0/(11.0-10.25)); + FT_MOTION_RATE(agent, 1.0/(11.0-10.25)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.5-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.5-1.0)); frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0/(6.0-5.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 4.0, 5.0, -2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 5.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0/(6.0-5.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 4.0, 5.0, -2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 5.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 75, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 75, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 75, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 75, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn chrom_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 30, 40, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 24, 40, 0, 66, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 102, 40, 0, 75, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 75, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 30, 40, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 24, 40, 0, 66, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 102, 40, 0, 75, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 75, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attacks3", chrom_attack_s3_s_game) - .acmd("expression_attacks3", chrom_attack_s3_s_expression) - .acmd("game_attackhi3", chrom_attack_hi3_game) - .acmd("expression_attackhi3", chrom_attack_hi3_expression) - .acmd("game_attacklw3", chrom_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/chrom/src/lib.rs b/fighters/chrom/src/lib.rs index 69c57e700e..cd2502d225 100644 --- a/fighters/chrom/src/lib.rs +++ b/fighters/chrom/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -36,9 +36,12 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("chrom"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/chrom/src/opff.rs b/fighters/chrom/src/opff.rs index 9149e10b9e..d8a0f61f21 100644 --- a/fighters/chrom/src/opff.rs +++ b/fighters/chrom/src/opff.rs @@ -246,8 +246,6 @@ pub unsafe extern "C" fn chrom_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFi sword_length(&mut *(fighter.module_accessor)); } -pub fn install() { - smashline::Agent::new("chrom") - .on_line(Main, chrom_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, chrom_frame_wrapper); } diff --git a/fighters/chrom/src/status/mod.rs b/fighters/chrom/src/status/mod.rs new file mode 100644 index 0000000000..3e8058434a --- /dev/null +++ b/fighters/chrom/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); +} \ No newline at end of file diff --git a/fighters/chrom/src/status.rs b/fighters/chrom/src/status/special_s.rs similarity index 96% rename from fighters/chrom/src/status.rs rename to fighters/chrom/src/status/special_s.rs index 93d499ad7e..ab407c95f5 100644 --- a/fighters/chrom/src/status.rs +++ b/fighters/chrom/src/status/special_s.rs @@ -1,14 +1,6 @@ use super::*; -use globals::*; -// status script import - -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); @@ -84,8 +76,14 @@ pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("chrom") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .install(); + +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/aerials.rs b/fighters/cloud/src/acmd/aerials.rs index 98e07a9cc7..6c67b40024 100644 --- a/fighters/cloud/src/acmd/aerials.rs +++ b/fighters/cloud/src/acmd/aerials.rs @@ -1,289 +1,285 @@ - use super::*; -unsafe extern "C" fn cloud_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 11.0/(19.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 45, 95, 0, 40, 4.0, 3.0, 13.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.05); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 0.05); + FT_MOTION_RATE(agent, 11.0/(19.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 45, 95, 0, 40, 4.0, 3.0, 13.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.05); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 0.05); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } - } -unsafe extern "C" fn cloud_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0/(17.4-16.0)); + FT_MOTION_RATE(agent, 1.0/(17.4-16.0)); frame(lua_state, 17.4); - FT_MOTION_RATE(fighter, 3.0/(19.0-17.4)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 0.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(19.0-17.4)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 0.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 77.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 cloud_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(10.5-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(10.5-6.0)); } frame(lua_state, 10.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(14.0-10.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 13.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(14.0-10.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 13.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn cloud_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 78, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 78, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn cloud_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_cloud_sword3"), Hash40::new("tex_cloud_sword4"), 3, Hash40::new("haver"), 0.0, 1.5, -1.2, Hash40::new("haver"), 0.0, 20.5, -1.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_cloud_sword3"), Hash40::new("tex_cloud_sword4"), 3, Hash40::new("haver"), 0.0, 1.5, -1.2, Hash40::new("haver"), 0.0, 20.5, -1.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, 0.14); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, 0.14); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } } -unsafe extern "C" fn cloud_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 270, 71, 0, 10, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 270, 71, 0, 10, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 13.0, 270, 105, 0, 30, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 13.0, 270, 105, 0, 30, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } wait(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, 0.5); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("cloud_speedline"), Hash40::new("haver"), 0, 4, 0, -90, 0, 0, 0.8, true); - LAST_EFFECT_SET_COLOR(fighter, 0.627, 1, 0.674); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("cloud_speedline"), Hash40::new("haver"), 0, 4, 0, -90, 0, 0, 0.8, true); + LAST_EFFECT_SET_COLOR(agent, 0.627, 1, 0.674); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, true, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, true, true); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attackairn", cloud_attack_air_n_game) - .acmd("game_attackairf", cloud_attack_air_f_game) - .acmd("expression_attackairf", cloud_attack_air_f_expression) - .acmd("game_attackairb", cloud_attack_air_b_game) - .acmd("expression_attackairb", cloud_attack_air_b_expression) - .acmd("game_attackairhi", cloud_attack_air_hi_game) - .acmd("expression_attackairhi", cloud_attack_air_hi_expression) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", cloud_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/cloud/src/acmd/ground.rs b/fighters/cloud/src/acmd/ground.rs index 493006d6d0..58f6fbf527 100644 --- a/fighters/cloud/src/acmd/ground.rs +++ b/fighters/cloud/src/acmd/ground.rs @@ -1,109 +1,105 @@ use super::*; -unsafe extern "C" fn cloud_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 60, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 60, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn cloud_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 361, 25, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 30, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 361, 25, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 30, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 25, 0, 35, 3.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 25, 0, 35, 3.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn cloud_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 30, 50, 0, 75, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 30, 50, 0, 75, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 60, 2.5, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 60, 70, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 60, 2.5, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 60, 70, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } -//frame(lua_state, 10.0); -//if is_excute(fighter) { -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); -//} + //frame(lua_state, 10.0); + //if is_excute(agent) { + // ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + //} frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 8.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 8.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attack11", cloud_attack_11_game) - .acmd("game_attack12", cloud_attack_12_game) - .acmd("game_attack13", cloud_attack_13_game) - .acmd("game_attackdash", cloud_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/cloud/src/acmd/mod.rs b/fighters/cloud/src/acmd/mod.rs index 6312b876a0..d8a22387b4 100644 --- a/fighters/cloud/src/acmd/mod.rs +++ b/fighters/cloud/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/other.rs b/fighters/cloud/src/acmd/other.rs index 0a91c06900..835ebe9059 100644 --- a/fighters/cloud/src/acmd/other.rs +++ b/fighters/cloud/src/acmd/other.rs @@ -1,204 +1,125 @@ 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_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(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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_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_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_cloud_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_cloud_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, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_cloud_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_cloud_step_left_l")); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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("cloud") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/cloud/src/acmd/smashes.rs b/fighters/cloud/src/acmd/smashes.rs index d4ed50f5ad..4be8904b9a 100644 --- a/fighters/cloud/src/acmd/smashes.rs +++ b/fighters/cloud/src/acmd/smashes.rs @@ -1,187 +1,183 @@ - use super::*; -unsafe extern "C" fn cloud_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 30, 25, 30, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 0, 100, 10, 0, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 180, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 30, 25, 30, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 0, 100, 10, 0, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 180, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 15, 100, 80, 0, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 15, 100, 50, 0, 5.2, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 170, 100, 10, 0, 5.2, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 15, 100, 80, 0, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 15, 100, 50, 0, 5.2, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 170, 100, 10, 0, 5.2, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 18.5, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 18.5, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 18.5, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 18.5, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn cloud_attack_s4_s_expression(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_L); +unsafe extern "C" fn expression_attacks4(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_L); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 28.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.830); + FT_MOTION_RATE(agent, 0.830); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 0.738); + FT_MOTION_RATE(agent, 0.738); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 83, 106, 0, 50, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 83, 106, 0, 50, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 83, 106, 0, 50, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 83, 106, 0, 50, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 60, 100, 0, 32, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 60, 100, 0, 32, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn cloud_attack_hi4_expression(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_attackhi4(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn cloud_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 170, 97, 90, 0, 2.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 155, 97, 85, 0, 2.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 160, 97, 90, 0, 3.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 150, 97, 85, 0, 3.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 170, 97, 90, 0, 2.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 155, 97, 85, 0, 2.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 160, 97, 90, 0, 3.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 150, 97, 85, 0, 3.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 92, 0, 35, 4.0, 0.0, 4.4, -20.0, Some(0.0), Some(4.4), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 92, 0, 35, 4.0, 0.0, 4.4, -20.0, Some(0.0), Some(4.4), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attacks4", cloud_attack_s4_s_game) - .acmd("expression_attacks4", cloud_attack_s4_s_expression) - .acmd("game_attackhi4", cloud_attack_hi4_game) - .acmd("expression_attackhi4", cloud_attack_hi4_expression) - .acmd("game_attacklw4", cloud_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/cloud/src/acmd/specials.rs b/fighters/cloud/src/acmd/specials.rs index 11897f1b40..b8c5dae8e5 100644 --- a/fighters/cloud/src/acmd/specials.rs +++ b/fighters/cloud/src/acmd/specials.rs @@ -1,693 +1,677 @@ - use super::*; -unsafe extern "C" fn cloud_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 11.0, false); AttackModule::set_add_reaction_frame(boma, 1, 11.0, false); AttackModule::set_add_reaction_frame(boma, 2, 11.0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } - } -unsafe extern "C" fn cloud_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.0, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.0, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.0, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.0, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } - } -unsafe extern "C" fn cloud_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn cloud_special_air_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::clear_speed_all(boma); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn cloud_special_s1_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } -unsafe extern "C" fn cloud_special_air_s1_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } -unsafe extern "C" fn cloud_special_s2_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specials2_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } -unsafe extern "C" fn cloud_special_air_s2_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specialairs2_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } -unsafe extern "C" fn cloud_special_s3_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_LB_SCENE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } - } -unsafe extern "C" fn cloud_special_air_s3_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_LB_SCENE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } - } -unsafe extern "C" fn cloud_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.333); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 40, 5, 0, 100, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 78, 5, 0, 100, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 5, 0, 100, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 40, 5, 0, 100, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 78, 5, 0, 100, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 5, 0, 100, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 4.0, 85, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 4.0, 96, 5, 0, 100, 3.5, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -12.0, Some(0.0), Some(6.0), Some(-12.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 4.0, 85, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 4.0, 96, 5, 0, 100, 3.5, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -12.0, Some(0.0), Some(6.0), Some(-12.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } - } -unsafe extern "C" fn cloud_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - } -unsafe extern "C" fn cloud_special_hi2_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } - } -unsafe extern "C" fn cloud_special_hi_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.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); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 2.0); + ATTACK(agent, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 40.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 cloud_special_air_hi_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.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); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 2.0); + ATTACK(agent, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 40.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 cloud_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.812); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.812); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 1, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 2, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); @@ -698,51 +682,50 @@ unsafe extern "C" fn cloud_special_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 3, 0.1); } frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn cloud_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.812); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.812); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 1, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 2, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); @@ -753,39 +736,38 @@ unsafe extern "C" fn cloud_special_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 3, 0.1); } frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_specials1", cloud_special_s1_game) - .acmd("game_specialairs1", cloud_special_air_s1_game) - .acmd("game_specials2", cloud_special_s2_game) - .acmd("game_specialairs2", cloud_special_air_s2_game) - .acmd("game_specials1_lb", cloud_special_s1_lb_game) - .acmd("game_specialairs1_lb", cloud_special_air_s1_lb_game) - .acmd("game_specials2_lb", cloud_special_s2_lb_game) - .acmd("game_specialairs2_lb", cloud_special_air_s2_lb_game) - .acmd("game_specials3_lb", cloud_special_s3_lb_game) - .acmd("game_specialairs3_lb", cloud_special_air_s3_lb_game) - .acmd("game_specialhi", cloud_special_hi_game) - .acmd("game_specialhi2", cloud_special_hi2_game) - .acmd("game_specialhi2fall", cloud_special_hi2_fall_game) - .acmd("game_specialhi_lb", cloud_special_hi_lb_game) - .acmd("game_specialairhi_lb", cloud_special_air_hi_lb_game) - .acmd("game_speciallw", cloud_special_lw_game) - .acmd("game_specialairlw", cloud_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specialairs2); + agent.acmd("game_specials1_lb", game_specials1_lb); + agent.acmd("game_specialairs1_lb", game_specialairs1_lb); + agent.acmd("game_specials2_lb", game_specials2_lb); + agent.acmd("game_specialairs2_lb", game_specialairs2_lb); + agent.acmd("game_specials3_lb", game_specials3_lb); + agent.acmd("game_specialairs3_lb", game_specialairs3_lb); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialhi2fall", game_specialhi2fall); + agent.acmd("game_specialhi_lb", game_specialhi_lb); + agent.acmd("game_specialairhi_lb", game_specialairhi_lb); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/cloud/src/acmd/throws.rs b/fighters/cloud/src/acmd/throws.rs index a168ebf595..e285d08d44 100644 --- a/fighters/cloud/src/acmd/throws.rs +++ b/fighters/cloud/src/acmd/throws.rs @@ -1,32 +1,30 @@ - use super::*; -unsafe extern "C" fn cloud_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { 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.1, 0.0, Some(0.0), Some(7.1), Some(8.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 7.1, 0.0, Some(0.0), Some(7.1), Some(8.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 cloud_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -46,7 +44,7 @@ unsafe extern "C" fn cloud_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn cloud_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -66,10 +64,8 @@ unsafe extern "C" fn cloud_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_catch", cloud_catch_game) - .acmd("game_catchdash", cloud_catch_dash_game) - .acmd("game_catchturn", cloud_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/tilts.rs b/fighters/cloud/src/acmd/tilts.rs index d10d3df1e3..83d48a7aac 100644 --- a/fighters/cloud/src/acmd/tilts.rs +++ b/fighters/cloud/src/acmd/tilts.rs @@ -1,126 +1,123 @@ use super::*; -unsafe extern "C" fn cloud_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(8.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(8.5-1.0)); } frame(lua_state, 8.5); - FT_MOTION_RATE(fighter, 3.0/(10.5-8.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 111, 0, 20, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 111, 0, 20, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(10.5-8.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 111, 0, 20, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 111, 0, 20, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE(fighter, 1.0/(11.0-10.5)); + FT_MOTION_RATE(agent, 1.0/(11.0-10.5)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn cloud_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 5.0, 0.0, 8.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 6.0, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 80, 103, 0, 46, 4.5, 0.0, 18.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 80, 103, 0, 46, 5.6, 0.0, 12.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 5.0, 0.0, 8.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 6.0, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 80, 103, 0, 46, 4.5, 0.0, 18.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 80, 103, 0, 46, 5.6, 0.0, 12.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 75, 103, 0, 46, 4.5, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 75, 103, 0, 46, 4.5, 0.0, 21.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 75, 103, 0, 46, 4.5, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 75, 103, 0, 46, 4.5, 0.0, 21.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn cloud_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.92); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.92); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 78, 70, 0, 80, 3.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 3.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 4.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 78, 70, 0, 80, 3.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 3.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 4.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 70, 80, 0, 50, 2.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 2.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 3.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 70, 80, 0, 50, 2.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 2.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 3.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attacks3", cloud_attack_s3_s_game) - .acmd("expression_attacks3", cloud_attack_s3_s_expression) - .acmd("game_attackhi3", cloud_attack_hi3_game) - .acmd("expression_attackhi3", cloud_attack_hi3_expression) - .acmd("game_attacklw3", cloud_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/cloud/src/lib.rs b/fighters/cloud/src/lib.rs index 61c500d639..0d4aec1155 100644 --- a/fighters/cloud/src/lib.rs +++ b/fighters/cloud/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; use smash::{ lib::{ @@ -36,8 +36,11 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("cloud"); + acmd::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/cloud/src/opff.rs b/fighters/cloud/src/opff.rs index a7cb70ef3b..eeb8d9f5af 100644 --- a/fighters/cloud/src/opff.rs +++ b/fighters/cloud/src/opff.rs @@ -65,8 +65,6 @@ pub unsafe extern "C" fn cloud_frame_wrapper(fighter: &mut L2CFighterCommon) { fastfall_specials(fighter); } -pub fn install() { - smashline::Agent::new("cloud") - .on_line(Main, cloud_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, cloud_frame_wrapper); } \ No newline at end of file diff --git a/fighters/common/src/function_hooks/edge_slipoffs.rs b/fighters/common/src/function_hooks/edge_slipoffs.rs deleted file mode 100644 index 22da3cf6a1..0000000000 --- a/fighters/common/src/function_hooks/edge_slipoffs.rs +++ /dev/null @@ -1,282 +0,0 @@ -use super::*; -use globals::*; -//================================================================= -//== init_settings for edge_slipoffs module -//== Note: This is called from init_settings::init_settings_hook -//== Note: Forces GroundModule::correct to be called for -// certain statuses -//== Note: JostleModule::set_team(boma, 0) is for walking through -// other fighters -//================================================================= -pub unsafe fn init_settings_edges(boma: &mut BattleObjectModuleAccessor, situation: smash::app::SituationKind, arg3: i32, arg4: u32, - ground_cliff_check_kind: smash::app::GroundCliffCheckKind, arg6: bool, - arg7: i32, arg8: i32, arg9: i32, arg10: i32) -> u32 { - /* "fix" forces GroundModule::correct to be called for the statuses we need */ - let mut fix = arg4; - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - - if boma.is_fighter() - && boma.is_situation(*SITUATION_KIND_GROUND) { - - if status_kind == *FIGHTER_STATUS_KIND_APPEAL { - fix = *GROUND_CORRECT_KIND_GROUND as u32; /* GROUND_CORRECT_KIND_GROUND is i32 */ - } - - if [*FIGHTER_STATUS_KIND_WAIT, - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_STATUS_KIND_TURN, - *FIGHTER_STATUS_KIND_TURN_DASH, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_WAIT, - *FIGHTER_STATUS_KIND_SQUAT_F, - *FIGHTER_STATUS_KIND_SQUAT_B, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_LANDING_LIGHT, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_GUARD_DAMAGE, - // *FIGHTER_STATUS_KIND_ESCAPE_AIR, - // *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, - *FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_AIR_LASSO_LANDING, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_DAMAGE_SONG, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, - *FIGHTER_STATUS_KIND_DOWN_DAMAGE, - *FIGHTER_STATUS_KIND_SAVING_DAMAGE].contains(&status_kind) { - fix = *GROUND_CORRECT_KIND_GROUND as u32; - } - - if (fighter_kind == *FIGHTER_KIND_EDGE && [*FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind) && StatusModule::prev_status_kind(boma, 0) != *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_CHARGED_RUSH) - || (fighter_kind == *FIGHTER_KIND_KAMUI && [*FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B_LANDING, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_MIIFIGHTER && [*FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_START, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_MIISWORDSMAN && [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_END, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_SZEROSUIT && [*FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_FLIP, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_LANDING, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_BAYONETTA && [*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_DOLLY && [*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_ATTACK, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_LANDING, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_LANDING, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind)) - || (boma.kind() == *FIGHTER_KIND_KOOPAJR && boma.is_status(*FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_SHEIK && [*FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK, - *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_LANDING].contains(&status_kind)) - || (boma.kind() == *FIGHTER_KIND_LUIGI && boma.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_HI_LANDING_FALL)) - || (boma.kind() == *FIGHTER_KIND_PIT && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PITB && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_SIMON && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) - || (boma.kind() == *FIGHTER_KIND_RICHTER && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) - || (boma.kind() == *FIGHTER_KIND_DEMON && boma.is_status(*FIGHTER_DEMON_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_RYU && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_KEN && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PACKUN && boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_KROOL && boma.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PIKMIN && boma.is_status(*FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_FALCO && boma.is_status(*FIGHTER_FALCO_STATUS_KIND_SPECIAL_S_FALL_LANDING)) - || (boma.kind() == *FIGHTER_KIND_MURABITO && boma.is_status(*FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_NESS && boma.is_status(*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END)) - || (boma.kind() == *FIGHTER_KIND_LUCAS && boma.is_status(*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END)) - { - fix = *GROUND_CORRECT_KIND_GROUND as u32; - } - } - return fix -} - -//================================================================= -//== GroundModule::correct -//== Note: This is the "can edge slippoff" function in Smash -//================================================================= -#[skyline::hook(replace=GroundModule::correct)] -unsafe fn correct_hook(boma: &mut BattleObjectModuleAccessor, kind: GroundCorrectKind) -> u64 { - - // don't run if boma is not fighter or grounded - if !boma.is_fighter() || !boma.is_situation(*SITUATION_KIND_GROUND) { - return original!()(boma, kind); - } - - let status_kind = StatusModule::status_kind(boma); - if [ - // common statuses that should edge slipoff - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_TURN_DASH, - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_DAMAGE_SONG, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, - *FIGHTER_STATUS_KIND_DOWN_DAMAGE, - *FIGHTER_STATUS_KIND_SAVING_DAMAGE - ].contains(&status_kind) - || check_fighter_edge_slipoffs(boma).get_bool() { - return original!()(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - } - - original!()(boma, kind) -} - -unsafe fn check_fighter_edge_slipoffs(boma: &mut BattleObjectModuleAccessor) -> L2CValue { - let status_kind = StatusModule::status_kind(boma); - let fighter_kind = boma.kind(); - - // PIKACHU & PICHU - if (fighter_kind == *FIGHTER_KIND_PIKACHU || fighter_kind == *FIGHTER_KIND_PICHU) - && [ - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_WEAK, - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK, - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_END - ].contains(&status_kind) { - return true.into(); - } - - // CAPTAIN FALCON - if fighter_kind == *FIGHTER_KIND_CAPTAIN && status_kind == *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END { return true.into(); } - - // GANONDORF - if (fighter_kind == *FIGHTER_KIND_GANON && status_kind == *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END) { return true.into(); } - - // MII SWORDFIGHTER - if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN - && ( - [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END].contains(&status_kind) - || ( - WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO) == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_3 - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) - ) - ) { - return true.into(); - } - - // BOWSER - if (fighter_kind == *FIGHTER_KIND_KOOPA && status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G) { return true.into(); } - - // DONKEY KONG - if (fighter_kind == *FIGHTER_KIND_DONKEY && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } - - // GAOGAEN - if (fighter_kind == *FIGHTER_KIND_GAOGAEN && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } - if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { return true.into(); } - - // LUIGI - if (fighter_kind == *FIGHTER_KIND_LUIGI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } - if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N) { return true.into(); } - - // PEACH - if (fighter_kind == *FIGHTER_KIND_PEACH && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } - - // DAISY - if (fighter_kind == *FIGHTER_KIND_DAISY && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } - - // SEPHIROTH - if (fighter_kind == *FIGHTER_KIND_EDGE && status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH) { return true.into(); } - - // YOSHI - if (fighter_kind == *FIGHTER_KIND_YOSHI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } - - // PAC-MAN - if (fighter_kind == *FIGHTER_KIND_PACMAN && status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN) { return true.into(); } - - // SORA - if (fighter_kind == *FIGHTER_KIND_TRAIL && status_kind == *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END) { return true.into(); } - - // CHARIZARD - if (fighter_kind == *FIGHTER_KIND_PLIZARDON && status_kind == *FIGHTER_PLIZARDON_STATUS_KIND_SPECIAL_S_END) { return true.into(); } - - //KING DEDEDE - if fighter_kind == *FIGHTER_KIND_DEDEDE - && [ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE - ].contains(&status_kind){ - return true.into(); - } - - // FOX - if fighter_kind == *FIGHTER_KIND_FOX - && [ - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_HIT, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_END - ].contains(&status_kind) { - return true.into(); - } - - // WOLF - if fighter_kind == *FIGHTER_KIND_WOLF - && [ - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_HIT, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_END - ].contains(&status_kind) { - return true.into(); - } - - // NESS - if fighter_kind == *FIGHTER_KIND_NESS - && [ - *FIGHTER_STATUS_KIND_SPECIAL_HI, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END - ].contains(&status_kind) { - return true.into(); - } - - // LUCAS - if fighter_kind == *FIGHTER_KIND_LUCAS - && [ - *FIGHTER_STATUS_KIND_SPECIAL_HI, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END - ].contains(&status_kind) { - return true.into(); - } - - return false.into(); -} - -extern "C" { - #[link_name = "\u{1}_ZN3app11FighterUtil33get_ground_correct_kind_air_transERNS_26BattleObjectModuleAccessorEi"] - fn get_ground_correct_kind_air_trans(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32; -} - -//================================================================= -//== FighterUtil::get_ground_correct_kind_air_trans -//== Note: Aerial ECB fixes for Link, Captain, Simon, Richter -//================================================================= -#[skyline::hook(replace=get_ground_correct_kind_air_trans)] -unsafe fn get_ground_correct_kind_air_trans_hook(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32 { - return *GROUND_CORRECT_KIND_AIR; -} - -pub fn install() { - skyline::install_hooks!( - correct_hook, - get_ground_correct_kind_air_trans_hook, - ); -} diff --git a/fighters/common/src/function_hooks/energy/mod.rs b/fighters/common/src/function_hooks/energy/mod.rs index f27ece76f7..a8f7deec33 100644 --- a/fighters/common/src/function_hooks/energy/mod.rs +++ b/fighters/common/src/function_hooks/energy/mod.rs @@ -174,7 +174,6 @@ impl KineticEnergy { (self.vtable.mul_accel)(self, mul) } } - } pub fn install() { diff --git a/fighters/common/src/function_hooks/init_settings.rs b/fighters/common/src/function_hooks/init_settings.rs deleted file mode 100644 index 8b94f475c2..0000000000 --- a/fighters/common/src/function_hooks/init_settings.rs +++ /dev/null @@ -1,178 +0,0 @@ -use super::*; -use globals::*; - -//================================================================= -//== StatusModule::init_settings -//================================================================= -#[skyline::hook(replace=StatusModule::init_settings)] -unsafe fn init_settings_hook(boma: &mut BattleObjectModuleAccessor, mut situation: smash::app::SituationKind, kinetic_type: i32, arg4: u32, - ground_cliff_check_kind: smash::app::GroundCliffCheckKind, jostle: bool, - keep_flag: i32, keep_int: i32, keep_float: i32, arg10: i32) -> u64 { - let id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - let situation_kind = StatusModule::situation_kind(boma); - let mut cliff_check_kind = ground_cliff_check_kind; - let mut kinetic_type = kinetic_type.clone(); - - // Call edge_slippoffs init_settings - let fix = super::edge_slipoffs::init_settings_edges(boma, situation, kinetic_type, arg4, ground_cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10); - - if boma.is_fighter() { - - if boma.is_prev_situation(*SITUATION_KIND_AIR) - && ( situation.0 == *SITUATION_KIND_GROUND - || (boma.is_situation(*SITUATION_KIND_GROUND) && situation.0 == *SITUATION_KIND_NONE) ) - { - if kinetic_type == *FIGHTER_KINETIC_TYPE_MOTION { - kinetic_type = *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL; - } - } - // Resets your airtime counter when leaving the below statuses - // Prevents ECB from shifting on f1 after an "ignored" status (those defined below) - if boma.is_prev_status_one_of(&[ - *FIGHTER_STATUS_KIND_DEMO, - *FIGHTER_STATUS_KIND_ENTRY, - *FIGHTER_STATUS_KIND_CAPTURE_PULLED, - *FIGHTER_STATUS_KIND_CAPTURE_WAIT, - *FIGHTER_STATUS_KIND_CAPTURE_DAMAGE, - *FIGHTER_STATUS_KIND_THROWN, - *FIGHTER_STATUS_KIND_CATCHED_GANON, - *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, - *FIGHTER_STATUS_KIND_CATCHED_REFLET, - *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, - *FIGHTER_STATUS_KIND_CAPTURE_JACK_WIRE, - *FIGHTER_STATUS_KIND_CAPTURE_MASTER_SWORD]) - && situation.0 == *SITUATION_KIND_AIR - { - WorkModule::set_int(boma, 0, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR); - } - - // Walk through other fighters - JostleModule::set_team(boma, 0); - - // clear platform drop input when entering airdodge (to avoid buffering waveland platdrop with the same down input as the actual waveland) - // if [*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT].contains(&status_kind) { - // ControlModule::reset_flick_y(boma); - // // VarModule::off_flag(boma.object(), vars::common::instance::ENABLE_WAVELAND_PLATDROP); - // } - - if boma.is_prev_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT]) - && boma.is_status(*FIGHTER_STATUS_KIND_LANDING) - && GroundModule::is_passable_ground(boma) { - ControlModule::reset_flick_y(boma); - } - - // Occupy ledge on ledgegrab - if boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_CLIFF_CATCH, - *FIGHTER_STATUS_KIND_CLIFF_CATCH_MOVE, - *FIGHTER_STATUS_KIND_CLIFF_WAIT] - ) { - let cliff_id = GroundModule::get_cliff_id_uint32(boma); - VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, cliff_id as i32); - } - - // heavy item pickup should keep momentum and be affected by gravity in the air - if boma.is_status(*FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP) && boma.is_situation(*SITUATION_KIND_AIR) { - // change the kinetic type to the regular air type - kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; - situation.0 = *SITUATION_KIND_NONE; - } - - if boma.kind() == *FIGHTER_KIND_DONKEY && boma.is_situation(*SITUATION_KIND_AIR) - && boma.is_status_one_of(&[ - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_START, - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_WAIT, - *FIGHTER_STATUS_KIND_THROW,]) { - kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; - situation.0 = *SITUATION_KIND_NONE; - } - - // Repeated tilt scaling; UNUSED - /* - if [*FIGHTER_KIND_RYU, *FIGHTER_KIND_KEN, *FIGHTER_KIND_DOLLY].contains(&fighter_kind) { - VarModule::off_flag(boma.object(), vars::common::status::REPEAT_INCREMENTED); - if status_kind != *FIGHTER_STATUS_KIND_ATTACK_HI3 { - if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_HI) > 0 { - VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_HI, 0); - } - } - if ![*FIGHTER_STATUS_KIND_ATTACK_LW3, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_WAIT].contains(&status_kind) { - if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_LW) > 0 { - VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_LW, 0); - } - } - } - */ - - //Sword trails - if (boma.kind() == *FIGHTER_KIND_ROY || boma.kind() == *FIGHTER_KIND_CHROM) - && VarModule::is_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT) { - EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); - if fighter_kind == *FIGHTER_KIND_ROY { - EffectModule::req_follow(boma, Hash40::new("roy_fire_small"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); - } - else if fighter_kind == *FIGHTER_KIND_CHROM { - EffectModule::req_follow(boma, Hash40::new("chrom_sword"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); - } - - if [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) { - VarModule::off_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT); - EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); - } - } - - // Set GroundCliffCheckKind here to pass into init_settings - - if ((boma.kind() == *FIGHTER_KIND_RYU || boma.kind() == *FIGHTER_KIND_KEN) - && boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END])) - || (boma.kind() == *FIGHTER_KIND_FALCO - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - || (boma.kind() == *FIGHTER_KIND_REFLET - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - || (boma.kind() == *FIGHTER_KIND_WOLF - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - { - cliff_check_kind = app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - - if boma.is_prev_status(*FIGHTER_STATUS_KIND_SWALLOWED_DRINK) { - VisibilityModule::set_whole(boma, true); - } - } - - // VarModule Status Variable reset checks - // This makes the assumption that if the KEEP_FLAG is not NONE, you want to clear the - // status variable array for that data type. Because Smash shares its space between - // INT and INT64, I have included both of them under a single check. - let object = boma.object(); - if VarModule::has_var_module(object) { - let mut mask = 0; - if keep_flag != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG { - mask += VarModule::RESET_STATUS_FLAG; - } - if keep_int != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT { - mask += VarModule::RESET_STATUS_INT; - mask += VarModule::RESET_STATUS_INT64; - } - if keep_float != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT { - mask += VarModule::RESET_STATUS_FLOAT; - } - VarModule::reset(object, mask); - } - - original!()(boma, situation, kinetic_type, fix, cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10) -} - -pub fn install() { - skyline::install_hooks!( - init_settings_hook, - ); -} diff --git a/fighters/common/src/function_hooks/ledges.rs b/fighters/common/src/function_hooks/lua_bind_hook/ground.rs similarity index 67% rename from fighters/common/src/function_hooks/ledges.rs rename to fighters/common/src/function_hooks/lua_bind_hook/ground.rs index 89ffc45373..02ce71d030 100644 --- a/fighters/common/src/function_hooks/ledges.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/ground.rs @@ -1,959 +1,1213 @@ -use super::*; -use globals::*; - -//================================================================= -//== GroundModule::entry_cliff -//== Note: Ledge occupancy handled by sys_line::ledges::occupy_ledge() -//================================================================= -#[skyline::hook(replace=GroundModule::entry_cliff)] -unsafe fn entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64{ - //println!("Grabbing ledge... player number: {}", WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize;); - //println!("Current status kind: {}", StatusModule::status_kind(boma)); - //println!("Previous status kind: {}", StatusModule::prev_status_kind(boma, 0)); - original!()(boma) -} - -//================================================================= -//== GroundModule::can_entry_cliff -//== Note: Handles ledgehogging, fighter-specific ledge entry, -// and disallows rising ledge grabs (for non-specials) -//================================================================= -#[skyline::hook(replace=GroundModule::can_entry_cliff)] -unsafe fn can_entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { - let situation_kind = StatusModule::situation_kind(boma); - let status_kind = StatusModule::status_kind(boma); - let fighter_kind = boma.kind(); - - let rising: f32 = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Rising while jumping/airdodging - - let tether_zair = boma.is_fighter() - && [*FIGHTER_KIND_LUCAS, *FIGHTER_KIND_YOUNGLINK, *FIGHTER_KIND_TOONLINK, *FIGHTER_KIND_SAMUS, *FIGHTER_KIND_SAMUSD, *FIGHTER_KIND_SZEROSUIT].contains(&fighter_kind) - && [*FIGHTER_STATUS_KIND_AIR_LASSO, *FIGHTER_STATUS_KIND_AIR_LASSO_REACH, *FIGHTER_STATUS_KIND_AIR_LASSO_HANG, *FIGHTER_STATUS_KIND_AIR_LASSO_REWIND].contains(&status_kind); - - let tether_special = boma.is_fighter() - && ( (fighter_kind == *FIGHTER_KIND_SZEROSUIT && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) - || (fighter_kind == *FIGHTER_KIND_SHIZUE && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) - || (fighter_kind == *FIGHTER_KIND_TANTAN && (status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)) - || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) - || (fighter_kind == *FIGHTER_KIND_JACK && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) - || (fighter_kind == *FIGHTER_KIND_PFUSHIGISOU && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); - - let tether_aerial = boma.is_fighter() - && ( (fighter_kind == *FIGHTER_KIND_SIMON && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) - || (fighter_kind == *FIGHTER_KIND_RICHTER && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) - || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); - - // Ledgehog code - let cliff_id = GroundModule::get_cliff_id_uint32(boma); - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as u32; - for object_id in util::get_all_active_battle_object_ids() { - let object = ::utils::util::get_battle_object_from_id(object_id); - if !object.is_null() { - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) == WorkModule::get_int(&mut *(*object).module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) { - continue; - } - - if VarModule::get_int(object, vars::common::instance::LEDGE_ID) == cliff_id as i32 { - if !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { - return 0; - } - } - } - } - - if boma.is_fighter() { - // Character specific ledge grabbing rules - // If check_cliff_entry_specializer returns 0, disable ledge grabbing - // If check_cliff_entry_specializer returns 1, run the rising check - // Otherwise (-1 returned) skip the rise check and let the vanilla behavior take place - if check_cliff_entry_specializer(boma) == 0 { - return 0; - } - else if check_cliff_entry_specializer(boma) == 1 { - // Disable grabbing ledge while rising during an airborne state (not specials) - if situation_kind == *SITUATION_KIND_AIR { - if rising >= 0.0 && !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { - return 0; - } - } - } - - // Unable to grab ledge during runfall/walkfall (the first few frames after you run off an edge) - if boma.is_motion_one_of(&[Hash40::new("run_fall_l"), Hash40::new("run_fall_r"), Hash40::new("walk_fall_l"), Hash40::new("walk_fall_r")]) { - return 0; - } - } - - original!()(boma) -} - -//================================================================= -//== GroundModule::leave_cliff -//== Note: Resets ledge occupancy -//================================================================= -#[skyline::hook(replace=GroundModule::leave_cliff)] -unsafe fn leave_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { - VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, -1); - original!()(boma) -} - -pub fn install() { - //skyline::install_hook!(entry_cliff_hook); - skyline::install_hook!(can_entry_cliff_hook); - //skyline::install_hook!(leave_cliff_hook); -} - -//================================================================= -//== GroundModule::can_entry_cliff specializer -//================================================================= -unsafe fn check_cliff_entry_specializer(boma: &mut BattleObjectModuleAccessor) -> i32 { - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - let motion_kind = MotionModule::motion_kind(boma); - let prev_status_kind = StatusModule::prev_status_kind(boma, 0); - let prev_status_kind_2 = StatusModule::prev_status_kind(boma, 1); - let frame = MotionModule::frame(boma); - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - - if fighter_kind == *FIGHTER_KIND_MARIO { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DONKEY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 65.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LINK { - if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END]) { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SAMUS || fighter_kind == *FIGHTER_KIND_SAMUSD { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 35.0 { - return 0; - } - } - } - - // Yoshi: Unchanged - - // Kirby: Unchanged - - if fighter_kind == *FIGHTER_KIND_FOX { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 5.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 8.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_PIKACHU { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { - return 1; - } - /* - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { - if frame < 39.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LUIGI { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 31.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_NESS { - if status_kind == *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK { - /* - if frame > 5.0 && frame < 15.0 { - return 1; - } - else{ - return -1; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_CAPTAIN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 41.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - if frame < 34.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PEACH || fighter_kind == *FIGHTER_KIND_DAISY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 24.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { - if frame < 20.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KOOPA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A { - if prev_status_kind != *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { - if frame < 37.0 { - return 1; - } - } - else { - return 1; - } - } - } - - // Ice Climbers - if [*FIGHTER_KIND_ICE_CLIMBER, *FIGHTER_KIND_POPO, *FIGHTER_KIND_NANA].contains(&fighter_kind) { - if [*FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PRE, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_PULL_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP].contains(&status_kind) { - return -1; - } - if status_kind == *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_FAIL { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_SHEIK { - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_MOVE { - return 1; - } - - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 1; - } - } - - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK || status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN { - if frame < 17.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ZELDA { - if status_kind == *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_MARIOD { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PICHU { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { - return 1; - } - /* - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { - if frame < 39.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_FALCO { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 5.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 8.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MARTH || fighter_kind == *FIGHTER_KIND_LUCINA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 20.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_YOUNGLINK { - if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GANON { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 39.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 42.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MEWTWO { - if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - - if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_3 { - if frame < 6.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_2 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_3 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_4 { - if frame < 35.0 { - return 0; - } - } - } - - // Chrom: Unchanged - - if fighter_kind == *FIGHTER_KIND_GAMEWATCH { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 22.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_METAKNIGHT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_HI_LOOP { - if frame < 28.0 { - return 0; - } - } - - if status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_RUSH { - if frame < 50.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PIT || fighter_kind == *FIGHTER_KIND_PITB { - if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH { - return 0; - } - if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SZEROSUIT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 30.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WARIO { - if status_kind == *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 35.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SNAKE { - if status_kind == *FIGHTER_SNAKE_STATUS_KIND_SPECIAL_HI_HANG { - //if frame < 60.0 { - return 0; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_IKE { - if status_kind == *FIGHTER_IKE_STATUS_KIND_SPECIAL_S_DASH { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_PZENIGAME { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_PLIZARDON { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 38.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DIDDY { - /* - if status_kind == *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER { - if frame < 28.0 { - return 0; - } - } - */ - } - - if fighter_kind == *FIGHTER_KIND_LUCAS { - if status_kind == *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK { - /* - if frame > 5.0 && frame < 15.0 { - return 1; - } - else{ - return -1; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_SONIC { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 0; - } - if status_kind == *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 23.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DEDEDE { - if status_kind == *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PIKMIN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_LUCARIO { - if status_kind == *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH { - if frame < 17.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROBOT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_TOONLINK { - if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WOLF { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 11.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MURABITO { - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { - return 0; - } - - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROCKMAN { - if status_kind == *FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 28.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WIIFIT { - if status_kind == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP { - return 0; - } - if prev_status_kind_2 == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP && status_kind == *FIGHTER_STATUS_KIND_FALL_SPECIAL { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROSETTA { - if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_JUMP { - return 0; - } - if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LITTLEMAC { - if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 30.0 { - return 0; - } - } - - if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW { - if frame < 11.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GEKKOUGA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_LOOP { - return 1; - } - /* - if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - } - - if fighter_kind == *FIGHTER_KIND_PALUTENA { - if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_3 { - if frame < 6.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PACMAN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_HI_LOOP { - if frame < 25.0 { - return 1; - } - } - if motion_kind == hash40("special_s_move") || motion_kind == hash40("special_s_dash") { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_REFLET { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 9.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_REFLET_STATUS_KIND_SPECIAL_HI_2 { - if frame < 40.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SHULK { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 28.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KOOPAJR { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_SHOOT { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_DUCKHUNT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY { - //if frame < 60.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_RYU || fighter_kind == *FIGHTER_KIND_KEN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 25.0 { - return 1; - } - } - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND].contains(&status_kind) { - return 1; - } - } - - // Cloud - if fighter_kind == *FIGHTER_KIND_CLOUD { - if motion_kind == hash40("special_hi") || motion_kind == hash40("special_air_hi") { - /* - if frame > 11.0 && frame < 18.0 { - return 0; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_KAMUI { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 45.0 { - return 1; - } - } - } - - // Bayonetta: Unchanged - - if fighter_kind == *FIGHTER_KIND_INKLING { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_JUMP { - return 1; - } - - if status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_ROT { - if frame < 15.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_RIDLEY { - if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_F || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_B || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_HI /*|| status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_LW*/ { - return 0; - } - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE { - //if frame < 39.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_SIMON || fighter_kind == *FIGHTER_KIND_RICHTER { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 31.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KROOL { - if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 0; - //} - } - - if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { - if frame < 14.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SHIZUE { - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { - return 1; - } - - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 10.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GAOGAEN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 1; - } - - if status_kind == *FIGHTER_GAOGAEN_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 4.0 { - return 1; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 41.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_PACKUN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 1; - //} - } - - if status_kind == *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END { - if frame < 14.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_JACK { - if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH { - return 1; - } - - if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_END { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_BRAVE { - if status_kind == *FIGHTER_BRAVE_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 33.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIIFIGHTER { - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_2 || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_3 { - if frame < 26.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_ATTACK { - return 1; - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_END { - if frame < 47.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_WEAK { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 33.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN { - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_JUMP { - if frame < 23.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_WEAK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK { - if frame < 42.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH { - return 1; - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - return 1; - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 41.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIIGUNNER { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 1; - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI2_JUMP { - if frame < 35.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH { - return 1; - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH_END { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_BUDDY { - - if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 32.0 { - return 1; - } - } - - if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH { - return 1; - } - } - - if(fighter_kind == *FIGHTER_KIND_PICKEL){ - if(status_kind == *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_GLIDING){ - if VarModule::get_float(boma.object(), vars::pickel::status::GLIDE_TIMER) < 40.0 /*40 frames of up b travel time*/ { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_EFLAME { - if status_kind == *FIGHTER_EFLAME_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 3.0 { - return 0; - } - } - } - - // General fighter check stuff - if status_kind == *FIGHTER_STATUS_KIND_ESCAPE_AIR{ - return -1; - } - - 1 -} +use super::*; +use globals::*; + +//================================================================= +//== init_settings for edge_slipoffs module +//== Note: This is called from init_settings::init_settings_hook +//== Note: Forces GroundModule::correct to be called for +// certain statuses +//== Note: JostleModule::set_team(boma, 0) is for walking through +// other fighters +//================================================================= +pub unsafe fn init_settings_edges(boma: &mut BattleObjectModuleAccessor, situation: smash::app::SituationKind, arg3: i32, arg4: u32, + ground_cliff_check_kind: smash::app::GroundCliffCheckKind, arg6: bool, + arg7: i32, arg8: i32, arg9: i32, arg10: i32) -> u32 { + /* "fix" forces GroundModule::correct to be called for the statuses we need */ + let mut fix = arg4; + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + + if boma.is_fighter() + && boma.is_situation(*SITUATION_KIND_GROUND) { + + if status_kind == *FIGHTER_STATUS_KIND_APPEAL { + fix = *GROUND_CORRECT_KIND_GROUND as u32; /* GROUND_CORRECT_KIND_GROUND is i32 */ + } + + if [*FIGHTER_STATUS_KIND_WAIT, + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_STATUS_KIND_TURN, + *FIGHTER_STATUS_KIND_TURN_DASH, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_WAIT, + *FIGHTER_STATUS_KIND_SQUAT_F, + *FIGHTER_STATUS_KIND_SQUAT_B, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_LANDING_LIGHT, + *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_GUARD_DAMAGE, + // *FIGHTER_STATUS_KIND_ESCAPE_AIR, + // *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, + *FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_AIR_LASSO_LANDING, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_DAMAGE_SONG, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, + *FIGHTER_STATUS_KIND_DOWN_DAMAGE, + *FIGHTER_STATUS_KIND_SAVING_DAMAGE].contains(&status_kind) { + fix = *GROUND_CORRECT_KIND_GROUND as u32; + } + + if (fighter_kind == *FIGHTER_KIND_EDGE && [*FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind) && StatusModule::prev_status_kind(boma, 0) != *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_CHARGED_RUSH) + || (fighter_kind == *FIGHTER_KIND_KAMUI && [*FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B_LANDING, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_MIIFIGHTER && [*FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_START, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_MIISWORDSMAN && [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_END, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_SZEROSUIT && [*FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_FLIP, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_LANDING, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_BAYONETTA && [*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, + *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_DOLLY && [*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_ATTACK, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_LANDING, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_LANDING, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind)) + || (boma.kind() == *FIGHTER_KIND_KOOPAJR && boma.is_status(*FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_SHEIK && [*FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK, + *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_LANDING].contains(&status_kind)) + || (boma.kind() == *FIGHTER_KIND_LUIGI && boma.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_HI_LANDING_FALL)) + || (boma.kind() == *FIGHTER_KIND_PIT && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PITB && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_SIMON && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) + || (boma.kind() == *FIGHTER_KIND_RICHTER && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) + || (boma.kind() == *FIGHTER_KIND_DEMON && boma.is_status(*FIGHTER_DEMON_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_RYU && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_KEN && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PACKUN && boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_KROOL && boma.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PIKMIN && boma.is_status(*FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_FALCO && boma.is_status(*FIGHTER_FALCO_STATUS_KIND_SPECIAL_S_FALL_LANDING)) + || (boma.kind() == *FIGHTER_KIND_MURABITO && boma.is_status(*FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_NESS && boma.is_status(*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END)) + || (boma.kind() == *FIGHTER_KIND_LUCAS && boma.is_status(*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END)) + { + fix = *GROUND_CORRECT_KIND_GROUND as u32; + } + } + return fix +} + +//================================================================= +//== GroundModule::correct +//== Note: This is the "can edge slippoff" function in Smash +//================================================================= +#[skyline::hook(replace=GroundModule::correct)] +unsafe fn correct_hook(boma: &mut BattleObjectModuleAccessor, kind: GroundCorrectKind) -> u64 { + + // don't run if boma is not fighter or grounded + if !boma.is_fighter() || !boma.is_situation(*SITUATION_KIND_GROUND) { + return original!()(boma, kind); + } + + let status_kind = StatusModule::status_kind(boma); + if [ + // common statuses that should edge slipoff + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_TURN_DASH, + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_DAMAGE_SONG, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, + *FIGHTER_STATUS_KIND_DOWN_DAMAGE, + *FIGHTER_STATUS_KIND_SAVING_DAMAGE + ].contains(&status_kind) + || check_fighter_edge_slipoffs(boma).get_bool() { + return original!()(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + } + + original!()(boma, kind) +} + +unsafe fn check_fighter_edge_slipoffs(boma: &mut BattleObjectModuleAccessor) -> L2CValue { + let status_kind = StatusModule::status_kind(boma); + let fighter_kind = boma.kind(); + + // PIKACHU & PICHU + if (fighter_kind == *FIGHTER_KIND_PIKACHU || fighter_kind == *FIGHTER_KIND_PICHU) + && [ + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_WEAK, + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK, + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_END + ].contains(&status_kind) { + return true.into(); + } + + // CAPTAIN FALCON + if fighter_kind == *FIGHTER_KIND_CAPTAIN && status_kind == *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END { return true.into(); } + + // GANONDORF + if (fighter_kind == *FIGHTER_KIND_GANON && status_kind == *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END) { return true.into(); } + + // MII SWORDFIGHTER + if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN + && ( + [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END].contains(&status_kind) + || ( + WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO) == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_3 + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) + ) + ) { + return true.into(); + } + + // BOWSER + if (fighter_kind == *FIGHTER_KIND_KOOPA && status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G) { return true.into(); } + + // DONKEY KONG + if (fighter_kind == *FIGHTER_KIND_DONKEY && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } + + // GAOGAEN + if (fighter_kind == *FIGHTER_KIND_GAOGAEN && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } + if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { return true.into(); } + + // LUIGI + if (fighter_kind == *FIGHTER_KIND_LUIGI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } + if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N) { return true.into(); } + + // PEACH + if (fighter_kind == *FIGHTER_KIND_PEACH && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } + + // DAISY + if (fighter_kind == *FIGHTER_KIND_DAISY && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } + + // SEPHIROTH + if (fighter_kind == *FIGHTER_KIND_EDGE && status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH) { return true.into(); } + + // YOSHI + if (fighter_kind == *FIGHTER_KIND_YOSHI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } + + // PAC-MAN + if (fighter_kind == *FIGHTER_KIND_PACMAN && status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN) { return true.into(); } + + // SORA + if (fighter_kind == *FIGHTER_KIND_TRAIL && status_kind == *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END) { return true.into(); } + + // CHARIZARD + if (fighter_kind == *FIGHTER_KIND_PLIZARDON && status_kind == *FIGHTER_PLIZARDON_STATUS_KIND_SPECIAL_S_END) { return true.into(); } + + //KING DEDEDE + if fighter_kind == *FIGHTER_KIND_DEDEDE + && [ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE + ].contains(&status_kind){ + return true.into(); + } + + // FOX + if fighter_kind == *FIGHTER_KIND_FOX + && [ + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_HIT, + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_END + ].contains(&status_kind) { + return true.into(); + } + + // WOLF + if fighter_kind == *FIGHTER_KIND_WOLF + && [ + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_HIT, + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_END + ].contains(&status_kind) { + return true.into(); + } + + // NESS + if fighter_kind == *FIGHTER_KIND_NESS + && [ + *FIGHTER_STATUS_KIND_SPECIAL_HI, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END + ].contains(&status_kind) { + return true.into(); + } + + // LUCAS + if fighter_kind == *FIGHTER_KIND_LUCAS + && [ + *FIGHTER_STATUS_KIND_SPECIAL_HI, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END + ].contains(&status_kind) { + return true.into(); + } + + return false.into(); +} + +extern "C" { + #[link_name = "\u{1}_ZN3app11FighterUtil33get_ground_correct_kind_air_transERNS_26BattleObjectModuleAccessorEi"] + fn get_ground_correct_kind_air_trans(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32; +} + +//================================================================= +//== FighterUtil::get_ground_correct_kind_air_trans +//== Note: Aerial ECB fixes for Link, Captain, Simon, Richter +//================================================================= +#[skyline::hook(replace=get_ground_correct_kind_air_trans)] +unsafe fn get_ground_correct_kind_air_trans_hook(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32 { + return *GROUND_CORRECT_KIND_AIR; +} + +//================================================================= +//== GroundModule::can_entry_cliff +//== Note: Handles ledgehogging, fighter-specific ledge entry, +// and disallows rising ledge grabs (for non-specials) +//================================================================= +#[skyline::hook(replace=GroundModule::can_entry_cliff)] +unsafe fn can_entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { + let situation_kind = StatusModule::situation_kind(boma); + let status_kind = StatusModule::status_kind(boma); + let fighter_kind = boma.kind(); + + let rising: f32 = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Rising while jumping/airdodging + + let tether_zair = boma.is_fighter() + && [*FIGHTER_KIND_LUCAS, *FIGHTER_KIND_YOUNGLINK, *FIGHTER_KIND_TOONLINK, *FIGHTER_KIND_SAMUS, *FIGHTER_KIND_SAMUSD, *FIGHTER_KIND_SZEROSUIT].contains(&fighter_kind) + && [*FIGHTER_STATUS_KIND_AIR_LASSO, *FIGHTER_STATUS_KIND_AIR_LASSO_REACH, *FIGHTER_STATUS_KIND_AIR_LASSO_HANG, *FIGHTER_STATUS_KIND_AIR_LASSO_REWIND].contains(&status_kind); + + let tether_special = boma.is_fighter() + && ( (fighter_kind == *FIGHTER_KIND_SZEROSUIT && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) + || (fighter_kind == *FIGHTER_KIND_SHIZUE && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) + || (fighter_kind == *FIGHTER_KIND_TANTAN && (status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)) + || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) + || (fighter_kind == *FIGHTER_KIND_JACK && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) + || (fighter_kind == *FIGHTER_KIND_PFUSHIGISOU && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); + + let tether_aerial = boma.is_fighter() + && ( (fighter_kind == *FIGHTER_KIND_SIMON && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) + || (fighter_kind == *FIGHTER_KIND_RICHTER && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) + || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); + + // Ledgehog code + let cliff_id = GroundModule::get_cliff_id_uint32(boma); + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as u32; + for object_id in util::get_all_active_battle_object_ids() { + let object = ::utils::util::get_battle_object_from_id(object_id); + if !object.is_null() { + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) == WorkModule::get_int(&mut *(*object).module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) { + continue; + } + + if VarModule::get_int(object, vars::common::instance::LEDGE_ID) == cliff_id as i32 { + if !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { + return 0; + } + } + } + } + + if boma.is_fighter() { + // Character specific ledge grabbing rules + // If check_cliff_entry_specializer returns 0, disable ledge grabbing + // If check_cliff_entry_specializer returns 1, run the rising check + // Otherwise (-1 returned) skip the rise check and let the vanilla behavior take place + if check_cliff_entry_specializer(boma) == 0 { + return 0; + } + else if check_cliff_entry_specializer(boma) == 1 { + // Disable grabbing ledge while rising during an airborne state (not specials) + if situation_kind == *SITUATION_KIND_AIR { + if rising >= 0.0 && !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { + return 0; + } + } + } + + // Unable to grab ledge during runfall/walkfall (the first few frames after you run off an edge) + if boma.is_motion_one_of(&[Hash40::new("run_fall_l"), Hash40::new("run_fall_r"), Hash40::new("walk_fall_l"), Hash40::new("walk_fall_r")]) { + return 0; + } + } + + original!()(boma) +} + +//================================================================= +//== GroundModule::can_entry_cliff specializer +//================================================================= +unsafe fn check_cliff_entry_specializer(boma: &mut BattleObjectModuleAccessor) -> i32 { + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + let motion_kind = MotionModule::motion_kind(boma); + let prev_status_kind = StatusModule::prev_status_kind(boma, 0); + let prev_status_kind_2 = StatusModule::prev_status_kind(boma, 1); + let frame = MotionModule::frame(boma); + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + + if fighter_kind == *FIGHTER_KIND_MARIO { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DONKEY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 65.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LINK { + if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END]) { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SAMUS || fighter_kind == *FIGHTER_KIND_SAMUSD { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 35.0 { + return 0; + } + } + } + + // Yoshi: Unchanged + + // Kirby: Unchanged + + if fighter_kind == *FIGHTER_KIND_FOX { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 5.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 8.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_PIKACHU { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { + return 1; + } + /* + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { + if frame < 39.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LUIGI { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 31.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_NESS { + if status_kind == *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK { + /* + if frame > 5.0 && frame < 15.0 { + return 1; + } + else{ + return -1; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_CAPTAIN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 41.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + if frame < 34.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PEACH || fighter_kind == *FIGHTER_KIND_DAISY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 24.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { + if frame < 20.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KOOPA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A { + if prev_status_kind != *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { + if frame < 37.0 { + return 1; + } + } + else { + return 1; + } + } + } + + // Ice Climbers + if [*FIGHTER_KIND_ICE_CLIMBER, *FIGHTER_KIND_POPO, *FIGHTER_KIND_NANA].contains(&fighter_kind) { + if [*FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PRE, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_PULL_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP].contains(&status_kind) { + return -1; + } + if status_kind == *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_FAIL { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_SHEIK { + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_MOVE { + return 1; + } + + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 1; + } + } + + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK || status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN { + if frame < 17.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ZELDA { + if status_kind == *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_MARIOD { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PICHU { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { + return 1; + } + /* + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { + if frame < 39.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_FALCO { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 5.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 8.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MARTH || fighter_kind == *FIGHTER_KIND_LUCINA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 20.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_YOUNGLINK { + if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GANON { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 39.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 42.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MEWTWO { + if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + + if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_3 { + if frame < 6.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_2 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_3 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_4 { + if frame < 35.0 { + return 0; + } + } + } + + // Chrom: Unchanged + + if fighter_kind == *FIGHTER_KIND_GAMEWATCH { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 22.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_METAKNIGHT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_HI_LOOP { + if frame < 28.0 { + return 0; + } + } + + if status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_RUSH { + if frame < 50.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PIT || fighter_kind == *FIGHTER_KIND_PITB { + if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH { + return 0; + } + if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SZEROSUIT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 30.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WARIO { + if status_kind == *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 35.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SNAKE { + if status_kind == *FIGHTER_SNAKE_STATUS_KIND_SPECIAL_HI_HANG { + //if frame < 60.0 { + return 0; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_IKE { + if status_kind == *FIGHTER_IKE_STATUS_KIND_SPECIAL_S_DASH { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_PZENIGAME { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_PLIZARDON { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 38.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DIDDY { + /* + if status_kind == *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER { + if frame < 28.0 { + return 0; + } + } + */ + } + + if fighter_kind == *FIGHTER_KIND_LUCAS { + if status_kind == *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK { + /* + if frame > 5.0 && frame < 15.0 { + return 1; + } + else{ + return -1; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_SONIC { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 0; + } + if status_kind == *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 23.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DEDEDE { + if status_kind == *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PIKMIN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_LUCARIO { + if status_kind == *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH { + if frame < 17.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROBOT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_TOONLINK { + if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WOLF { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 11.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MURABITO { + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { + return 0; + } + + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROCKMAN { + if status_kind == *FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 28.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WIIFIT { + if status_kind == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP { + return 0; + } + if prev_status_kind_2 == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP && status_kind == *FIGHTER_STATUS_KIND_FALL_SPECIAL { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROSETTA { + if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_JUMP { + return 0; + } + if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LITTLEMAC { + if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 30.0 { + return 0; + } + } + + if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW { + if frame < 11.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GEKKOUGA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_LOOP { + return 1; + } + /* + if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + } + + if fighter_kind == *FIGHTER_KIND_PALUTENA { + if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_3 { + if frame < 6.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PACMAN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_HI_LOOP { + if frame < 25.0 { + return 1; + } + } + if motion_kind == hash40("special_s_move") || motion_kind == hash40("special_s_dash") { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_REFLET { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 9.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_REFLET_STATUS_KIND_SPECIAL_HI_2 { + if frame < 40.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SHULK { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 28.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KOOPAJR { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_SHOOT { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_DUCKHUNT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY { + //if frame < 60.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_RYU || fighter_kind == *FIGHTER_KIND_KEN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 25.0 { + return 1; + } + } + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND].contains(&status_kind) { + return 1; + } + } + + // Cloud + if fighter_kind == *FIGHTER_KIND_CLOUD { + if motion_kind == hash40("special_hi") || motion_kind == hash40("special_air_hi") { + /* + if frame > 11.0 && frame < 18.0 { + return 0; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_KAMUI { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 45.0 { + return 1; + } + } + } + + // Bayonetta: Unchanged + + if fighter_kind == *FIGHTER_KIND_INKLING { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_JUMP { + return 1; + } + + if status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_ROT { + if frame < 15.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_RIDLEY { + if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_F || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_B || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_HI /*|| status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_LW*/ { + return 0; + } + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE { + //if frame < 39.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_SIMON || fighter_kind == *FIGHTER_KIND_RICHTER { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 31.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KROOL { + if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 0; + //} + } + + if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { + if frame < 14.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SHIZUE { + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { + return 1; + } + + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 10.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GAOGAEN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 1; + } + + if status_kind == *FIGHTER_GAOGAEN_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 4.0 { + return 1; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 41.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_PACKUN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 1; + //} + } + + if status_kind == *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END { + if frame < 14.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_JACK { + if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH { + return 1; + } + + if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_END { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_BRAVE { + if status_kind == *FIGHTER_BRAVE_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 33.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIIFIGHTER { + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_2 || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_3 { + if frame < 26.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_ATTACK { + return 1; + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_END { + if frame < 47.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_WEAK { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 33.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN { + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_JUMP { + if frame < 23.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_WEAK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK { + if frame < 42.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH { + return 1; + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + return 1; + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 41.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIIGUNNER { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 1; + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI2_JUMP { + if frame < 35.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH { + return 1; + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH_END { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_BUDDY { + + if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 32.0 { + return 1; + } + } + + if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH { + return 1; + } + } + + if(fighter_kind == *FIGHTER_KIND_PICKEL){ + if(status_kind == *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_GLIDING){ + if VarModule::get_float(boma.object(), vars::pickel::status::GLIDE_TIMER) < 40.0 /*40 frames of up b travel time*/ { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_EFLAME { + if status_kind == *FIGHTER_EFLAME_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 3.0 { + return 0; + } + } + } + + // General fighter check stuff + if status_kind == *FIGHTER_STATUS_KIND_ESCAPE_AIR{ + return -1; + } + + 1 +} + +pub fn install() { + skyline::install_hooks!( + correct_hook, + get_ground_correct_kind_air_trans_hook, + can_entry_cliff_hook + ); +} diff --git a/fighters/common/src/function_hooks/lua_bind_hook/mod.rs b/fighters/common/src/function_hooks/lua_bind_hook/mod.rs new file mode 100644 index 0000000000..c6965fdc2f --- /dev/null +++ b/fighters/common/src/function_hooks/lua_bind_hook/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod motion; +mod status; +mod ground; +mod work; + +pub fn install() { + motion::install(); + status::install(); + ground::install(); + work::install(); +} \ No newline at end of file diff --git a/fighters/common/src/function_hooks/change_motion.rs b/fighters/common/src/function_hooks/lua_bind_hook/motion.rs similarity index 97% rename from fighters/common/src/function_hooks/change_motion.rs rename to fighters/common/src/function_hooks/lua_bind_hook/motion.rs index 630ad6f2d5..4569cdd483 100644 --- a/fighters/common/src/function_hooks/change_motion.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/motion.rs @@ -1,95 +1,95 @@ -use super::*; -use globals::*; - -//================================================================= -//== CHANGE MOTION HOOKS -//== Note: Hooking functions to clear all hitboxes upon animation changes -//================================================================= - -//================================================================= -//== MotionModule::change_motion -//================================================================= -#[skyline::hook(replace=MotionModule::change_motion)] -unsafe fn change_motion_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: bool, arg6: f32, arg7: bool, arg8: bool) -> u64 { - let mut start_frame = arg3; - change_motion_pos_shift_check(boma); - if boma.is_fighter() { - // Starts landing animations on frame 2 - // This is a purely aesthetic change, makes for snappier landings - if [Hash40::new("landing_heavy"), - Hash40::new("landing_air_n"), - Hash40::new("landing_air_f"), - Hash40::new("landing_air_b"), - Hash40::new("landing_air_hi"), - Hash40::new("landing_air_lw"), - Hash40::new("landing_fall_special")].contains(&motion_hash) - { - start_frame = 1.0; - } - - // Allows a frame-perfect edge canceled waveland to still generate landing smoke GFX - if VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - && MotionModule::motion_kind(boma) == hash40("landing_heavy") { - MotionAnimcmdModule::flush(boma, false); - } - } - original!()(boma, motion_hash, start_frame, arg4, arg5, arg6, arg7, arg8) -} - -#[skyline::hook(replace=MotionModule::change_motion_inherit_frame)] -unsafe fn change_motion_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32, arg6: bool, arg7: bool) -> u64 { - change_motion_pos_shift_check(boma); - if boma.is_fighter() - && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - || StatusModule::is_changing(boma)) - { - MotionAnimcmdModule::flush(boma, false); - } - original!()(boma, motion_hash, arg3, arg4, arg5, arg6, arg7) -} - -#[skyline::hook(replace=MotionModule::change_motion_inherit_frame_keep_rate)] -unsafe fn change_motion_inherit_frame_keep_rate_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { - change_motion_pos_shift_check(boma); - if boma.is_fighter() - && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - || StatusModule::is_changing(boma)) - { - MotionAnimcmdModule::flush(boma, false); - } - original!()(boma, motion_hash, arg3, arg4, arg5) -} - -#[skyline::hook(replace=MotionModule::change_motion_force_inherit_frame)] -unsafe fn change_motion_force_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { - change_motion_pos_shift_check(boma); - original!()(boma, motion_hash, arg3, arg4, arg5) -} - -#[skyline::hook(replace=MotionModule::change_motion_kind)] -unsafe fn change_motion_kind_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40) -> u64 { - change_motion_pos_shift_check(boma); - original!()(boma, motion_hash) -} - -unsafe fn change_motion_pos_shift_check(boma: &mut BattleObjectModuleAccessor) { - if boma.is_fighter() { - if boma.is_prev_situation(*SITUATION_KIND_AIR) - && boma.is_situation(*SITUATION_KIND_GROUND) - { - if KineticModule::get_kinetic_type(boma) == *FIGHTER_KINETIC_TYPE_MOTION { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - } - } - } -} - -pub fn install() { - skyline::install_hooks!( - change_motion_hook, - change_motion_inherit_frame_hook, - change_motion_inherit_frame_keep_rate_hook, - change_motion_force_inherit_frame_hook, - change_motion_kind_hook, - ); -} +use super::*; +use globals::*; + +//================================================================= +//== CHANGE MOTION HOOKS +//== Note: Hooking functions to clear all hitboxes upon animation changes +//================================================================= + +//================================================================= +//== MotionModule::change_motion +//================================================================= +#[skyline::hook(replace=MotionModule::change_motion)] +unsafe fn change_motion_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: bool, arg6: f32, arg7: bool, arg8: bool) -> u64 { + let mut start_frame = arg3; + change_motion_pos_shift_check(boma); + if boma.is_fighter() { + // Starts landing animations on frame 2 + // This is a purely aesthetic change, makes for snappier landings + if [Hash40::new("landing_heavy"), + Hash40::new("landing_air_n"), + Hash40::new("landing_air_f"), + Hash40::new("landing_air_b"), + Hash40::new("landing_air_hi"), + Hash40::new("landing_air_lw"), + Hash40::new("landing_fall_special")].contains(&motion_hash) + { + start_frame = 1.0; + } + + // Allows a frame-perfect edge canceled waveland to still generate landing smoke GFX + if VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + && MotionModule::motion_kind(boma) == hash40("landing_heavy") { + MotionAnimcmdModule::flush(boma, false); + } + } + original!()(boma, motion_hash, start_frame, arg4, arg5, arg6, arg7, arg8) +} + +#[skyline::hook(replace=MotionModule::change_motion_inherit_frame)] +unsafe fn change_motion_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32, arg6: bool, arg7: bool) -> u64 { + change_motion_pos_shift_check(boma); + if boma.is_fighter() + && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + || StatusModule::is_changing(boma)) + { + MotionAnimcmdModule::flush(boma, false); + } + original!()(boma, motion_hash, arg3, arg4, arg5, arg6, arg7) +} + +#[skyline::hook(replace=MotionModule::change_motion_inherit_frame_keep_rate)] +unsafe fn change_motion_inherit_frame_keep_rate_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { + change_motion_pos_shift_check(boma); + if boma.is_fighter() + && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + || StatusModule::is_changing(boma)) + { + MotionAnimcmdModule::flush(boma, false); + } + original!()(boma, motion_hash, arg3, arg4, arg5) +} + +#[skyline::hook(replace=MotionModule::change_motion_force_inherit_frame)] +unsafe fn change_motion_force_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { + change_motion_pos_shift_check(boma); + original!()(boma, motion_hash, arg3, arg4, arg5) +} + +#[skyline::hook(replace=MotionModule::change_motion_kind)] +unsafe fn change_motion_kind_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40) -> u64 { + change_motion_pos_shift_check(boma); + original!()(boma, motion_hash) +} + +unsafe fn change_motion_pos_shift_check(boma: &mut BattleObjectModuleAccessor) { + if boma.is_fighter() { + if boma.is_prev_situation(*SITUATION_KIND_AIR) + && boma.is_situation(*SITUATION_KIND_GROUND) + { + if KineticModule::get_kinetic_type(boma) == *FIGHTER_KINETIC_TYPE_MOTION { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + } + } + } +} + +pub fn install() { + skyline::install_hooks!( + change_motion_hook, + change_motion_inherit_frame_hook, + change_motion_inherit_frame_keep_rate_hook, + change_motion_force_inherit_frame_hook, + change_motion_kind_hook, + ); +} diff --git a/fighters/common/src/function_hooks/change_status.rs b/fighters/common/src/function_hooks/lua_bind_hook/status.rs similarity index 59% rename from fighters/common/src/function_hooks/change_status.rs rename to fighters/common/src/function_hooks/lua_bind_hook/status.rs index b2116c450f..e7615f77bb 100644 --- a/fighters/common/src/function_hooks/change_status.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/status.rs @@ -2,6 +2,176 @@ use super::*; use globals::*; use utils::game_modes::CustomMode; +//================================================================= +//== StatusModule::init_settings +//================================================================= +#[skyline::hook(replace=StatusModule::init_settings)] +unsafe fn init_settings_hook(boma: &mut BattleObjectModuleAccessor, mut situation: smash::app::SituationKind, kinetic_type: i32, arg4: u32, + ground_cliff_check_kind: smash::app::GroundCliffCheckKind, jostle: bool, + keep_flag: i32, keep_int: i32, keep_float: i32, arg10: i32) -> u64 { + let id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + let situation_kind = StatusModule::situation_kind(boma); + let mut cliff_check_kind = ground_cliff_check_kind; + let mut kinetic_type = kinetic_type.clone(); + + // Call edge_slippoffs init_settings + let fix = super::ground::init_settings_edges(boma, situation, kinetic_type, arg4, ground_cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10); + + if boma.is_fighter() { + + if boma.is_prev_situation(*SITUATION_KIND_AIR) + && ( situation.0 == *SITUATION_KIND_GROUND + || (boma.is_situation(*SITUATION_KIND_GROUND) && situation.0 == *SITUATION_KIND_NONE) ) + { + if kinetic_type == *FIGHTER_KINETIC_TYPE_MOTION { + kinetic_type = *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL; + } + } + // Resets your airtime counter when leaving the below statuses + // Prevents ECB from shifting on f1 after an "ignored" status (those defined below) + if boma.is_prev_status_one_of(&[ + *FIGHTER_STATUS_KIND_DEMO, + *FIGHTER_STATUS_KIND_ENTRY, + *FIGHTER_STATUS_KIND_CAPTURE_PULLED, + *FIGHTER_STATUS_KIND_CAPTURE_WAIT, + *FIGHTER_STATUS_KIND_CAPTURE_DAMAGE, + *FIGHTER_STATUS_KIND_THROWN, + *FIGHTER_STATUS_KIND_CATCHED_GANON, + *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, + *FIGHTER_STATUS_KIND_CATCHED_REFLET, + *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, + *FIGHTER_STATUS_KIND_CAPTURE_JACK_WIRE, + *FIGHTER_STATUS_KIND_CAPTURE_MASTER_SWORD]) + && situation.0 == *SITUATION_KIND_AIR + { + WorkModule::set_int(boma, 0, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR); + } + + // Walk through other fighters + JostleModule::set_team(boma, 0); + + // clear platform drop input when entering airdodge (to avoid buffering waveland platdrop with the same down input as the actual waveland) + // if [*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT].contains(&status_kind) { + // ControlModule::reset_flick_y(boma); + // // VarModule::off_flag(boma.object(), vars::common::instance::ENABLE_WAVELAND_PLATDROP); + // } + + if boma.is_prev_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT]) + && boma.is_status(*FIGHTER_STATUS_KIND_LANDING) + && GroundModule::is_passable_ground(boma) { + ControlModule::reset_flick_y(boma); + } + + // Occupy ledge on ledgegrab + if boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_CLIFF_CATCH, + *FIGHTER_STATUS_KIND_CLIFF_CATCH_MOVE, + *FIGHTER_STATUS_KIND_CLIFF_WAIT] + ) { + let cliff_id = GroundModule::get_cliff_id_uint32(boma); + VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, cliff_id as i32); + } + + // heavy item pickup should keep momentum and be affected by gravity in the air + if boma.is_status(*FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP) && boma.is_situation(*SITUATION_KIND_AIR) { + // change the kinetic type to the regular air type + kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; + situation.0 = *SITUATION_KIND_NONE; + } + + if boma.kind() == *FIGHTER_KIND_DONKEY && boma.is_situation(*SITUATION_KIND_AIR) + && boma.is_status_one_of(&[ + *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_START, + *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_WAIT, + *FIGHTER_STATUS_KIND_THROW,]) { + kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; + situation.0 = *SITUATION_KIND_NONE; + } + + // Repeated tilt scaling; UNUSED + /* + if [*FIGHTER_KIND_RYU, *FIGHTER_KIND_KEN, *FIGHTER_KIND_DOLLY].contains(&fighter_kind) { + VarModule::off_flag(boma.object(), vars::common::status::REPEAT_INCREMENTED); + if status_kind != *FIGHTER_STATUS_KIND_ATTACK_HI3 { + if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_HI) > 0 { + VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_HI, 0); + } + } + if ![*FIGHTER_STATUS_KIND_ATTACK_LW3, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_WAIT].contains(&status_kind) { + if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_LW) > 0 { + VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_LW, 0); + } + } + } + */ + + //Sword trails + if (boma.kind() == *FIGHTER_KIND_ROY || boma.kind() == *FIGHTER_KIND_CHROM) + && VarModule::is_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT) { + EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); + if fighter_kind == *FIGHTER_KIND_ROY { + EffectModule::req_follow(boma, Hash40::new("roy_fire_small"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); + } + else if fighter_kind == *FIGHTER_KIND_CHROM { + EffectModule::req_follow(boma, Hash40::new("chrom_sword"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); + } + + if [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) { + VarModule::off_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT); + EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); + } + } + + // Set GroundCliffCheckKind here to pass into init_settings + + if ((boma.kind() == *FIGHTER_KIND_RYU || boma.kind() == *FIGHTER_KIND_KEN) + && boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END])) + || (boma.kind() == *FIGHTER_KIND_FALCO + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + || (boma.kind() == *FIGHTER_KIND_REFLET + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + || (boma.kind() == *FIGHTER_KIND_WOLF + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + { + cliff_check_kind = app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + + if boma.is_prev_status(*FIGHTER_STATUS_KIND_SWALLOWED_DRINK) { + VisibilityModule::set_whole(boma, true); + } + } + + // VarModule Status Variable reset checks + // This makes the assumption that if the KEEP_FLAG is not NONE, you want to clear the + // status variable array for that data type. Because Smash shares its space between + // INT and INT64, I have included both of them under a single check. + let object = boma.object(); + if VarModule::has_var_module(object) { + let mut mask = 0; + if keep_flag != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG { + mask += VarModule::RESET_STATUS_FLAG; + } + if keep_int != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT { + mask += VarModule::RESET_STATUS_INT; + mask += VarModule::RESET_STATUS_INT64; + } + if keep_float != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT { + mask += VarModule::RESET_STATUS_FLOAT; + } + VarModule::reset(object, mask); + } + + original!()(boma, situation, kinetic_type, fix, cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10) +} + #[skyline::hook(replace=StatusModule::change_status_request)] unsafe fn change_status_request_hook(boma: &mut BattleObjectModuleAccessor, status_kind: i32, arg3: bool) -> u64 { let mut next_status = status_kind; @@ -225,6 +395,7 @@ unsafe fn change_status_request_from_script_hook(boma: &mut BattleObjectModuleAc pub fn install() { skyline::install_hooks!( + init_settings_hook, change_status_request_hook, change_status_request_from_script_hook ); diff --git a/fighters/common/src/function_hooks/is_flag.rs b/fighters/common/src/function_hooks/lua_bind_hook/work.rs similarity index 100% rename from fighters/common/src/function_hooks/is_flag.rs rename to fighters/common/src/function_hooks/lua_bind_hook/work.rs diff --git a/fighters/common/src/function_hooks/mod.rs b/fighters/common/src/function_hooks/mod.rs index 5b1803c1b5..9d5840cd11 100644 --- a/fighters/common/src/function_hooks/mod.rs +++ b/fighters/common/src/function_hooks/mod.rs @@ -3,17 +3,11 @@ use crate::globals::*; use std::arch::asm; pub mod energy; pub mod effect; -pub mod edge_slipoffs; -pub mod ledges; pub mod get_param; -pub mod change_motion; pub mod transition; pub mod djcancel; -pub mod init_settings; pub mod momentum_transfer; pub mod hitstun; -pub mod change_status; -pub mod is_flag; pub mod controls; pub mod misc; pub mod jumps; @@ -24,6 +18,7 @@ pub mod collision; pub mod camera; pub mod shotos; pub mod sound; +mod lua_bind_hook; mod fighterspecializer; mod fighter_util; mod vtables; @@ -729,29 +724,22 @@ unsafe fn status_module__change_status(status_module: *const u64, status_kind_ne // Only extra elec hitlag for hit character #[skyline::hook(offset = 0x406824, inline)] unsafe fn change_elec_hitlag_for_attacker(ctx: &mut skyline::hooks::InlineCtx) { - let is_attacker = *ctx.registers[4].w.as_ref() & 1 == 0; - if *ctx.registers[8].x.as_ref() == smash::hash40("collision_attr_elec") && is_attacker { - *ctx.registers[8].x.as_mut() = smash::hash40("collision_attr_normal"); - } + let is_attacker = *ctx.registers[4].w.as_ref() & 1 == 0; + if *ctx.registers[8].x.as_ref() == smash::hash40("collision_attr_elec") && is_attacker { + *ctx.registers[8].x.as_mut() = smash::hash40("collision_attr_normal"); + } } pub fn install() { energy::install(); effect::install(); - edge_slipoffs::install(); - ledges::install(); get_param::install(); - change_motion::install(); transition::install(); djcancel::install(); - init_settings::install(); hitstun::install(); - change_status::install(); - is_flag::install(); controls::install(); momentum_transfer::install(); misc::install(); - //dash_dancing::install(); jumps::install(); stage_hazards::install(); set_fighter_status_data::install(); @@ -760,6 +748,7 @@ pub fn install() { camera::install(); shotos::install(); sound::install(); + lua_bind_hook::install(); fighterspecializer::install(); fighter_util::install(); vtables::install(); diff --git a/fighters/common/src/general_statuses/attack/attackair.rs b/fighters/common/src/general_statuses/attack/attackair.rs index 60d64d326c..a1c7acf9f7 100644 --- a/fighters/common/src/general_statuses/attack/attackair.rs +++ b/fighters/common/src/general_statuses/attack/attackair.rs @@ -106,6 +106,7 @@ fn nro_hook(info: &skyline::nro::NroInfo) { ); } } + pub fn install() { skyline::nro::add_hook(nro_hook); } \ No newline at end of file diff --git a/fighters/common/src/general_statuses/attack/attackdash.rs b/fighters/common/src/general_statuses/attack/attackdash.rs index dd7bcca640..a04ed8520d 100644 --- a/fighters/common/src/general_statuses/attack/attackdash.rs +++ b/fighters/common/src/general_statuses/attack/attackdash.rs @@ -12,6 +12,7 @@ fn nro_hook(info: &skyline::nro::NroInfo) { ); } } + pub fn install() { skyline::nro::add_hook(nro_hook); // Agent::new("fighter") diff --git a/fighters/common/src/misc.rs b/fighters/common/src/misc.rs index 73f750e0d4..5ac512fbc2 100644 --- a/fighters/common/src/misc.rs +++ b/fighters/common/src/misc.rs @@ -171,7 +171,6 @@ pub extern "C" fn fighter_reset(fighter: &mut L2CFighterCommon) { MeterModule::reset(fighter.battle_object); } } - } pub extern "C" fn turbo_mode(fighter: &mut L2CFighterCommon) { diff --git a/fighters/daisy/src/acmd/aerials.rs b/fighters/daisy/src/acmd/aerials.rs index cde4f3fbaf..a11997e7d2 100644 --- a/fighters/daisy/src/acmd/aerials.rs +++ b/fighters/daisy/src/acmd/aerials.rs @@ -1,278 +1,273 @@ use super::*; -unsafe extern "C" fn daisy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("hip"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("hip"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 20.0/(49.0-19.0)); + FT_MOTION_RATE(agent, 20.0/(49.0-19.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn daisy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(16.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(16.5-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 42, 86, 0, 50, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 42, 86, 0, 50, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(40.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(40.0-25.0)); } frame(lua_state, 40.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(6.0-1.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 55, 100, 0, 40, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 55, 100, 0, 40, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 90, 0, 25, 4.5, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 90, 0, 25, 4.5, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_aire_back_atk"), -1); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1, true); + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_aire_back_atk"), -1); } else{ - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_aire_back_atk"), -1); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1, true); + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_aire_back_atk"), -1); } - EFFECT(fighter, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 0, 8, -10.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 0, 8, -10.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn daisy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 75, 95, 0, 45, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 6.5, 75 , 95, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 75, 95, 0, 45, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 6.5, 75 , 95, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 0.0, 2.0, -85, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.5); + } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_smash_s01")); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.6, true, 1.0); } - } -unsafe extern "C" fn daisy_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 0.0, 2.0, -85, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.6, true, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_smash_s01")); } - } -unsafe extern "C" fn daisy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn daisy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); for _ in 0..3 { - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/6.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 50, 0, 20, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 50, 0, 20, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 275, 100, 45, 0, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 275, 100, 45, 0, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/6.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 50, 0, 20, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 50, 0, 20, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 275, 100, 45, 0, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 275, 100, 45, 0, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 16); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 16); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attackairn", daisy_attack_air_n_game) - .acmd("game_attackairf", daisy_attack_air_f_game) - .acmd("game_attackairb", daisy_attack_air_b_game) - .acmd("effect_attackairb", daisy_attack_air_b_effect) - .acmd("game_attackairhi", daisy_attack_air_hi_game) - .acmd("sound_attackairhi", daisy_attack_air_hi_sound) - .acmd("effect_attackairhi", daisy_attack_air_hi_effect) - .acmd("expression_attackairhi", daisy_attack_air_hi_expression) - .acmd("game_attackairlw", daisy_attack_air_lw_game) - .acmd("expression_attackairlw", daisy_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/daisy/src/acmd/ground.rs b/fighters/daisy/src/acmd/ground.rs index f68f737f0f..7eab417fb5 100644 --- a/fighters/daisy/src/acmd/ground.rs +++ b/fighters/daisy/src/acmd/ground.rs @@ -1,143 +1,111 @@ - use super::*; -unsafe extern "C" fn daisy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 75, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 75, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 15, 0, 30, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 15, 0, 30, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn daisy_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(17.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(17.0-10.0)); } - } -unsafe extern "C" fn daisy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 11.0, 80, 75, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 11.0, 80, 75, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - FT_MOTION_RATE(fighter, 10.0/(17.0-10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 10.0/(17.0-10.0)); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.9); - } - /* - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 40, 100, 55, 0, 3.0, 0.0, 7.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 68, 100, 40, 0, 4.0, 0.0, 7.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 30, 100, 45, 0, 3.0, 0.0, 7.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 40, 100, 25, 0, 4.0, 0.0, 7.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 4.0, 40, 100, 58, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("bust"), 4.0, 28, 100, 48, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 2.9); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 2.9); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.9); } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 130, 0, 43, 5.0, 0.0, 8.0, 11.2, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 65, 130, 0, 43, 4.5, 0.0, 8.0, 6.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 65, 130, 0, 43, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - */ - } -unsafe extern "C" fn daisy_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 5.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, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attack11", daisy_attack_11_game) - .acmd("game_attack12", daisy_attack_12_game) - .acmd("game_attackdash", daisy_attack_dash_game) - .acmd("effect_attackdash", daisy_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/daisy/src/acmd/mod.rs b/fighters/daisy/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/daisy/src/acmd/mod.rs +++ b/fighters/daisy/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/daisy/src/acmd/other.rs b/fighters/daisy/src/acmd/other.rs index 9ff9353a9a..89950cec0e 100644 --- a/fighters/daisy/src/acmd/other.rs +++ b/fighters/daisy/src/acmd/other.rs @@ -1,184 +1,105 @@ - 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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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(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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_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_daisy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_daisy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn daisy_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 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("daisy") - .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", daisy_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_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); } diff --git a/fighters/daisy/src/acmd/smashes.rs b/fighters/daisy/src/acmd/smashes.rs index ca8aa4d37d..827ae4dd04 100644 --- a/fighters/daisy/src/acmd/smashes.rs +++ b/fighters/daisy/src/acmd/smashes.rs @@ -1,170 +1,147 @@ - use super::*; -unsafe extern "C" fn daisy_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 65, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 13.0, 210, 65, 0, 58, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.0, 210, 65, 0, 58, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::set_size(boma, 2, 3.8); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 65, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 2, 3.8); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 200, 65, 0, 50, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 200, 65, 0, 50, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_GOLF, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 200, 68, 0, 55, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.556); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.556); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 90, 105, 0, 24, 2.5, 7.0, 0.0, 0.0, Some(2.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 90, 105, 0, 50, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 90, 105, 0, 24, 2.5, 7.0, 0.0, 0.0, Some(2.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 90, 105, 0, 50, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 100, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 85, 100, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 100, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 85, 100, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn daisy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 20, 0, 2.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 20, 0, 2.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 100, 225, 0, 65, 4.3, 0.0, 1.8, 7.5, Some(0.0), Some(1.8), Some(-7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 225, 0, 65, 4.3, 0.0, 1.8, 7.5, Some(0.0), Some(1.8), Some(-7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - FT_MOTION_RATE(fighter, 0.820); + FT_MOTION_RATE(agent, 0.82); } } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attacks4hi", daisy_attack_s4_hi_game) - .acmd("game_attacks4", daisy_attack_s4_s_game) - .acmd("game_attacks4lw", daisy_attack_s4_lw_game) - .acmd("game_attackhi4", daisy_attack_hi4_game) - .acmd("game_attacklw4", daisy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/daisy/src/acmd/specials.rs b/fighters/daisy/src/acmd/specials.rs index a637934b1f..214461d1f8 100644 --- a/fighters/daisy/src/acmd/specials.rs +++ b/fighters/daisy/src/acmd/specials.rs @@ -1,183 +1,143 @@ - use super::*; -unsafe extern "C" fn daisy_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(11.0-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(11.0-5.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn daisy_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(11.0-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(11.0-5.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn daisy_special_s_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(25.0-1.0)); +unsafe extern "C" fn game_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(25.0-1.0)); JostleModule::set_status(boma, false); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 3.5, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false); + SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_PEACH_SPECIAL_S_BRAKE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_PEACH_STATUS_SPECIAL_S_JUMP_ID_TIME_OUT); } } -unsafe extern "C" fn daisy_special_s_hit_end_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, 75, 60, 0, 90, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); +unsafe extern "C" fn game_specialshitend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 60, 0, 90, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); } - } -unsafe extern "C" fn daisy_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn daisy_special_hi_start_expression(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_specialhistart(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn daisy_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn daisy_special_air_hi_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn daisy_special_hi_open_game(fighter: &mut L2CAgentBase) { - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_open"), false, 1.0); } - } -unsafe extern "C" fn daisy_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let item_kind = fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let item_kind = agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); if item_kind == *ITEM_KIND_NONE { ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_DAIKON, false, -1); } else if item_kind == *ITEM_KIND_BOMBHEI { @@ -189,57 +149,57 @@ unsafe extern "C" fn daisy_special_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); } } } -unsafe extern "C" fn daisy_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_hikkonuki"), -1); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_hikkonuki"), -1); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn daisy_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_special_l02")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_special_l01")); - if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(fighter.module_accessor, 0) { - PLAY_SE(fighter, Hash40::new("vc_daisy_appeal_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_special_l01")); + if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE + && ItemModule::is_have_item(boma, 0) { + PLAY_SE(agent, Hash40::new("vc_daisy_appeal_s01")); } } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_specialsstart", daisy_special_s_start_game) - .acmd("game_specialairsstart", daisy_special_air_s_start_game) - .acmd("game_specialsjump", daisy_special_s_jump_game) - .acmd("game_specialshitend", daisy_special_s_hit_end_game) - .acmd("game_specialhistart", daisy_special_hi_start_game) - .acmd("expression_specialhistart", daisy_special_hi_start_expression) - .acmd("game_specialairhistart", daisy_special_air_hi_start_game) - .acmd("expression_specialairhistart", daisy_special_air_hi_start_expression) - .acmd("game_specialhiopen", daisy_special_hi_open_game) - .acmd("game_speciallw", daisy_special_lw_game) - .acmd("effect_speciallw", daisy_special_lw_effect) - .acmd("sound_speciallw", daisy_special_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsjump", game_specialsjump); + agent.acmd("game_specialshitend", game_specialshitend); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialhistart); + agent.acmd("expression_specialhistart", expression_specialhistart); + agent.acmd("expression_specialairhistart", expression_specialairhistart); + agent.acmd("game_specialhiopen", game_specialhiopen); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); } \ No newline at end of file diff --git a/fighters/daisy/src/acmd/throws.rs b/fighters/daisy/src/acmd/throws.rs index 5ce0af2b11..bb2dcb78a9 100644 --- a/fighters/daisy/src/acmd/throws.rs +++ b/fighters/daisy/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn daisy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 daisy_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn daisy_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn daisy_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,84 +63,83 @@ unsafe extern "C" fn daisy_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn daisy_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 70, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 70, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if IS_EXIST_ARTICLE(agent, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_hi"), false, -1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 24); + CHECK_FINISH_CAMERA(agent, 1, 24); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn daisy_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 23.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 145, 70, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 23.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 145, 70, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); if ArticleModule::is_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, smash::phx::Hash40::new("throw_lw"), false, 0.0); ArticleModule::set_rate(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, (34.0 - 1.0)/23.0); } } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 270, 100, 20, 0, 3.8, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 270, 100, 20, 0, 3.8, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1.0, 1.0); + CHECK_FINISH_CAMERA(agent, 1.0, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::set_rate(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, 1.0); } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_catch", daisy_catch_game) - .acmd("game_catchdash", daisy_catch_dash_game) - .acmd("game_catchturn", daisy_catch_turn_game) - .acmd("game_throwhi", daisy_throw_hi_game) - .acmd("game_throwlw", daisy_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/daisy/src/acmd/tilts.rs b/fighters/daisy/src/acmd/tilts.rs index efc20a9546..9c803198cc 100644 --- a/fighters/daisy/src/acmd/tilts.rs +++ b/fighters/daisy/src/acmd/tilts.rs @@ -1,167 +1,149 @@ - use super::*; -unsafe extern "C" fn daisy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 65, 100, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 57, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 3.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 65, 100, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 57, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 3.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 90, 120, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 90, 120, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.909); + FT_MOTION_RATE(agent, 0.909); } - } -unsafe extern "C" fn daisy_attack_s3_s_expression(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_L); +unsafe extern "C" fn expression_attacks3(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_L); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn daisy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 92, 85, 0, 70, 5.0, 0.0, 10.0, 3.5, Some(0.0), Some(10.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.5, 94, 85, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 6.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 92, 85, 0, 70, 5.0, 0.0, 10.0, 3.5, Some(0.0), Some(10.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.5, 94, 85, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 6.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_attack_hi3"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.65, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("daisy_flower_petals"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.75, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_attack_hi3"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.65, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("daisy_flower_petals"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.75, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn daisy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - /* - // Ground only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 275, 85, 0, 100, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 275, 85, 0, 100, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 275, 85, 0, 100, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - // Air only - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 78, 80, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 7.0, 80, 80, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 7.0, 80, 80, 0, 60, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); - AttackModule::set_add_reaction_frame(boma, 2, -3.0, false); - */ - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 77, 66, 0, 77, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 7.0, 81, 66, 0, 77, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 8.0, 85, 66, 0, 77, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legl"), 6.0, 77, 66, 0, 77, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 7.0, 81, 66, 0, 77, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 8.0, 85, 66, 0, 77, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); - FT_MOTION_RATE(fighter, 20.0/(28.0-11.0)); + FT_MOTION_RATE(agent, 20.0/(28.0-11.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn daisy_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 2, 5.5, 4, 0, 190, 1.0, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, true); - EFFECT(fighter, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 2, 5.5, 4, 0, 190, 1.0, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, true); + EFFECT(agent, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attacks3", daisy_attack_s3_s_game) - .acmd("expression_attacks3", daisy_attack_s3_s_expression) - .acmd("game_attackhi3", daisy_attack_hi3_game) - .acmd("effect_attackhi3", daisy_attack_hi3_effect) - .acmd("game_attacklw3", daisy_attack_lw3_game) - .acmd("effect_attacklw3", daisy_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/daisy/src/lib.rs b/fighters/daisy/src/lib.rs index 5537dac979..e41bace68c 100644 --- a/fighters/daisy/src/lib.rs +++ b/fighters/daisy/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("daisy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/daisy/src/opff.rs b/fighters/daisy/src/opff.rs index a08d1b36b5..3ff8c0f9a3 100644 --- a/fighters/daisy/src/opff.rs +++ b/fighters/daisy/src/opff.rs @@ -72,13 +72,13 @@ pub unsafe extern "C" fn daisy_frame_wrapper(fighter: &mut L2CFighterCommon) { common::opff::fighter_common_opff(fighter); daisy_frame(fighter) } + pub unsafe fn daisy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("daisy") - .on_line(Main, daisy_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, daisy_frame_wrapper); } diff --git a/fighters/daisy/src/status/attack_air.rs b/fighters/daisy/src/status/attack_air.rs index 5e5c8b6cb2..a1acee8303 100644 --- a/fighters/daisy/src/status/attack_air.rs +++ b/fighters/daisy/src/status/attack_air.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter); @@ -13,8 +14,6 @@ unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue ret } -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/mod.rs b/fighters/daisy/src/status/mod.rs index 7756735430..123803f5ee 100644 --- a/fighters/daisy/src/status/mod.rs +++ b/fighters/daisy/src/status/mod.rs @@ -1,10 +1,10 @@ use super::*; use globals::*; +// status script import mod attack_air; mod special_s; mod special_lw; -mod uniq_float_start; mod uniq_float; // Prevents sideB from being used again if it has already been used once in the current airtime @@ -58,20 +58,18 @@ unsafe extern "C" fn float_check_air_jump_aerial(fighter: &mut L2CFighterCommon) 0.into() } -extern "C" fn daisy_init(fighter: &mut L2CFighterCommon) { - unsafe { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); } -pub fn install() { - smashline::Agent::new("daisy").on_start(daisy_init).install(); - attack_air::install(); - special_s::install(); - special_lw::install(); - uniq_float_start::install(); - uniq_float::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + special_s::install(agent); + special_lw::install(agent); + uniq_float::install(agent); } \ No newline at end of file diff --git a/fighters/daisy/src/status/special_lw.rs b/fighters/daisy/src/status/special_lw.rs index 3a500e8a37..1393cd0985 100644 --- a/fighters/daisy/src/status/special_lw.rs +++ b/fighters/daisy/src/status/special_lw.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn daisy_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -29,15 +30,15 @@ unsafe extern "C" fn daisy_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -unsafe extern "C" fn daisy_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_ENABLE_ITEM_NO_COUNT); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, *FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, *FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 as i32 - 1 ); - fighter.sub_shift_status_main(L2CValue::Ptr(daisy_special_lw_main_loop as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)); 0.into() } -unsafe extern "C" fn daisy_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -60,7 +61,7 @@ unsafe extern "C" fn daisy_special_lw_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn daisy_special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ItemModule::is_have_item(fighter.module_accessor, 0) { if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) == *ITEM_KIND_NONE { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2508b59a2b), FIGHTER_ITEM_HOLD_KIND_HAVE); @@ -71,10 +72,9 @@ unsafe extern "C" fn daisy_special_lw_end(fighter: &mut L2CFighterCommon) -> L2C } 0.into() } -pub fn install() { - smashline::Agent::new("daisy") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_end) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/daisy/src/status/special_s.rs b/fighters/daisy/src/status/special_s.rs index d81b63901d..744719383c 100644 --- a/fighters/daisy/src/status/special_s.rs +++ b/fighters/daisy/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP @@ -8,8 +7,6 @@ unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CV smashline::original_status(Main, fighter, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP)(fighter) } -pub fn install() { - smashline::Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/uniq_float.rs b/fighters/daisy/src/status/uniq_float.rs index 02d79bc489..b1e5d8a0f8 100644 --- a/fighters/daisy/src/status/uniq_float.rs +++ b/fighters/daisy/src/status/uniq_float.rs @@ -1,17 +1,28 @@ use super::*; -use globals::*; + +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START + +extern "Rust" { + #[link_name = "peach_float_start_main_common"] + fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +unsafe extern "C" fn uniq_float_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + peach_float_start_main_common(fighter) +} + +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT extern "Rust" { #[link_name = "peach_float_main_common"] fn peach_float_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; } -unsafe extern "C" fn uniq_float(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn uniq_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_main_common(fighter) } -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start_main); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/uniq_float_start.rs b/fighters/daisy/src/status/uniq_float_start.rs deleted file mode 100644 index 1232ab721a..0000000000 --- a/fighters/daisy/src/status/uniq_float_start.rs +++ /dev/null @@ -1,17 +0,0 @@ -use super::*; -use globals::*; - -extern "Rust" { - #[link_name = "peach_float_start_main_common"] - fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -unsafe extern "C" fn uniq_float_start(fighter: &mut L2CFighterCommon) -> L2CValue { - peach_float_start_main_common(fighter) -} - -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start) - .install(); -} \ No newline at end of file diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index da31bedd4d..416f39d5b8 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -1,350 +1,344 @@ - use super::*; -unsafe extern "C" fn dedede_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(5.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(5.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 60, 90, 0, 35, 10.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 90, 0, 35, 10.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 95, 0, 40, 8.5, 0.0, 9.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 95, 0, 40, 8.5, 0.0, 9.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dedede_landing_air_n_expression(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_INTP, *SLOPE_STATUS_TOP, 4); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn expression_landingairn(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_INTP, *SLOPE_STATUS_TOP, 4); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn dedede_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 14.4, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 14.4, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.4); - FT_MOTION_RATE_RANGE(fighter, 14.4, 21.0, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 361, 95, 0, 15, 3.0, -9.0, 1.0, 0.0, Some(-12.00), None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 15.0, 361, 95, 0, 15, 7.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE_RANGE(agent, 14.4, 21.0, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 361, 95, 0, 15, 3.0, -9.0, 1.0, 0.0, Some(-12.00), None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 15.0, 361, 95, 0, 15, 7.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 39.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 39.0, 19.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dedede_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_body"), Hash40::new("hammer2"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_body"), Hash40::new("hammer2"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, -62, 75, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, -62, 75, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.3); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, 0, 75, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.9); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, 0, 75, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.9); } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_body"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_body"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), -1); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } - } -unsafe extern "C" fn dedede_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.4); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dedede_landing_air_f_expression(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_TOP); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn expression_landingairf(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_TOP); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -unsafe extern "C" fn dedede_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dedede_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 11.0, -16.0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 11.0, -16.0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } - } -unsafe extern "C" fn dedede_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_attackair_n01")); - PLAY_SE(fighter, Hash40::new("se_dedede_hammer_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_dedede_rnd_attack01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_attackair_n01")); + PLAY_SE(agent, Hash40::new("se_dedede_hammer_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_dedede_rnd_attack01")); } } -unsafe extern "C" fn dedede_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dedede_landing_air_b_expression(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_TOP); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn expression_landingairb(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_TOP); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn dedede_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 9.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 9.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); //AttackModule::set_add_reaction_frame(boma, 0, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 1, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 3, -1.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 9.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 9.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dedede_landing_air_hi_expression(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); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn expression_landingairhi(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); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } } -unsafe extern "C" fn dedede_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(15.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(15.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 22.0); - if is_excute(fighter) { - //ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + //ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dedede_landing_air_lw_expression(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); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); +unsafe extern "C" fn expression_landingairlw(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); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attackairn", dedede_attack_air_n_game) - .acmd("expression_landingairn", dedede_landing_air_n_expression) - .acmd("game_attackairf", dedede_attack_air_f_game) - .acmd("effect_attackairf", dedede_attack_air_f_effect) - .acmd("expression_attackairf", dedede_attack_air_f_expression) - .acmd("expression_landingairf", dedede_landing_air_f_expression) - .acmd("game_attackairb", dedede_attack_air_b_game) - .acmd("effect_attackairb", dedede_attack_air_b_effect) - .acmd("sound_attackairb", dedede_attack_air_b_sound) - .acmd("expression_attackairb", dedede_attack_air_b_expression) - .acmd("expression_landingairb", dedede_landing_air_b_expression) - .acmd("game_attackairhi", dedede_attack_air_hi_game) - .acmd("expression_landingairhi", dedede_landing_air_hi_expression) - .acmd("game_attackairlw", dedede_attack_air_lw_game) - .acmd("expression_landingairlw", dedede_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_landingairn", expression_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("expression_landingairf", expression_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("expression_landingairb", expression_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_landingairhi", expression_landingairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/dedede/src/acmd/ground.rs b/fighters/dedede/src/acmd/ground.rs index 33d71c5c3e..80ecddc48a 100644 --- a/fighters/dedede/src/acmd/ground.rs +++ b/fighters/dedede/src/acmd/ground.rs @@ -1,103 +1,99 @@ - use super::*; -unsafe extern "C" fn dedede_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(9.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(9.0-1.0)); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 5.0, 361, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 5.0, 361, 100, 25, 0, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 5.0, 80, 100, 35, 0, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 5.0, 361, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 5.0, 361, 100, 25, 0, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 5.0, 80, 100, 35, 0, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn dedede_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 0, 0, 45, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(20.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 0, 0, 45, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(20.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn dedede_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.86); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.86); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(25.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(25.0-1.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 35, 92, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 14.0, 35, 92, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 35, 92, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("waist"), 14.0, 35, 92, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 30.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 361, 96, 0, 45, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(5.0), -2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 361, 95, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 10.0, 361, 95, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 361, 96, 0, 45, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(5.0), -2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 361, 95, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("waist"), 10.0, 361, 95, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dedede_attack_100_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -111,7 +107,7 @@ unsafe extern "C" fn dedede_attack_100_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_100_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -135,12 +131,13 @@ unsafe extern "C" fn dedede_attack_100_end_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attack11", dedede_attack_11_game) - .acmd("game_attack12", dedede_attack_12_game) - .acmd("game_attackdash", dedede_attack_dash_game) - .acmd("game_attack100end", dedede_attack_100_end_game) - .acmd("effect_attack100end", dedede_attack_100_end_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("effect_attack100end", effect_attack100end); } diff --git a/fighters/dedede/src/acmd/mod.rs b/fighters/dedede/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/dedede/src/acmd/mod.rs +++ b/fighters/dedede/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index 286738ea62..e53088e71b 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -1,454 +1,153 @@ - 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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_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(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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_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_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_dedede_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dedede_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_dedede_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_dedede_step_right_l")); } } -unsafe extern "C" fn 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 dedede_gordo_special_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let gordo_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - PostureModule::reverse_rot_y_lr(boma); - PostureModule::reverse_lr(boma); - } - /* Prevents backwards gordos */ - if PostureModule::lr(owner_module_accessor) * gordo_speed_x < 0.0{ - KineticModule::mul_speed(boma, &Vector3f{x: -1.0, y: 1.0,z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - /* Checks every frame the gordo is active, set equal to the gordo life param */ - for _ in 0..181{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 2.0) * 0.25); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 120, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); - - //Reduces the max amount of bounces by 1 per recatch on the same gordo - if (WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) - VarModule::get_int(owner_module_accessor.object(), vars::dedede::instance::RECATCH_COUNTER)) < 0{ - StatusModule::change_status_request(fighter.module_accessor, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); - } - } - else{ - /* Reduces damage on every bounce, by 10% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 8.0) * 0.1); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); - } - } - } - wait(lua_state, 1.0); - } - -} - -unsafe extern "C" fn dedede_gordo_special_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ - //Intentionally blank to kill vanilla effects - } -} - -unsafe extern "C" fn dedede_gordo_special_s_shot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - for _ in 0..181{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - GroundModule::update_force(boma); - /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn dedede_gordo_special_s_shot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn dedede_gordo_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - - //Disables vanilla regrab searchbox, this ALWAYS needs to be on due to new regrab - WorkModule::on_flag(owner_module_accessor, *FIGHTER_DEDEDE_INSTANCE_WORK_ID_FLAG_PERSONAL); - let mut speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - let mut speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - - if is_excute(fighter) { - WorkModule::set_int(boma, 300, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - /* below grabs the boma of the opponent hitting gordo, the attack data of that hit, and adjusts the speed accordingly */ - let num_players = Fighter::get_fighter_entry_count(); - if StopModule::is_hit(boma) - && !StopModule::is_hit(owner_module_accessor) { - for i in 0..num_players{ - let opponent_boma = sv_battle_object::module_accessor(Fighter::get_id_from_entry_id(i)); - - if AttackModule::is_infliction(opponent_boma, *COLLISION_KIND_MASK_HIT){ - let data = AttackModule::attack_data(opponent_boma, 0, false); - let mut angle = (*data).vector as f32; - let mut damage = (*data).power; - let kbg = (*data).r_eff as f32; - let bkb = (*data).r_add as f32; - - //Covering sakurai angle and other funky angles - if angle > 360.0{ - angle = 32.0; - } - //Damage cap, gordo goes to the moon otherwise - if damage > 25.0{ - damage = 25.0; - } - - let radians = angle.to_radians(); - let cos = radians.cos(); - let sin = radians.sin(); - - //formulas for the speed multipliers - let x_speed_mul = cos * ((kbg * 0.3718) + bkb / 100.0) * (damage / 8.0) / 70.0; - let y_speed_mul = sin * (damage / 2.5) * ((kbg * 0.3718) + bkb / 100.0) / 60.0 / speed_y; - - KineticModule::mul_speed(boma, &Vector3f{x: x_speed_mul, y: y_speed_mul , z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - /* Seeing the speed is still the same. This only occurs if the above did not run, which happens on projectiles or non-direct hits (Bayo smash attacks) */ - if speed_x == KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL) && speed_y == KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL){ - let damage = DamageModule::damage(boma, 0); - if damage > 11.0{ - KineticModule::mul_speed(boma, &Vector3f{x: 0.8, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - else{ - KineticModule::mul_speed(boma, &Vector3f{x: 0.4 + 0.05 * (damage - 5.0), y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - } - } - for _ in 0..301{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); - if !StopModule::is_stop(boma){ - speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); - speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); - } - let mut speed = speed_x.max(speed_y); - let mut damage = (7.5 * (speed * 0.6)); - damage = damage.max(7.5); - - ATTACK(fighter, 0, 0, Hash40::new("hip"), damage * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn dedede_gordo_special_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - //Intentionally blank to kill vanilla effects - -} - -unsafe extern "C" fn dedede_gordo_special_s_wall_stop_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - - } } -unsafe extern "C" fn dedede_gordo_special_s_start_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } - } - frame(lua_state, 7.0); - if is_excute(fighter){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } -} - -unsafe extern "C" fn dedede_gordo_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } -} - -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, 4.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + if is_excute(agent) { + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); } 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, 4.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + if is_excute(agent) { + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); } 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 fly_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"), 4.0, 70, 65, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); +unsafe extern "C" fn sound_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_dedede_landing03")); } } -unsafe extern "C" fn landing_fall_special_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_dedede_landing03")); - } -} +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("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -pub fn install() { - smashline::Agent::new("dedede_gordo") - .acmd("game_specialsthrow", dedede_gordo_special_s_throw_game) - .acmd("effect_specialsthrow", dedede_gordo_special_s_throw_effect) - .acmd("game_specialsshot", dedede_gordo_special_s_shot_game) - .acmd("effect_specialsshot", dedede_gordo_special_s_shot_effect) - .acmd("game_specialsattack", dedede_gordo_special_s_attack_game) - .acmd("effect_specialsattack", dedede_gordo_special_s_attack_effect) - .acmd("game_specialswallstop", dedede_gordo_special_s_wall_stop_game) - .acmd("game_specialsstart", dedede_gordo_special_s_start_game) - .acmd("game_specialairsstart", dedede_gordo_special_air_s_start_game) - .install(); - smashline::Agent::new("dedede_star") - .acmd("game_fly", fly_game) - .install(); - smashline::Agent::new("dedede") - .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("expression_landingheavy", expression_landingheavy) - .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("sound_landingfallspecial", landing_fall_special_sound) - .install(); + agent.acmd("sound_landingfallspecial", sound_landingfallspecial); } diff --git a/fighters/dedede/src/acmd/smashes.rs b/fighters/dedede/src/acmd/smashes.rs index 1dec7e77de..624950c576 100644 --- a/fighters/dedede/src/acmd/smashes.rs +++ b/fighters/dedede/src/acmd/smashes.rs @@ -1,110 +1,106 @@ - use super::*; -unsafe extern "C" fn dedede_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); let hit1 = Vector2f { x: 16.0, y: 2.0 }; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &hit1, 2, false); AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &hit1, 2, false); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, -5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, -5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.3); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dedede_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.0-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.0-12.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dedede_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.0-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.0-9.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 19.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attacks4", dedede_attack_s4_s_game) - .acmd("game_attackhi4", dedede_attack_hi4_game) - .acmd("game_attacklw4", dedede_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/dedede/src/acmd/specials.rs b/fighters/dedede/src/acmd/specials.rs index df650d03e5..524cc6c368 100644 --- a/fighters/dedede/src/acmd/specials.rs +++ b/fighters/dedede/src/acmd/specials.rs @@ -1,542 +1,540 @@ - use super::*; -unsafe extern "C" fn dedede_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn dedede_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 9.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 6.0, 23.0, Some(0.0), Some(12.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 8.5, 10.0, Some(0.0), Some(8.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 13.0, 5.5, Some(0.0), Some(3.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 8.5, 11.0, Some(0.0), Some(8.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 9.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 6.0, 23.0, Some(0.0), Some(12.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 8.5, 10.0, Some(0.0), Some(8.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 13.0, 5.5, Some(0.0), Some(3.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 8.5, 11.0, Some(0.0), Some(8.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0),Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0),Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } } } -unsafe extern "C" fn dedede_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); +} + +unsafe extern "C" fn game_specialairnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn dedede_special_air_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 12.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 9.0, 23.0, Some(0.0), Some(15.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 11.5, 10.0, Some(0.0), Some(11.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 16.0, 5.5, Some(0.0), Some(6.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 11.5, 11.0, Some(0.0), Some(11.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 12.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 9.0, 23.0, Some(0.0), Some(15.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 11.5, 10.0, Some(0.0), Some(11.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 16.0, 5.5, Some(0.0), Some(6.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 11.5, 11.0, Some(0.0), Some(11.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } } } -unsafe extern "C" fn dedede_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 25.0 / (19.0-1.0)); -} - -unsafe extern "C" fn dedede_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 25.0 / (19.0-1.0)); + FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); } -unsafe extern "C" fn dedede_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_GENERATE); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_PUTOUT); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 35.0 / (65.0-26.0)); + FT_MOTION_RATE(agent, 35.0 / (65.0-26.0)); } -unsafe extern "C" fn dedede_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (PostureModule::lr(boma) == -1.0){ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); } - LAST_EFFECT_SET_COLOR(fighter, 0.96, 0.6, 0.26); + LAST_EFFECT_SET_COLOR(agent, 0.96, 0.6, 0.26); } frame(lua_state, 18.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state,21.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } } -unsafe extern "C" fn dedede_special_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_wad_throw")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_wad_throw")); } } -unsafe extern "C" fn dedede_special_s_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - //RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + //RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_air_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (PostureModule::lr(boma) == -1.0){ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); } - LAST_EFFECT_SET_COLOR(fighter, 0.96, 0.6, 0.26); + LAST_EFFECT_SET_COLOR(agent, 0.96, 0.6, 0.26); } frame(lua_state, 18.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state,21.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } - } -unsafe extern "C" fn dedede_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_GENERATE); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_PUTOUT); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 35.0 / (65.0-26.0)); + FT_MOTION_RATE(agent, 35.0 / (65.0-26.0)); } -unsafe extern "C" fn dedede_special_air_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_wad_throw")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_wad_throw")); } } -unsafe extern "C" fn dedede_special_air_s_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - //RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + //RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_s_miss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsmiss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } } -unsafe extern "C" fn dedede_special_air_s_miss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsmiss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } } -unsafe extern "C" fn dedede_special_s_get_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0 / (65.0 - 26.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0 / (65.0 - 26.0)); } } -unsafe extern "C" fn dedede_special_air_s_get_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 18.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); +unsafe extern "C" fn effect_specialsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent){ + EFFECT(agent, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0 / (65.0 - 26.0)); + frame(lua_state, 5.0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } } } -unsafe extern "C" fn dedede_special_s_get_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT(fighter, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn expression_specialsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 5.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } + frame(lua_state, 18.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_air_s_get_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT(fighter, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn game_specialairsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } - frame(lua_state, 5.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } + frame(lua_state, 25.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0 / (65.0 - 26.0)); } } -unsafe extern "C" fn dedede_special_s_get_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn effect_specialairsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent){ + EFFECT(agent, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 18.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 5.0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } } } -unsafe extern "C" fn dedede_special_air_s_get_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairsget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 13.0/(18.0-1.0)); + if is_excute(agent){ + FT_MOTION_RATE(agent, 13.0/(18.0-1.0)); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_JETHAMMER, false, -1); } } -unsafe extern "C" fn dedede_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 13.0/(18.0-1.0)); + if is_excute(agent){ + FT_MOTION_RATE(agent, 13.0/(18.0-1.0)); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_JETHAMMER, false, -1); } } -unsafe extern "C" fn dedede_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 43.0/(60.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 43.0/(60.0-15.0)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn dedede_special_lw_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 16.0); for _ in 0.. 20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0 * (rush_speed/30.0), 0.0, 0.0)); } wait(lua_state, 1.0); } } -unsafe extern "C" fn dedede_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.5, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 43.0/(60.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 43.0/(60.0-15.0)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn dedede_special_air_lw_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 16.0); for _ in 0.. 20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0 * (rush_speed/30.0), 0.0, 0.0)); } wait(lua_state, 1.0); } } -unsafe extern "C" fn dedede_special_lw_jump_squat_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0 / (8.0-1.0)); +unsafe extern "C" fn game_speciallwjumpsquat(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0 / (8.0-1.0)); } -unsafe extern "C" fn dedede_special_hi_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 4.0, 65, 100, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 4.0, 65, 100, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *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_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SUPER_JUMP_WORK_FLAG_TURN); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -4.0, 0.0)); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 270, 90, 0, 60, 9.8, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 270, 56, 0, 60, 8.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 270, 90, 0, 60, 9.8, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 270, 56, 0, 60, 8.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn dedede_special_hi_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhilanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - if is_excute(fighter){ - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); + if is_excute(agent){ + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); } frame(lua_state, 3.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 90, 82, 0, 95, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 90, 82, 0, 95, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SUPER_JUMP_WORK_FLAG_STAR_RIGHT); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_STAR, false, 0); @@ -545,70 +543,84 @@ unsafe extern "C" fn dedede_special_hi_landing_game(fighter: &mut L2CAgentBase) ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_STAR, false, 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dedede_special_hi_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 13.0 / (20.0 - 1.0)); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); +unsafe extern "C" fn game_specialairhiturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 13.0 / (20.0 - 1.0)); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_specialnstart", dedede_special_n_start_game) - .acmd("game_specialnloop", dedede_special_n_loop_game) - .acmd("game_specialairnstart", dedede_special_air_n_start_game) - .acmd("game_specialairnloop", dedede_special_air_n_loop_game) - .acmd("game_specialnend", dedede_special_n_end_game) - .acmd("game_specialairnend", dedede_special_air_n_end_game) - .acmd("game_specialsstart", dedede_special_s_start_game) - .acmd("effect_specialsstart", dedede_special_s_start_effect) - .acmd("sound_specialsstart", dedede_special_s_start_sound) - .acmd("expression_specialsstart", dedede_special_s_start_expression) - .acmd("effect_specialairsstart", dedede_special_air_s_start_effect) - .acmd("game_specialairsstart", dedede_special_air_s_start_game) - .acmd("sound_specialairsstart", dedede_special_air_s_start_sound) - .acmd("expression_specialairsstart", dedede_special_air_s_start_expression) - .acmd("game_specialsmiss", dedede_special_s_miss_game) - .acmd("game_specialairsmiss", dedede_special_air_s_miss_game) - .acmd("game_specialsget", dedede_special_s_get_game) - .acmd("game_specialairsget", dedede_special_air_s_get_game) - .acmd("effect_specialsget", dedede_special_s_get_effect) - .acmd("effect_specialairsget", dedede_special_air_s_get_effect) - .acmd("expression_specialsget", dedede_special_s_get_expression) - .acmd("expression_specialairsget", dedede_special_air_s_get_expression) - .acmd("game_speciallwstart", dedede_special_lw_start_game) - .acmd("game_specialairlwstart", dedede_special_lw_start_game) - .acmd("game_specialairlwstart", dedede_special_air_lw_start_game) - .acmd("game_speciallw", dedede_special_lw_game) - .acmd("game_speciallwmax", dedede_special_lw_max_game) - .acmd("game_specialairlw", dedede_special_air_lw_game) - .acmd("game_specialairlwmax", dedede_special_air_lw_max_game) - .acmd("game_speciallwjumpsquat", dedede_special_lw_jump_squat_game) - .acmd("game_specialhijump", dedede_special_hi_jump_game) - .acmd("game_specialhilandingr", dedede_special_hi_landing_game) - .acmd("game_specialhilandingl", dedede_special_hi_landing_game) - .acmd("game_specialairhiturnl", dedede_special_hi_turn_game) - .acmd("game_specialairhiturnr", dedede_special_hi_turn_game) - .install(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialnend", game_specialnend); + + agent.acmd("game_specialairnstart", game_specialairnstart); + agent.acmd("game_specialairnloop", game_specialairnloop); + agent.acmd("game_specialairnend", game_specialairnend); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("sound_specialsstart", sound_specialsstart); + agent.acmd("expression_specialsstart", expression_specialsstart); + + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("sound_specialairsstart", sound_specialairsstart); + agent.acmd("expression_specialairsstart", expression_specialairsstart); + + agent.acmd("game_specialsmiss", game_specialsmiss); + + agent.acmd("game_specialairsmiss", game_specialairsmiss); + + agent.acmd("game_specialsget", game_specialsget); + agent.acmd("effect_specialsget", effect_specialsget); + agent.acmd("expression_specialsget", expression_specialsget); + + agent.acmd("game_specialairsget", game_specialairsget); + agent.acmd("effect_specialairsget", effect_specialairsget); + agent.acmd("expression_specialairsget", expression_specialairsget); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + + agent.acmd("game_specialairlwstart", game_specialairlwstart); + + agent.acmd("game_speciallw", game_speciallw); + + agent.acmd("game_speciallwmax", game_speciallwmax); + + agent.acmd("game_specialairlw", game_specialairlw); + + agent.acmd("game_specialairlwmax", game_specialairlwmax); + + agent.acmd("game_speciallwjumpsquat", game_speciallwjumpsquat); + + agent.acmd("game_specialhijump", game_specialhijump); + + agent.acmd("game_specialhilandingr", game_specialhilanding); + agent.acmd("game_specialhilandingl", game_specialhilanding); + + agent.acmd("game_specialairhiturnl", game_specialairhiturn); + agent.acmd("game_specialairhiturnr", game_specialairhiturn); } diff --git a/fighters/dedede/src/acmd/throws.rs b/fighters/dedede/src/acmd/throws.rs index 836a49f8ba..03e074c207 100644 --- a/fighters/dedede/src/acmd/throws.rs +++ b/fighters/dedede/src/acmd/throws.rs @@ -1,160 +1,154 @@ - use super::*; -unsafe extern "C" fn dedede_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 dedede_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 dedede_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.5, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-18.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.5, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-18.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 125, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 125, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 20, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 20, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 5, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - //FT_CATCH_STOP(fighter, 8, 1); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 70, 0, 65, 8.0, 0.0, 8.0, 0.0, Some(-5.0), Some(8.0), Some(5.0), 1.25, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_CATCH_STOP(agent, 8, 1); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 70, 0, 65, 8.0, 0.0, 8.0, 0.0, Some(-5.0), Some(8.0), Some(5.0), 1.25, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 8, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.3); //FighterCutInManager::set_throw_finish_offset(boma, 0, 2, 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 90, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 90, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 80, 0, 30, 7.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 80, 0, 30, 7.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 32); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 32); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.7); //FighterCutInManager::set_throw_finish_offset(boma, 0, 12, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_catch", dedede_catch_game) - .acmd("game_catchdash", dedede_catch_dash_game) - .acmd("game_catchturn", dedede_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/dedede/src/acmd/tilts.rs b/fighters/dedede/src/acmd/tilts.rs index aa33f738cb..692b04e82a 100644 --- a/fighters/dedede/src/acmd/tilts.rs +++ b/fighters/dedede/src/acmd/tilts.rs @@ -1,66 +1,65 @@ use super::*; -unsafe extern "C" fn dedede_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 2.5, 15, 100, 60, 0, 2.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 2.5, 25, 100, 50, 0, 2.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 100, 30, 0, 6.0, 0.0, 7.0, 23.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 100, 100, 30, 0, 4.0, 0.0, 4.0, 20.0, Some(0.0), Some(4.0), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 250, 100, 26, 0, 4.0, 0.0, 10.5, 20.0, Some(0.0), Some(10.5), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 2.5, 15, 100, 60, 0, 2.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 2.5, 25, 100, 50, 0, 2.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 100, 30, 0, 6.0, 0.0, 7.0, 23.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 100, 100, 30, 0, 4.0, 0.0, 4.0, 20.0, Some(0.0), Some(4.0), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 250, 100, 26, 0, 4.0, 0.0, 10.5, 20.0, Some(0.0), Some(10.5), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 3.0, 361, 180, 0, 25, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 3.0, 361, 180, 0, 25, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(43.0-27.0)); + FT_MOTION_RATE(agent, 18.0/(43.0-27.0)); } frame(lua_state, 43.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn dedede_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 7.0, 6.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, -1.5, 1.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, 4.5, 0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, -1.5, 1.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, 4.5, 0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn dedede_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -72,63 +71,61 @@ unsafe extern "C" fn dedede_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dedede_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 4.0, 18.0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 4.0, 18.0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } - } -unsafe extern "C" fn dedede_attack_lw3_expression(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_TOP); +unsafe extern "C" fn expression_attacklw3(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_TOP); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attacks3", dedede_attack_s3_s_game) - .acmd("game_attackhi3", dedede_attack_hi3_game) - .acmd("effect_attackhi3", dedede_attack_hi3_effect) - .acmd("game_attacklw3", dedede_attack_lw3_game) - .acmd("effect_attacklw3", dedede_attack_lw3_effect) - .acmd("expression_attacklw3", dedede_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/dedede/src/gordo/acmd.rs b/fighters/dedede/src/gordo/acmd.rs new file mode 100644 index 0000000000..304f9a8b11 --- /dev/null +++ b/fighters/dedede/src/gordo/acmd.rs @@ -0,0 +1,218 @@ +use super::*; + +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let gordo_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + PostureModule::reverse_rot_y_lr(boma); + PostureModule::reverse_lr(boma); + } + /* Prevents backwards gordos */ + if PostureModule::lr(owner_module_accessor) * gordo_speed_x < 0.0{ + KineticModule::mul_speed(boma, &Vector3f{x: -1.0, y: 1.0,z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + /* Checks every frame the gordo is active, set equal to the gordo life param */ + for _ in 0..181{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 2.0) * 0.25); + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 120, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); + + //Reduces the max amount of bounces by 1 per recatch on the same gordo + if (WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) - VarModule::get_int(owner_module_accessor.object(), vars::dedede::instance::RECATCH_COUNTER)) < 0{ + StatusModule::change_status_request(boma, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); + } + } + else{ + /* Reduces damage on every bounce, by 10% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 8.0) * 0.1); + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); + } + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + //Intentionally blank to kill vanilla effects + } +} + +unsafe extern "C" fn game_specialsshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + for _ in 0..181{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + GroundModule::update_force(boma); + /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialsshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + + //Disables vanilla regrab searchbox, this ALWAYS needs to be on due to new regrab + WorkModule::on_flag(owner_module_accessor, *FIGHTER_DEDEDE_INSTANCE_WORK_ID_FLAG_PERSONAL); + let mut speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let mut speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + + if is_excute(agent) { + WorkModule::set_int(boma, 300, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + /* below grabs the boma of the opponent hitting gordo, the attack data of that hit, and adjusts the speed accordingly */ + let num_players = Fighter::get_fighter_entry_count(); + if StopModule::is_hit(boma) + && !StopModule::is_hit(owner_module_accessor) { + for i in 0..num_players{ + let opponent_boma = sv_battle_object::module_accessor(Fighter::get_id_from_entry_id(i)); + + if AttackModule::is_infliction(opponent_boma, *COLLISION_KIND_MASK_HIT){ + let data = AttackModule::attack_data(opponent_boma, 0, false); + let mut angle = (*data).vector as f32; + let mut damage = (*data).power; + let kbg = (*data).r_eff as f32; + let bkb = (*data).r_add as f32; + + //Covering sakurai angle and other funky angles + if angle > 360.0{ + angle = 32.0; + } + //Damage cap, gordo goes to the moon otherwise + if damage > 25.0{ + damage = 25.0; + } + + let radians = angle.to_radians(); + let cos = radians.cos(); + let sin = radians.sin(); + + //formulas for the speed multipliers + let x_speed_mul = cos * ((kbg * 0.3718) + bkb / 100.0) * (damage / 8.0) / 70.0; + let y_speed_mul = sin * (damage / 2.5) * ((kbg * 0.3718) + bkb / 100.0) / 60.0 / speed_y; + + KineticModule::mul_speed(boma, &Vector3f{x: x_speed_mul, y: y_speed_mul , z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + /* Seeing the speed is still the same. This only occurs if the above did not run, which happens on projectiles or non-direct hits (Bayo smash attacks) */ + if speed_x == KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL) && speed_y == KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL){ + let damage = DamageModule::damage(boma, 0); + if damage > 11.0{ + KineticModule::mul_speed(boma, &Vector3f{x: 0.8, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + else{ + KineticModule::mul_speed(boma, &Vector3f{x: 0.4 + 0.05 * (damage - 5.0), y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + } + } + for _ in 0..301{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); + if !StopModule::is_stop(boma){ + speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); + speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); + } + let mut speed = speed_x.max(speed_y); + let mut damage = (7.5 * (speed * 0.6)); + damage = damage.max(7.5); + + ATTACK(agent, 0, 0, Hash40::new("hip"), damage * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //Intentionally blank to kill vanilla effects + +} + +unsafe extern "C" fn game_specialswallstop(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + + } +} + +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } + } + frame(lua_state, 7.0); + if is_excute(agent){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } +} + +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } +} + +pub fn install(agent: &mut Agent){ + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("effect_specialsthrow", effect_specialsthrow); + + agent.acmd("game_specialsshot", game_specialsshot); + agent.acmd("effect_specialsshot", effect_specialsshot); + + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + + agent.acmd("game_specialswallstop", game_specialswallstop); + + agent.acmd("game_specialsstart", game_specialsstart); + + agent.acmd("game_specialairsstart", game_specialairsstart); +} diff --git a/fighters/dedede/src/gordo/mod.rs b/fighters/dedede/src/gordo/mod.rs new file mode 100644 index 0000000000..661596ace3 --- /dev/null +++ b/fighters/dedede/src/gordo/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("dedede_gordo"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dedede/src/gordo/status.rs b/fighters/dedede/src/gordo/status.rs new file mode 100644 index 0000000000..c863547037 --- /dev/null +++ b/fighters/dedede/src/gordo/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; + +unsafe extern "C" fn dead_end(weapon: &mut L2CWeaponCommon) -> L2CValue{ + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_DEDEDE{ + let dedede = utils::util::get_battle_object_from_id(owner_id); + VarModule::set_flag(dedede, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); + VarModule::set_int(dedede, vars::dedede::instance::RECATCH_COUNTER, 0); + VarModule::set_flag(dedede, vars::dedede::instance::IS_DASH_GORDO, false); + } + return smashline::original_status(End, weapon, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD)(weapon) +} + +pub fn install(agent: &mut Agent){ + agent.status(End, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, dead_end); +} \ No newline at end of file diff --git a/fighters/dedede/src/lib.rs b/fighters/dedede/src/lib.rs index 2e11a95392..f13d2b1a05 100644 --- a/fighters/dedede/src/lib.rs +++ b/fighters/dedede/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +//articles + +pub mod gordo; +pub mod star; use smash::{ lib::{ @@ -37,20 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn dedede_init(fighter: &mut L2CFighterCommon){ - if fighter.global_table[globals::FIGHTER_KIND] != FIGHTER_KIND_DEDEDE{ - return; - } - - VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); -} +#[macro_use] extern crate smash_script; pub fn install() { - smashline::Agent::new("dedede") - .on_start(dedede_init) - .install(); - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("dedede"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + gordo::install(); + star::install(); } diff --git a/fighters/dedede/src/opff.rs b/fighters/dedede/src/opff.rs index e128abd4b7..087c763f1d 100644 --- a/fighters/dedede/src/opff.rs +++ b/fighters/dedede/src/opff.rs @@ -275,8 +275,7 @@ pub unsafe fn dedede_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("dedede") - .on_line(Main, dedede_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dedede_frame_wrapper); } diff --git a/fighters/dedede/src/star/acmd.rs b/fighters/dedede/src/star/acmd.rs new file mode 100644 index 0000000000..1368696bd1 --- /dev/null +++ b/fighters/dedede/src/star/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 65, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent){ + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/dedede/src/star/mod.rs b/fighters/dedede/src/star/mod.rs new file mode 100644 index 0000000000..73a6a60efe --- /dev/null +++ b/fighters/dedede/src/star/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("dedede_star"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status.rs deleted file mode 100644 index e7affe80e4..0000000000 --- a/fighters/dedede/src/status.rs +++ /dev/null @@ -1,41 +0,0 @@ -use super::*; -use globals::*; - -// Prevent going into air jet hammer when Special is released during Jumpsquat - -unsafe extern "C" fn special_lw_jump_squat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ - if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); - } - return 0.into(); -} - -// Reset Gordo recatch flags on despawn - -unsafe extern "C" fn dedede_gordo_dead_end(weapon: &mut L2CWeaponCommon) -> L2CValue{ - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_DEDEDE{ - let dedede = utils::util::get_battle_object_from_id(owner_id); - VarModule::set_flag(dedede, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); - VarModule::set_int(dedede, vars::dedede::instance::RECATCH_COUNTER, 0); - VarModule::set_flag(dedede, vars::dedede::instance::IS_DASH_GORDO, false); - } - return smashline::original_status(End, weapon, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD)(weapon) -} - -unsafe extern "C" fn dedede_special_hi_status_main(fighter: &mut L2CFighterCommon) -> L2CValue{ - MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); - - return 0.into(); -} - -pub fn install() { - smashline::Agent::new("dedede_gordo") - .status(End, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, dedede_gordo_dead_end) - .install(); - smashline::Agent::new("dedede") - .status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec) - .status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, dedede_special_hi_status_main) - .install(); -} \ No newline at end of file diff --git a/fighters/dedede/src/status/mod.rs b/fighters/dedede/src/status/mod.rs new file mode 100644 index 0000000000..6cabc2fcc3 --- /dev/null +++ b/fighters/dedede/src/status/mod.rs @@ -0,0 +1,18 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; +mod special_lw; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon){ + VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi::install(agent); + + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/dedede/src/status/special_hi.rs b/fighters/dedede/src/status/special_hi.rs new file mode 100644 index 0000000000..b4d32406ff --- /dev/null +++ b/fighters/dedede/src/status/special_hi.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE + +unsafe extern "C" fn special_hi_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue{ + MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); + + return 0.into(); +} + +pub fn install(agent: &mut Agent){ + agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, special_hi_failure_main); +} \ No newline at end of file diff --git a/fighters/dedede/src/status/special_lw.rs b/fighters/dedede/src/status/special_lw.rs new file mode 100644 index 0000000000..852d13789e --- /dev/null +++ b/fighters/dedede/src/status/special_lw.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT + +unsafe extern "C" fn special_lw_jump_squat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ + if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec); +} \ No newline at end of file diff --git a/fighters/demon/src/acmd/aerials.rs b/fighters/demon/src/acmd/aerials.rs index 70e1b97f87..91243795c4 100644 --- a/fighters/demon/src/acmd/aerials.rs +++ b/fighters/demon/src/acmd/aerials.rs @@ -1,170 +1,166 @@ use super::*; -unsafe extern "C" fn demon_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 280, 75, 0, 70, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 300, 86, 0, 7, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 280, 75, 0, 70, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 300, 86, 0, 7, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn demon_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 45, 64, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 45, 64, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 45, 64, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 45, 64, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 45, 70, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 45, 70, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 45, 70, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 45, 70, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn demon_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); MotionModule::set_rate(boma, (7.5-6.0)/2.0); } } frame(lua_state, 7.5); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (8.0-7.5)/1.0); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0,Hash40::new("legr"), 14.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0,Hash40::new("kneer"), 16.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0,Hash40::new("toer"), 16.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0,Hash40::new("legr"), 14.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0,Hash40::new("kneer"), 16.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0,Hash40::new("toer"), 16.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0,Hash40::new("legr"), 10.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0,Hash40::new("kneer"), 10.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0,Hash40::new("toer"), 10.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0,Hash40::new("legr"), 10.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0,Hash40::new("kneer"), 10.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0,Hash40::new("toer"), 10.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn demon_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 3.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 3.0, 3.5, 1.0); frame(lua_state, 3.5); - FT_MOTION_RATE_RANGE(fighter, 3.5, 4.0, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toer"), 11.0, 77, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 3.5, 4.0, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toer"), 11.0, 77, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 77, 75, 0, 50, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toer"), 8.0, 77, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 77, 75, 0, 50, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toer"), 8.0, 77, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackairn", demon_attackairn) - .acmd("game_attackairf", demon_attackairf) - .acmd("game_attackairb", demon_attackairb) - .acmd("game_attackairhi", demon_attackairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); } diff --git a/fighters/demon/src/acmd/ground.rs b/fighters/demon/src/acmd/ground.rs index 4e60db6fd5..88b2b37781 100644 --- a/fighters/demon/src/acmd/ground.rs +++ b/fighters/demon/src/acmd/ground.rs @@ -1,159 +1,159 @@ use super::*; -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(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) { JostleModule::set_team(boma, 1); } frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0.05); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.5, 0.0, 12.0, 6.0, Some(0.0), Some(2.5), Some(1.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.5, 0.0, 12.0, 6.0, Some(0.0), Some(2.5), Some(1.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); //ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.6, 1.0, 2.6, 1.8, Some(-1.0), Some(2.6), Some(1.8), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); //AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); //AttackModule::clear(boma, 4); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kazuya_left_splits_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand1(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) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(1.0, 0.0, 0.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 13.0, 275, 40, 0, 95, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 13.0, 275, 40, 0, 95, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legl"), 13.0, 84, 40, 0, 78, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legl"), 13.0, 84, 40, 0, 78, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 5, 10.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 1.1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); } - } -unsafe extern "C" fn kazuya_triple_spin_kicks_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Triple Spin Kicks + +unsafe extern "C" fn game_attackstand21(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 3.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 11.0, 10.5, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 12.0, 2.0, Some(0.0), Some(11.5), Some(7.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 10, 40, 100, 0, 4.0, 0.0, 14.0, 3.0, Some(0.0), Some(13.0), Some(9.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 11.0, 10.5, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 12.0, 2.0, Some(0.0), Some(11.5), Some(7.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 10, 40, 100, 0, 4.0, 0.0, 14.0, 3.0, Some(0.0), Some(13.0), Some(9.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); AttackModule::clear_all(boma); @@ -162,56 +162,56 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_1_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand22(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) { JostleModule::set_team(boma, 1); if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ KineticModule::add_speed(boma, &Vector3f::new(-0.1, 0.0, 0.0)); //FT_MOTION_RATE(fighter, 9.0/(15.0-2.0)); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.25, 3.0, Some(0.0), Some(4.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.5, 3.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.25, 3.0, Some(0.0), Some(4.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.5, 3.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.5, 12.0, Some(0.0), Some(4.4), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(7.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.5, 12.0, Some(0.0), Some(4.4), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(7.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_2_FLAG_CHECK_STEP); @@ -219,35 +219,35 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_2_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand23(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) { JostleModule::set_team(boma, 1); if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 2.0, 0.0, 4.5, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 40, 0, 4.0, 0.0, 7.75, 3.0, Some(0.0), Some(6.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 2.0, 0.0, 4.5, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 40, 0, 4.0, 0.0, 7.75, 3.0, Some(0.0), Some(6.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_2_FLAG_CHECK_STEP); @@ -255,58 +255,60 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_3_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand24(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::demon::instance::SPINNING_DEMON){ - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 8.0); } - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SPINNING_DEMON){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kazuya_tsunami_kick_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Tsunami Kick + +unsafe extern "C" fn game_attackstand31(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 90, 120, 61, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 12.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, Some(0.0), Some(4.2), Some(3.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 90, 120, 61, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 12.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, Some(0.0), Some(4.2), Some(3.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 7.0, false); @@ -315,217 +317,225 @@ unsafe extern "C" fn kazuya_tsunami_kick_1_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 7.0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 5, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0.0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_3_FLAG_CHECK_STEP); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 36.0, 12.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 36.0, 12.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_tsunami_kick_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 42.0-20.0, 15.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 42.0-20.0, 15.0); } } -unsafe extern "C" fn kazuya_stature_smash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Stature Smash + +unsafe extern "C" fn game_attackstand4(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) { JostleModule::set_team(boma, 1); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 12.0-2.0, 8.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 12.0-2.0, 8.0); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 8.0, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 7.0, 9.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(7.0), Some(9.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 8.0, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 7.0, 9.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(7.0), Some(9.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 6.5, 5.5, Some(0.0), Some(6.4), Some(5.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 4.5, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(4.5), Some(6.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 6.5, 5.5, Some(0.0), Some(6.4), Some(5.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 4.5, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(4.5), Some(6.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 39.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 39.0, 21.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_flash_tornado_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Flash Tornado + +unsafe extern "C" fn game_attackstand5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SLAUGHTER_HIGH_KICK){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 62, 65, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 62, 65, 0, 70, 5.2, 0.0, 13.5, 5.5, Some(0.0), Some(16.72), Some(10.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 62, 65, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 62, 65, 0, 70, 5.2, 0.0, 13.5, 5.5, Some(0.0), Some(16.72), Some(10.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 46, 70, 0, 60, 4.0, 0.0, 9.5, 4.5, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 13.0, 46, 80, 0, 55, 5.2, 0.0, 10.5, 5.5, Some(0.0), Some(13.72), Some(10.5), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 46, 70, 0, 60, 4.0, 0.0, 9.5, 4.5, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 13.0, 46, 80, 0, 55, 5.2, 0.0, 10.5, 5.5, Some(0.0), Some(13.72), Some(10.5), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SLAUGHTER_HIGH_KICK){ - FT_DESIRED_RATE(fighter, 35.0-15.0, 18.0); + FT_DESIRED_RATE(agent, 35.0-15.0, 18.0); } } } -unsafe extern "C" fn kazuya_jump_side_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Jumping Side Kick + +unsafe extern "C" fn game_attackstand6(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) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_KEEP_SITUATION_AIR); //WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_IGNORE_CHANGE_FALL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 5.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 48, 65, 0, 72, 3.0, 0.0, 11.5, 8.0, Some(0.0), Some(3.0), Some(3.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 5.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 48, 65, 0, 72, 3.0, 0.0, 11.5, 8.0, Some(0.0), Some(3.0), Some(3.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_KEEP_SITUATION_AIR); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); //WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_IGNORE_CHANGE_FALL); } } -unsafe extern "C" fn kazuya_crouch_jab_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Crouch Jab + +unsafe extern "C" fn game_attacksquat2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 2.0, 0.0, 9.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.4, 0.0, 9.0, 12.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 3.0, 0.0, 3.0, 5.0, Some(0.0), Some(3.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 2.0, 0.0, 9.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.4, 0.0, 9.0, 12.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 3.0, 0.0, 3.0, 5.0, Some(0.0), Some(3.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 0, true); AttackModule::set_add_reaction_frame_revised(boma, 1, 16.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 16.0, false); @@ -533,86 +543,90 @@ unsafe extern "C" fn kazuya_crouch_jab_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 0, 22.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO_INPUT); } } -unsafe extern "C" fn kazuya_crouching_spin_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Crouching Spin Kick + +unsafe extern "C" fn game_attacksquat3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 5.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 78, 20, 0, 80, 4.0, 0.0, 0.0, -0.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 0.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 4.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 78, 20, 0, 80, 4.0, 0.0, 0.0, -0.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 0.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 4.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); //AttackModule::set_add_reaction_frame_revised(boma, 0, 10.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 10.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 10.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.5); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 35.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 35.0, 14.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_demon_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Demon God Fist + +unsafe extern "C" fn game_attacksquat4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); //ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(18.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD){ KineticModule::add_speed(boma, &Vector3f::new(1.0, 0.0, 0.0)); } AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD){ KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0.0, 0.0)); } - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 2.0, 0.0, 11.25, 9.0, None, None, None, 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 2.0, 0.0, 11.25, 9.0, None, None, None, 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); AttackModule::set_attack_level(boma, 2, 2 as u8); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); @@ -623,27 +637,25 @@ unsafe extern "C" fn kazuya_demon_god_fist_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 2, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackdash", game_attackdash) - .acmd("game_attackstand1", kazuya_left_splits_kick_game) - .acmd("game_attackstand21", kazuya_triple_spin_kicks_1_game) - .acmd("game_attackstand22", kazuya_triple_spin_kicks_2_game) - .acmd("game_attackstand23", kazuya_triple_spin_kicks_3_game) - .acmd("game_attackstand24", kazuya_triple_spin_kicks_4_game) - .acmd("game_attackstand31", kazuya_tsunami_kick_1_game) - .acmd("game_attackstand32", kazuya_tsunami_kick_2_game) - .acmd("game_attackstand4", kazuya_stature_smash_game) - .acmd("game_attackstand5", kazuya_flash_tornado_game) - .acmd("game_attackstand6", kazuya_jump_side_kick_game) - .acmd("game_attacksquat2", kazuya_crouch_jab_game) - .acmd("game_attacksquat3", kazuya_crouching_spin_kick_game) - .acmd("game_attacksquat4", kazuya_demon_god_fist_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attackstand1", game_attackstand1); + agent.acmd("game_attackstand21", game_attackstand21); + agent.acmd("game_attackstand22", game_attackstand22); + agent.acmd("game_attackstand23", game_attackstand23); + agent.acmd("game_attackstand24", game_attackstand24); + agent.acmd("game_attackstand31", game_attackstand31); + agent.acmd("game_attackstand32", game_attackstand32); + agent.acmd("game_attackstand4", game_attackstand4); + agent.acmd("game_attackstand5", game_attackstand5); + agent.acmd("game_attackstand6", game_attackstand6); + agent.acmd("game_attacksquat2", game_attacksquat2); + agent.acmd("game_attacksquat3", game_attacksquat3); + agent.acmd("game_attacksquat4", game_attacksquat4); } diff --git a/fighters/demon/src/acmd/jabs.rs b/fighters/demon/src/acmd/jabs.rs index 84f1162955..f4e22e5587 100644 --- a/fighters/demon/src/acmd/jabs.rs +++ b/fighters/demon/src/acmd/jabs.rs @@ -1,27 +1,27 @@ use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ MotionModule::change_motion(boma, Hash40::new("flash_punch"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 6.0-2.0, 2.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 6.0-2.0, 2.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 4, false); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); @@ -29,39 +29,38 @@ unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.3); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { JostleModule::set_team(boma, 1); JostleModule::set_push_speed_x_overlap_rate(boma, 20.0); - FT_DESIRED_RATE(fighter, 7.0-1.0, 4.0); + FT_DESIRED_RATE(agent, 7.0-1.0, 4.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 4, false); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); @@ -70,7 +69,7 @@ unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); @@ -78,34 +77,34 @@ unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH); } } -unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.0, 0.0, 14.5, 10.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 9.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 3.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 8.75, 9.0, Some(0.0), Some(13.5), Some(9.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 9.0, 3.0, Some(0.0), Some(13.5), Some(3.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 33, 15, 0, 35, 3.6, 0.0, 15.0, 3.0, Some(0.0), Some(15.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.0, 0.0, 14.5, 10.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 9.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 3.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 8.75, 9.0, Some(0.0), Some(13.5), Some(9.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 9.0, 3.0, Some(0.0), Some(13.5), Some(3.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 33, 15, 0, 35, 3.6, 0.0, 15.0, 3.0, Some(0.0), Some(15.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); @@ -113,239 +112,236 @@ unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack14(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack14(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 2.0, 0.0, 14.0, 10.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 9.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 4.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 9.0, Some(0.0), Some(13.0), Some(9.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 36, 15, 0, 30, 3.6, 0.0, 14.0, 4.0, Some(0.0), Some(14.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 2.0, 0.0, 14.0, 10.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 9.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 4.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 9.0, Some(0.0), Some(13.0), Some(9.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 36, 15, 0, 30, 3.6, 0.0, 14.0, 4.0, Some(0.0), Some(14.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack15(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack15(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 42, 20, 0, 40, 4.0, 0.0, 13.0, 4.0, Some(0.0), Some(15.0), Some(11.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 6.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 9.75, 7.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 13.5, 10.75, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 2.5, 0.0, 14.5, 10.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 42, 20, 0, 40, 4.0, 0.0, 13.0, 4.0, Some(0.0), Some(15.0), Some(11.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 6.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 9.75, 7.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 13.5, 10.75, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 2.5, 0.0, 14.5, 10.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 1, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 9.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack16(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack16(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 12.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 15.0, 11.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 12.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 12.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 15.0, 11.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 12.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.1), Some(10.5), 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 8.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.1), Some(10.5), 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 8.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack17(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 6.5, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.5, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 6.5, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.5, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 9.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack18(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 8.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.75, 5.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.25, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.25, 10.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.75, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 8.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.75, 5.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.25, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.25, 10.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.75, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 6.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack19(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack19(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 2.0, 0.0, 11.5, 7.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 4.0, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(7.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 2.0, 0.0, 11.5, 7.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 4.0, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(7.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_attack_level(boma, 0, *FIGHTER_RYU_SAVING_LV_2 as u8); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack110(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack110(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) { JostleModule::set_team(boma, 1); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 2.0, 0.0, 16.0, 7.0, Some(0.0), Some(14.0), Some(6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 10.0, 5.5, Some(0.0), Some(16.0), Some(7.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(10.0), Some(5.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 2.0, 0.0, 16.0, 7.0, Some(0.0), Some(14.0), Some(6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 10.0, 5.5, Some(0.0), Some(16.0), Some(7.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(10.0), Some(5.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_flashpunch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_flashpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 5.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(7.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 5.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(7.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let x_pos = 13.0; let y_pos = 6.0; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &Vector2f::new(x_pos, y_pos), 4, false); AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &Vector2f::new(x_pos, y_pos), 4, false); } else{ - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 361, 100, 35, 0, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 361, 100, 35, 0, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ VarModule::off_flag(boma.object(), vars::demon::instance::DEVASTATOR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attack13", game_attack13) - .acmd("game_attack14", game_attack14) - .acmd("game_attack15", game_attack15) - .acmd("game_attack16", game_attack16) - .acmd("game_attack17", game_attack17) - .acmd("game_attack18", game_attack18) - .acmd("game_attack19", game_attack19) - .acmd("game_attack110", game_attack110) - .acmd("game_flashpunch", game_flashpunch) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack14", game_attack14); + agent.acmd("game_attack15", game_attack15); + agent.acmd("game_attack16", game_attack16); + agent.acmd("game_attack17", game_attack17); + agent.acmd("game_attack18", game_attack18); + agent.acmd("game_attack19", game_attack19); + agent.acmd("game_attack110", game_attack110); + agent.acmd("game_flashpunch", game_flashpunch); } diff --git a/fighters/demon/src/acmd/mod.rs b/fighters/demon/src/acmd/mod.rs index 1e69804cc9..8f58255a0a 100644 --- a/fighters/demon/src/acmd/mod.rs +++ b/fighters/demon/src/acmd/mod.rs @@ -1,20 +1,21 @@ use super::*; -mod aerials; + mod jabs; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - jabs::install(); - ground::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - tilts::install(); +pub fn install(agent: &mut Agent) { + jabs::install(agent); + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/demon/src/acmd/other.rs b/fighters/demon/src/acmd/other.rs index 8122e366fe..e9895e379a 100644 --- a/fighters/demon/src/acmd/other.rs +++ b/fighters/demon/src/acmd/other.rs @@ -1,301 +1,222 @@ 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_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(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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_rnd_futtobi01"), Hash40::new("seq_demon_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_demon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dashb_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -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 demon_appeal_s_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 11.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 5, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 6, 9.0, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 62.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 7, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 8, 10.0, false); AttackModule::set_attack_camera_quake_forced(boma, 7, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 8, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn demon_appeal_s_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 11.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 5, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 6, 9.0, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 62.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_APPEAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 7, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 8, 10.0, false); AttackModule::set_attack_camera_quake_forced(boma, 7, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 8, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("demon") - .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("sound_dashb", dashb_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealsr", demon_appeal_s_r_game) - .acmd("game_appealsl", demon_appeal_s_l_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_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_dash", sound_dash); + agent.acmd("sound_dashb", sound_dashb); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("game_appealsl", game_appealsl); } diff --git a/fighters/demon/src/acmd/smashes.rs b/fighters/demon/src/acmd/smashes.rs index 4f3db4705e..c43f766f0a 100644 --- a/fighters/demon/src/acmd/smashes.rs +++ b/fighters/demon/src/acmd/smashes.rs @@ -1,22 +1,22 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::set_int(boma, -1, *FIGHTER_DEMON_STATUS_ATTACK_S4_WORK_INT_CRITICAL_HIT_NO); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); } frame(lua_state, 10.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); @@ -28,27 +28,27 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { frame(lua_state, 14.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 25.0); - FT_DESIRED_RATE(fighter, 28.0-25.0, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + FT_DESIRED_RATE(agent, 28.0-25.0, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); WorkModule::set_int(boma, 2, *FIGHTER_DEMON_STATUS_ATTACK_S4_WORK_INT_CRITICAL_HIT_NO); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 25.0, 361, 75, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 25.0, 361, 75, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.75); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.75); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); if !WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_S4_FLAG_HIT) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 51.0); @@ -65,54 +65,54 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0-1.0, 9.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 14.0-1.0, 9.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); } frame(lua_state, 12.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 4.75, 0.0, 9.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 11.0, 3.5, Some(0.0), Some(8.0), Some(2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 4.75, 0.0, 9.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 11.0, 3.5, Some(0.0), Some(8.0), Some(2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 19.0, 90, 62, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 19.0, 90, 62, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 51.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); frame(lua_state, 53.0); @@ -123,22 +123,22 @@ unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); } frame(lua_state, 12.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); @@ -150,60 +150,60 @@ unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); frame(lua_state, 16.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 2.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 4.0, -5.0, 2.5, 11.5, Some(5.0), Some(2.5), Some(11.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 2.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 4.0, -5.0, 2.5, 11.5, Some(5.0), Some(2.5), Some(11.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } @@ -221,10 +221,8 @@ unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/demon/src/acmd/specials.rs b/fighters/demon/src/acmd/specials.rs index 72eec8ac8d..bb51fec70b 100644 --- a/fighters/demon/src/acmd/specials.rs +++ b/fighters/demon/src/acmd/specials.rs @@ -1,66 +1,68 @@ use super::*; -unsafe extern "C" fn game_attackstep(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attackstep(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn kazuya_wind_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +// Wind God Fist + +unsafe extern "C" fn game_attackstep2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.15, 0.0, 0.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.15, 0.0, 0.0)); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 13.5, 88, 10, 0, 98, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.5, 88, 10, 0, 98, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 1.2); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 13.5, 88, 10, 0, 98, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 88, 10, 0, 98, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 1.2); AttackModule::set_add_reaction_frame_revised(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 15.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 15.0, false); @@ -75,65 +77,66 @@ unsafe extern "C" fn kazuya_wind_god_fist_game(fighter: &mut L2CAgentBase) { //AttackModule::set_attack_camera_quake_forced(boma, 5, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kazuya_electric_wind_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +// Electric Wind God Fist + +unsafe extern "C" fn game_attackstep2f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.15, 0.0, 0.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.15, 0.0, 0.0)); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.5, 86, 20, 0, 85, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.8); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 5, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.8); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.5, 86, 20, 0, 85, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.8); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 5, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.8); AttackModule::set_add_reaction_frame_revised(boma, 0, 12.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 12.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 12.0, false); @@ -148,61 +151,70 @@ unsafe extern "C" fn kazuya_electric_wind_god_fist_game(fighter: &mut L2CAgentBa AttackModule::set_attack_camera_quake_forced(boma, 5, *CAMERA_QUAKE_KIND_S, false); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 6, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } +} +// Electric Wind God Fist (When Hitting Shield) + +unsafe extern "C" fn game_attackstep2fhitshield(_agent: &mut L2CAgentBase) { + // if is_excute(agent) { + // ATTACK_FP(agent, 6, 1, Hash40::new("top"), 0, 361, 100, 65, 0, 12, 0, 10, 10, Hash40::new("collision_attr_normal"), 0, 0, 0, false, false, 0, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *COLLISION_SITUATION_MASK_G, true, *ATTACK_REGION_NONE, *COLLISION_CATEGORY_MASK_FIGHTER, false, *COLLISION_PART_MASK_ALL, false, false, false, false, 0, false, false, *ATTACK_LR_CHECK_POS, false, false, true, true, false, *COLLISION_SHAPE_TYPE_SPHERE); + // } } -unsafe extern "C" fn kazuya_spinning_demon_to_left_hook_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Spinning Demon to Left Hook + +unsafe extern "C" fn game_attackstep2s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); KineticModule::add_speed(boma, &Vector3f::new(0.1, 0.0, 0.0)); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 72, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 85, 100, 50, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 72, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 85, 100, 50, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_add_reaction_frame(boma, 2, 20.0, false); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 33.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 33.0, 14.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.1, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 4.0, 0.0, 15.0, 7.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 14.0, 9.0, Some(0.0), Some(8.5), Some(9.0), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 13.0, 3.5, Some(0.0), Some(5.5), Some(3.5), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 4.0, 0.0, 15.0, 7.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 14.0, 9.0, Some(0.0), Some(8.5), Some(9.0), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 13.0, 3.5, Some(0.0), Some(5.5), Some(3.5), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, -10.0, false); AttackModule::set_add_reaction_frame(boma, 1, -10.0, false); AttackModule::set_add_reaction_frame(boma, 2, -10.0, false); @@ -213,264 +225,264 @@ unsafe extern "C" fn kazuya_spinning_demon_to_left_hook_game(fighter: &mut L2CAg AttackModule::set_attack_camera_quake(boma, 2, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 235, 100, 16, 0, 10.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 235, 100, 16, 0, 10.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 45.0); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - FT_MOTION_RATE(fighter, 0.2); + FT_MOTION_RATE(agent, 0.2); } else{ - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kazuya_lightning_uppercut_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Dragon Uppercut + +unsafe extern "C" fn game_attackstep2l(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 7.0); if VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - FT_MOTION_RATE_RANGE(fighter, 7.0, 19.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 19.0, 10.0); } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); AttackModule::set_damage_shake_scale(boma, 1.5); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 22.0, 60, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, 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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 10.5, 4.75, Some(0.0), Some(16.0), Some(7.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, 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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 5.0, 2.5, Some(0.0), Some(10.5), Some(4.75), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 0.5); + ATTACK(agent, 0, 0, Hash40::new("handl"), 22.0, 60, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, 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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 10.5, 4.75, Some(0.0), Some(16.0), Some(7.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, 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_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 5.0, 2.5, Some(0.0), Some(10.5), Some(4.75), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::set_damage_shake_scale(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 18.0, 70, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.1), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 70, 60, 0, 80, 5.0, 0.0, 13.0, 3.0, Some(0.0), Some(23.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); + ATTACK(agent, 0, 0, Hash40::new("handl"), 18.0, 70, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.1), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 70, 60, 0, 80, 5.0, 0.0, 13.0, 3.0, Some(0.0), Some(23.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 70, 50, 0, 60, 5.0, 0.0, 14.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 70, 50, 0, 60, 5.0, 0.0, 14.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 14.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.5, 3.0, Some(0.0), Some(24.5), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.5, 3.0, Some(0.0), Some(24.5), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 22.0, 3.0, Some(0.0), Some(25.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 22.0, 3.0, Some(0.0), Some(25.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kazuya_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_CHANGE_HIT); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - //FT_MOTION_RATE(fighter, 30.0/(62.0-15.0)); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + //FT_MOTION_RATE(agent, 30.0/(62.0-15.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 62.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); - //FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn kazuya_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 49.0, 40.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 49.0, 40.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } } -unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); FighterSpecializer_Demon::set_devil(boma, true, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); FighterSpecializer_Demon::set_devil(boma, true, 5.0); frame(lua_state, 12.0); FighterSpecializer_Demon::set_devil(boma, true, 4.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); FighterSpecializer_Demon::set_devil(boma, true, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_CHANGE_HIT); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 16.0); FighterSpecializer_Demon::set_devil(boma, true, 1.0); @@ -490,278 +502,271 @@ unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn kazuya_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 49.0, 30.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 49.0, 30.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_LANDING); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } } -unsafe extern "C" fn kazuya_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_HI_FLAG_AIR){ - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.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); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } else{ - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.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); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } - } -unsafe extern "C" fn kazuya_special_hi_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 53, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 53, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 65, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 65, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.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); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 85, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 85, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 85, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 85, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn kazuya_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_sign_flash"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_sign_flash"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ColorBlendModule::set_disable_camera_depth_influence(boma, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_ragedrive_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.75, false); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.5, 1.0); - //FLASH(fighter, 0.25, 0.08, 0.6, 0); - //FLASH_SET_DIRECTION(fighter, -1, 0, 0); - //BURN_COLOR(fighter, 8, 3, 36, 0); - //FLASH_FRM(fighter, 2, 0.25, 0.08, 0.6, 0.4); - //BURN_COLOR_FRAME(fighter, 2, 8, 3, 36, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("demon_ragedrive_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.75, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.5, 1.0); + //FLASH(agent, 0.25, 0.08, 0.6, 0); + //FLASH_SET_DIRECTION(agent, -1, 0, 0); + //BURN_COLOR(agent, 8, 3, 36, 0); + //FLASH_FRM(agent, 2, 0.25, 0.08, 0.6, 0.4); + //BURN_COLOR_FRAME(agent, 2, 8, 3, 36, 0.4); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start_aura"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start_elec"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start_aura"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start_elec"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - //FLASH(fighter, 0.25, 0.08, 0.6, 0.4); - //BURN_COLOR(fighter, 8, 3, 36, 0.4); - //FLASH_FRM(fighter, 3, 0.25, 0.08, 0.6, 0); - //BURN_COLOR_FRAME(fighter, 3, 8, 3, 36, 0); + if is_excute(agent) { + //FLASH(agent, 0.25, 0.08, 0.6, 0.4); + //BURN_COLOR(agent, 8, 3, 36, 0.4); + //FLASH_FRM(agent, 3, 0.25, 0.08, 0.6, 0); + //BURN_COLOR_FRAME(agent, 3, 8, 3, 36, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn game_attackstep2fhitshield(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - //ATTACK_FP(fighter, 6, 1, Hash40::new("top"), 0, 361, 100, 65, 0, 12, 0, 10, 10, Hash40::new("collision_attr_normal"), 0, 0, 0, false, false, 0, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *COLLISION_SITUATION_MASK_G, true, *ATTACK_REGION_NONE, *COLLISION_CATEGORY_MASK_FIGHTER, false, *COLLISION_PART_MASK_ALL, false, false, false, false, 0, false, false, *ATTACK_LR_CHECK_POS, false, false, true, true, false, *COLLISION_SHAPE_TYPE_SPHERE); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } @@ -905,25 +910,21 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.75); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackstep", game_attackstep) - .acmd("game_attackstep2", kazuya_wind_god_fist_game) - .acmd("game_attackstep2f", kazuya_electric_wind_god_fist_game) - .acmd("game_attackstep2s", kazuya_spinning_demon_to_left_hook_game) - .acmd("game_attackstep2l", kazuya_lightning_uppercut_game) - .acmd("game_specials", kazuya_special_s_game) - .acmd("game_specialsend", kazuya_special_s_end_game) - .acmd("game_specialairs", game_specialairs) - .acmd("game_specialairsend", kazuya_special_air_s_end_game) - .acmd("game_specialhi", kazuya_special_hi_game) - .acmd("game_specialhiair", kazuya_special_hi_air_game) - .acmd("effect_specialhistart", kazuya_special_hi_start_effect) - .acmd("effect_specialairhistart", kazuya_special_hi_start_effect) - .acmd("game_attackstep2fhitshield", game_attackstep2fhitshield) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("game_specialairlw", game_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackstep", game_attackstep); + agent.acmd("game_attackstep2", game_attackstep2); + agent.acmd("game_attackstep2f", game_attackstep2f); + agent.acmd("game_attackstep2fhitshield", game_attackstep2fhitshield); + agent.acmd("game_attackstep2s", game_attackstep2s); + agent.acmd("game_attackstep2l", game_attackstep2l); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhiair", game_specialhiair); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("effect_specialairhistart", effect_specialhistart); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/demon/src/acmd/throws.rs b/fighters/demon/src/acmd/throws.rs index d642c532d5..e9c4eb0096 100644 --- a/fighters/demon/src/acmd/throws.rs +++ b/fighters/demon/src/acmd/throws.rs @@ -1,27 +1,27 @@ use super::*; use smash2; -unsafe extern "C" fn demon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(11.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(11.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 demon_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn demon_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn demon_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -61,223 +61,202 @@ unsafe extern "C" fn demon_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn demon_throw_hi_expression(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_throwhi(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); } frame(lua_state, 12.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, 0 as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_80_beam"), 0, false, 0 as u32); } } -unsafe extern "C" fn demon_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 7, 0, 35, 0, 0, false); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 7, 0, 35, 0, 0, false); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwb.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwb.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } frame(lua_state, 27.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 82, 180, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + REVERSE_LR(agent); + //ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 82, 180, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 46.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 58, 55, 0, 60, 4.0, 0.0, 2.0, -12.0, Some(0.0), Some(2.0), Some(-22.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 58, 55, 0, 60, 4.0, 0.0, 2.0, -12.0, Some(0.0), Some(2.0), Some(-22.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 17, 0); + CHECK_FINISH_CAMERA(agent, 17, 0); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); - CAM_ZOOM_OUT(fighter); + CAM_ZOOM_OUT(agent); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 0.375); -} - -unsafe extern "C" fn demon_blaster_fly_throw_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"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 1.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.1); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - } + FT_MOTION_RATE(agent, 0.375); } -unsafe extern "C" fn demon_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 0, 0, 0, 0, 0, false); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwlw.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwlw.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 80, 135, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 80, 135, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 34.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 65, 0, 50, 6.0, 0.0, 12.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 65, 0, 50, 6.0, 0.0, 12.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 9, 4); + CHECK_FINISH_CAMERA(agent, 9, 4); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - CAM_ZOOM_OUT(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + CAM_ZOOM_OUT(agent); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } -unsafe extern "C" fn demon_throw_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwcommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 7, 0, 50, 30, 0, true); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 7, 0, 50, 30, 0, true); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwcommand.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwcommand.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } frame(lua_state, 10.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 165, 150, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 165, 150, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 80, 0, 50, 5.0, 0.0, 8.0, -3.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 80, 0, 50, 5.0, 0.0, 8.0, -3.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 80.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_THROW_COMMAND_FLAG_USE_OTHER_PARAM) { - CHECK_FINISH_CAMERA(fighter, 18, 2); + CHECK_FINISH_CAMERA(agent, 18, 2); } else { - CHECK_FINISH_CAMERA(fighter, 18, 15); + CHECK_FINISH_CAMERA(agent, 18, 15); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 6.0, 0.0, 7.5, -14.0, Some(0.0), Some(6.0), Some(-14.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 4.0, 0.0, 8.0, -6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 6.0, 0.0, 7.5, -14.0, Some(0.0), Some(6.0), Some(-14.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 4.0, 0.0, 8.0, -6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 81.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - CAM_ZOOM_OUT(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + CAM_ZOOM_OUT(agent); } } -pub fn install() { - smashline::Agent::new("demon_blaster") - .acmd("game_flythrow", demon_blaster_fly_throw_game) - .install(); - smashline::Agent::new("demon") - .acmd("game_catch", demon_catch_game) - .acmd("game_catchdash", demon_catch_dash_game) - .acmd("game_catchturn", demon_catch_turn_game) - .acmd("expression_throwhi", demon_throw_hi_expression) - .acmd("game_throwb", demon_throw_b_game) - .acmd("game_throwlw", demon_throw_lw_game) - .acmd("game_throwcommand", demon_throw_command_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwcommand", game_throwcommand); } diff --git a/fighters/demon/src/acmd/tilts.rs b/fighters/demon/src/acmd/tilts.rs index 7ac29b650f..dee2aa79c3 100644 --- a/fighters/demon/src/acmd/tilts.rs +++ b/fighters/demon/src/acmd/tilts.rs @@ -1,70 +1,69 @@ use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 20, 71, 0, 37, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 13.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 15.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 4.25, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 0.8); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 20, 71, 0, 37, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 13.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 15.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 4.25, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 0.8); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(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) { JostleModule::set_team(boma, 1); - VarModule::off_flag(fighter.battle_object, vars::demon::instance::SLAUGHTER_HIGH_KICK); + VarModule::off_flag(agent.battle_object, vars::demon::instance::SLAUGHTER_HIGH_KICK); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ + if VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ MotionModule::change_motion(boma, Hash40::new("attack_hi32"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 8.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 4.0, 8.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 88, 5, 0, 71, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderl"), 6.0, 70, 5, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 88, 5, 0, 71, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderl"), 6.0, 70, 5, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 1.0, false); @@ -73,130 +72,127 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { //AttackModule::set_add_reaction_frame_revised(boma, 5, 3.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_HI_3_FLAG_CHECK_STEP); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 30.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 30.0, 6.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attackhi32(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 4.0, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 4.0, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 7.0, 83, 64, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 7.0, 83, 64, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if !VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ - FT_MOTION_RATE_RANGE(fighter, 24.0, 35.0, 5.0); + if !VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ + FT_MOTION_RATE_RANGE(agent, 24.0, 35.0, 5.0); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 16.0, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 8.0, 16.0, 4.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_LW_3_FLAG_CHECK_STEP); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 271, 20, 0, 100, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 271, 20, 0, 100, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 11.0, 85, 20, 0, 85, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 11.0, 85, 20, 0, 85, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 17.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 17.0, false); AttackModule::set_add_reaction_frame_revised(boma, 5, 17.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 30.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 30.0, 5.0); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attackhi32", game_attackhi32) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attackhi32", game_attackhi32); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/demon/src/blaster/acmd.rs b/fighters/demon/src/blaster/acmd.rs new file mode 100644 index 0000000000..2486564f3f --- /dev/null +++ b/fighters/demon/src/blaster/acmd.rs @@ -0,0 +1,20 @@ +use super::*; + +unsafe extern "C" fn game_flythrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 1.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.1); + } + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flythrow", game_flythrow); +} \ No newline at end of file diff --git a/fighters/demon/src/blaster/mod.rs b/fighters/demon/src/blaster/mod.rs new file mode 100644 index 0000000000..647982629b --- /dev/null +++ b/fighters/demon/src/blaster/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("demon_blaster"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/demon/src/lib.rs b/fighters/demon/src/lib.rs index 5537dac979..48aad9d948 100644 --- a/fighters/demon/src/lib.rs +++ b/fighters/demon/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod blaster; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("demon"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + blaster::install(); } \ No newline at end of file diff --git a/fighters/demon/src/opff.rs b/fighters/demon/src/opff.rs index 5285ed2fdd..d60a3135df 100644 --- a/fighters/demon/src/opff.rs +++ b/fighters/demon/src/opff.rs @@ -255,8 +255,7 @@ pub unsafe fn demon_frame(fighter: &mut L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("demon") - .on_line(Main, demon_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, demon_frame_wrapper); } diff --git a/fighters/demon/src/status.rs b/fighters/demon/src/status.rs deleted file mode 100644 index a2fe665cf8..0000000000 --- a/fighters/demon/src/status.rs +++ /dev/null @@ -1,348 +0,0 @@ -use super::*; -use globals::*; - -utils::import_noreturn!(common::shoto_status::{ - fgc_end_dashback, - ryu_idkwhatthisis2 -}); - -extern "Rust" { - // from common::shoto_status - fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; - fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; - fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -// FIGHTER_DEMON_STATUS_KIND_DASH // - -pub unsafe extern "C" fn status_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Dash_Sub(); - fighter.sub_shift_status_main(L2CValue::Ptr(status_dash_main as *const () as _)) -} - -unsafe extern "C" fn status_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_Dash_Main_common(L2CValue::I32(0)).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP { - if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3 != 0 { - let attack_stand_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_attack_step"), hash40("dash_to_attack_stand1_frame")); - if fighter.global_table[CURRENT_FRAME].get_i32() <= attack_stand_frame { - fighter.change_status( - L2CValue::I32(*FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1), // We don't want to change to ESCAPE_AIR_SLIDE in case they do a nair dodge - L2CValue::Bool(true) - ); - return L2CValue::I32(0); - } - } - } - } - } - return L2CValue::I32(0); -} - -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_DASH_BACK); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into() -} - -// FIGHTER_DEMON_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // -// Here to force Kazuya to only use neutral attack to continue the combo. - -unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.check_attack_mtrans(); - } - fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_check_attack_mtrans as *const () as _)); - fighter.sub_status_AttackComboCommon(); - WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_STATUS_ATTACK_WORK_INT_100_HIT_NEAR_COUNT_CLIFF_STOP); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attack_main_loop as *const () as _)) -} - -extern "Rust" { - fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; -} - -unsafe extern "C" fn demon_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let change_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - if change_to == *FIGHTER_STATUS_KIND_NONE { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_12") { - if ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH) { - fighter.change_status(FIGHTER_DEMON_STATUS_KIND_FLASH_PUNCH.into(), true.into()); - return 0.into(); - } - } - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if StatusModule::is_changing(fighter.module_accessor) == false { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO) { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - } - } - } - } - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); - if change_to == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - fighter.change_status(FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO.into(), true.into()); - return 0.into(); - } - } - fighter.status_Attack_Main() -} - -// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO // -// Here to force Kazuya to only use neutral attack to continue the combo. - -unsafe extern "C" fn demon_attackcombo_main(fighter: &mut L2CFighterCommon) -> L2CValue { - demon_attackcombo_main_mot_helper(fighter, 2.into()); - MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, false); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attackcombo_main_loop as *const () as _)) -} - -unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterCommon, count: L2CValue) { - let val = count.get_i32(); - WorkModule::set_int(fighter.module_accessor, val, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - let mot : u64; - match val { - 2 => mot = hash40("attack_13"), - 3 => mot = hash40("attack_14"), - 4 => mot = hash40("attack_15"), - 5 => mot = hash40("attack_16"), - 6 => mot = hash40("attack_17"), - 7 => mot = hash40("attack_18"), - 8 => mot = hash40("attack_19"), - _ => mot = hash40("attack_110"), - } - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new_raw(mot), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); -} - -unsafe extern "C" fn demon_attackcombo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() { - return 0.into(); - } - } - let mut next_status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - if next_status != *FIGHTER_STATUS_KIND_NONE { - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { - next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); - } - } - else { - next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - let combo_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - demon_attackcombo_main_mot_helper(fighter, (combo_count + 1).into()); - notify_event_msc_cmd!(fighter, 0x2b94de0d96u64, FIGHTER_LOG_ACTION_CATEGORY_ATTACK, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_16); - return 0.into(); - } - } - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - if next_status != *FIGHTER_STATUS_KIND_NONE { - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - return 0.into(); - } - fighter.change_status(next_status.into(), true.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - 0.into() -} - -unsafe extern "C" fn demon_attackcombo_main_loop_helper_first(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { - let combo_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - let mut status = next_status; - if combo_step != 4 { - if combo_step != 6 { - if combo_step != 7 { - status = demon_attackcombo_main_loop_helper_second(fighter, status); - } - } - } - else { - status = demon_attackcombo_main_loop_helper_second(fighter, status); - } - if status == *FIGHTER_STATUS_KIND_NONE { - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { - if !StatusModule::is_changing(fighter.module_accessor) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO; - } - } - } - } - WorkModule::set_int(fighter.module_accessor, status, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - status -} - -unsafe extern "C" fn demon_attackcombo_main_loop_helper_second(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { - let mut status = next_status; - if next_status != *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623STRICT == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_323CATCH == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623A == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_6N6AB == 0 { - status = *FIGHTER_STATUS_KIND_NONE; - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_CATCH_COMMAND; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2F; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2S; - } - } - else { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623ALONG != 0 { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2L; - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; - } - } - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623BLONG != 0 { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; - } - } - } - status -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("walk_stick_x")); - let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); - - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_LANDING // - -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // -// For fixing momentum transfer - -pub unsafe extern "C" fn attackair_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) -} - -pub fn install() { - smashline::Agent::new("demon") - .status(Main, *FIGHTER_STATUS_KIND_DASH, status_dash) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, demon_attack_main) - .status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, demon_attackcombo_main) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attackair_pre) - .install(); -} \ No newline at end of file diff --git a/fighters/demon/src/status/attack.rs b/fighters/demon/src/status/attack.rs new file mode 100644 index 0000000000..cb4cdf1065 --- /dev/null +++ b/fighters/demon/src/status/attack.rs @@ -0,0 +1,56 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +// Here to force Kazuya to only use neutral attack to continue the combo. + +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.check_attack_mtrans(); + } + fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_check_attack_mtrans as *const () as _)); + fighter.sub_status_AttackComboCommon(); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_STATUS_ATTACK_WORK_INT_100_HIT_NEAR_COUNT_CLIFF_STOP); + fighter.sub_shift_status_main(L2CValue::Ptr(attack_main_loop as *const () as _)) +} + +extern "Rust" { + fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; +} + +unsafe extern "C" fn attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let change_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + if change_to == *FIGHTER_STATUS_KIND_NONE { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_12") { + if ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH) { + fighter.change_status(FIGHTER_DEMON_STATUS_KIND_FLASH_PUNCH.into(), true.into()); + return 0.into(); + } + } + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if StatusModule::is_changing(fighter.module_accessor) == false { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO) { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + } + } + } + } + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); + if change_to == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + fighter.change_status(FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO.into(), true.into()); + return 0.into(); + } + } + fighter.status_Attack_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/attack_air.rs b/fighters/demon/src/status/attack_air.rs new file mode 100644 index 0000000000..bb32bfd772 --- /dev/null +++ b/fighters/demon/src/status/attack_air.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +// For fixing momentum transfer + +pub unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); +} \ No newline at end of file diff --git a/fighters/demon/src/status/attack_combo.rs b/fighters/demon/src/status/attack_combo.rs new file mode 100644 index 0000000000..bd491f1165 --- /dev/null +++ b/fighters/demon/src/status/attack_combo.rs @@ -0,0 +1,166 @@ +use super::*; + +extern "Rust" { + fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; +} + +// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO + +// Here to force Kazuya to only use neutral attack to continue the combo. + +unsafe extern "C" fn attack_combo_main(fighter: &mut L2CFighterCommon) -> L2CValue { + demon_attackcombo_main_mot_helper(fighter, 2.into()); + MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, false); + fighter.sub_shift_status_main(L2CValue::Ptr(attack_combo_main_loop as *const () as _)) +} + +unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterCommon, count: L2CValue) { + let val = count.get_i32(); + WorkModule::set_int(fighter.module_accessor, val, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + let mot : u64; + match val { + 2 => mot = hash40("attack_13"), + 3 => mot = hash40("attack_14"), + 4 => mot = hash40("attack_15"), + 5 => mot = hash40("attack_16"), + 6 => mot = hash40("attack_17"), + 7 => mot = hash40("attack_18"), + 8 => mot = hash40("attack_19"), + _ => mot = hash40("attack_110"), + } + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new_raw(mot), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); +} + +unsafe extern "C" fn attack_combo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() { + return 0.into(); + } + } + let mut next_status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + if next_status != *FIGHTER_STATUS_KIND_NONE { + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { + next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); + } + } + else { + next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + let combo_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + demon_attackcombo_main_mot_helper(fighter, (combo_count + 1).into()); + notify_event_msc_cmd!(fighter, 0x2b94de0d96u64, FIGHTER_LOG_ACTION_CATEGORY_ATTACK, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_16); + return 0.into(); + } + } + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + if next_status != *FIGHTER_STATUS_KIND_NONE { + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + return 0.into(); + } + fighter.change_status(next_status.into(), true.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + 0.into() +} + +unsafe extern "C" fn demon_attackcombo_main_loop_helper_first(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { + let combo_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + let mut status = next_status; + if combo_step != 4 { + if combo_step != 6 { + if combo_step != 7 { + status = demon_attackcombo_main_loop_helper_second(fighter, status); + } + } + } + else { + status = demon_attackcombo_main_loop_helper_second(fighter, status); + } + if status == *FIGHTER_STATUS_KIND_NONE { + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { + if !StatusModule::is_changing(fighter.module_accessor) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO; + } + } + } + } + WorkModule::set_int(fighter.module_accessor, status, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + status +} + +unsafe extern "C" fn demon_attackcombo_main_loop_helper_second(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { + let mut status = next_status; + if next_status != *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623STRICT == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_323CATCH == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623A == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_6N6AB == 0 { + status = *FIGHTER_STATUS_KIND_NONE; + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_CATCH_COMMAND; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2F; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2S; + } + } + else { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623ALONG != 0 { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2L; + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; + } + } + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623BLONG != 0 { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; + } + } + } + status +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, attack_combo_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/dash.rs b/fighters/demon/src/status/dash.rs new file mode 100644 index 0000000000..d7d9fd73e2 --- /dev/null +++ b/fighters/demon/src/status/dash.rs @@ -0,0 +1,32 @@ +use super::*; + +// FIGHTER_STATUS_KIND_DASH + +pub unsafe extern "C" fn dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_Dash_Sub(); + fighter.sub_shift_status_main(L2CValue::Ptr(dash_main_loop as *const () as _)) +} + +unsafe extern "C" fn dash_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_Dash_Main_common(L2CValue::I32(0)).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP { + if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3 != 0 { + let attack_stand_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_attack_step"), hash40("dash_to_attack_stand1_frame")); + if fighter.global_table[CURRENT_FRAME].get_i32() <= attack_stand_frame { + fighter.change_status( + L2CValue::I32(*FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1), + L2CValue::Bool(true) + ); + return L2CValue::I32(0); + } + } + } + } + } + return L2CValue::I32(0); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_DASH, dash_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/dash_back.rs b/fighters/demon/src/status/dash_back.rs new file mode 100644 index 0000000000..23b046853d --- /dev/null +++ b/fighters/demon/src/status/dash_back.rs @@ -0,0 +1,27 @@ +use super::*; + +// FIGHTER_DEMON_STATUS_KIND_DASH_BACK + +utils::import_noreturn!(common::shoto_status::{ + fgc_end_dashback +}); + +extern "Rust" { + fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_DEMON_STATUS_KIND_DASH_BACK // + +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, dash_back_end); +} \ No newline at end of file diff --git a/fighters/demon/src/status/landing.rs b/fighters/demon/src/status/landing.rs new file mode 100644 index 0000000000..07c9175fcf --- /dev/null +++ b/fighters/demon/src/status/landing.rs @@ -0,0 +1,15 @@ +use super::*; + +extern "Rust" { + fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_STATUS_KIND_LANDING + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/mod.rs b/fighters/demon/src/status/mod.rs new file mode 100644 index 0000000000..68f52254a9 --- /dev/null +++ b/fighters/demon/src/status/mod.rs @@ -0,0 +1,23 @@ +use super::*; +use globals::*; +// status script import + +mod wait; +mod dash; +mod turn_dash; +mod landing; + +mod attack; +mod attack_combo; +mod attack_air; + +pub fn install(agent: &mut Agent) { + wait::install(agent); + dash::install(agent); + turn_dash::install(agent); + landing::install(agent); + + attack::install(agent); + attack_combo::install(agent); + attack_air::install(agent); +} \ No newline at end of file diff --git a/fighters/demon/src/status/turn_dash.rs b/fighters/demon/src/status/turn_dash.rs new file mode 100644 index 0000000000..7bc1f4846f --- /dev/null +++ b/fighters/demon/src/status/turn_dash.rs @@ -0,0 +1,23 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_DASH_BACK); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); +} \ No newline at end of file diff --git a/fighters/demon/src/status/wait.rs b/fighters/demon/src/status/wait.rs new file mode 100644 index 0000000000..1fcf67da91 --- /dev/null +++ b/fighters/demon/src/status/wait.rs @@ -0,0 +1,45 @@ +use super::*; + +// FIGHTER_STATUS_KIND_WAIT + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("walk_stick_x")); + let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); + + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file diff --git a/fighters/diddy/src/acmd/aerials.rs b/fighters/diddy/src/acmd/aerials.rs index d2368690bb..fb83583157 100644 --- a/fighters/diddy/src/acmd/aerials.rs +++ b/fighters/diddy/src/acmd/aerials.rs @@ -1,155 +1,151 @@ use super::*; -unsafe extern "C" fn diddy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(7.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 8.0/(41.0-30.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(41.0-30.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn diddy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 361, 98, 0, 35, 3.5, 2.0, -0.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 361, 98, 0, 35, 3.5, 2.0, -0.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 361, 95, 0, 35, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 9.0, 361, 95, 0, 35, 3.0, 0.0, -0.5, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 361, 95, 0, 35, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 9.0, 361, 95, 0, 35, 3.0, 0.0, -0.5, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 2.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 2.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn diddy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 3.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 104, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 104, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn diddy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6, -6.5, 195, 3, 25, 0.95, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6, -6.5, 195, 3, 25, 0.95, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1, 9, -18.5, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1, 9, -18.5, 0, 0, 0, 1, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); } } -unsafe extern "C" fn diddy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 361, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 361, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -163,70 +159,57 @@ unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn diddy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.1); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("diddy_attack_arc"), Hash40::new("diddy_attack_arc"), Hash40::new("top"), 0, 10, 1, -48, 78.5, 51, 1.1, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(agent, 1.9); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); - } -} - -unsafe extern "C" fn diddy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.4); + FT_MOTION_RATE(agent, 0.4); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 90, 0, 25, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 270, 85, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 90, 0, 25, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 270, 85, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 270, 51, 0, 20, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 270, 51, 0, 20, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attackairn", diddy_attack_air_n_game) - .acmd("game_attackairf", diddy_attack_air_f_game) - .acmd("game_attackairb", diddy_attack_air_b_game) - .acmd("effect_attackairb", diddy_attack_air_b_effect) - .acmd("game_attackairhi", diddy_attack_air_hi_game) - .acmd("expression_attackairhi", diddy_attack_air_hi_expression) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", diddy_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/diddy/src/acmd/ground.rs b/fighters/diddy/src/acmd/ground.rs index e51ba7d4d7..082fe6c0f5 100644 --- a/fighters/diddy/src/acmd/ground.rs +++ b/fighters/diddy/src/acmd/ground.rs @@ -1,125 +1,120 @@ - use super::*; -unsafe extern "C" fn diddy_attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn diddy_attack_12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn diddy_attack_13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 361, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 4.0, 4.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 361, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 4.0, 4.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn diddy_attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - smash::app::lua_bind::KineticEnergy::reset_energy(fighter.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), fighter.module_accessor); - smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_mul(fighter.get_controller_energy(), 0.0); - smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_add(fighter.get_controller_energy(), 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + smash::app::lua_bind::KineticEnergy::reset_energy(agent.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), boma); + smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_mul(agent.get_controller_energy(), 0.0); + smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_add(agent.get_controller_energy(), 0.0); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 5.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 75, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 75, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); + if agent.is_situation(*SITUATION_KIND_GROUND) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); } - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 90, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 90, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(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) { if boma.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7, -0.5, 90, 90, 20, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7, -0.5, 90, 90, 20, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1); } - frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind_s"), true, true); if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attack11", diddy_attack_11) - .acmd("game_attack12", diddy_attack_12) - .acmd("game_attack13", diddy_attack_13) - .acmd("game_attackdash", diddy_attack_dash) - .acmd("effect_attackdash", effect_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/diddy/src/acmd/mod.rs b/fighters/diddy/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/diddy/src/acmd/mod.rs +++ b/fighters/diddy/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/diddy/src/acmd/other.rs b/fighters/diddy/src/acmd/other.rs index 14f4bc324b..ccd89b5fb6 100644 --- a/fighters/diddy/src/acmd/other.rs +++ b/fighters/diddy/src/acmd/other.rs @@ -1,183 +1,104 @@ - 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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_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(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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_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_diddy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_diddy_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, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_diddy_step_right_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_diddy_step_right_ll")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_diddy_step_left_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_diddy_step_left_ll")); } } -unsafe extern "C" fn diddy_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, 11.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); } } -unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -194,18 +115,19 @@ unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("diddy") - .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", diddy_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealhil", game_appealhi) - .acmd("game_appealhir", game_appealhi) - .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("game_appealhil", game_appealhil); + agent.acmd("game_appealhir", game_appealhil); } diff --git a/fighters/diddy/src/acmd/smashes.rs b/fighters/diddy/src/acmd/smashes.rs index 227b982536..22e73271e7 100644 --- a/fighters/diddy/src/acmd/smashes.rs +++ b/fighters/diddy/src/acmd/smashes.rs @@ -1,185 +1,182 @@ - use super::*; -unsafe extern "C" fn diddy_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 10, 100, 20, 0, 4.2, 0.0, 9.7, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 45, 100, 35, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 80, 100, 25, 0, 4.0, 4.8, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 22, 100, 42, 0, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 10, 100, 20, 0, 4.2, 0.0, 9.7, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 45, 100, 35, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 80, 100, 25, 0, 4.0, 4.8, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 22, 100, 42, 0, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 100, 20, 0, 4.5, 0.0, 13.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 100, 20, 0, 4.5, 0.0, 13.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 3.0/(21.0-14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 3.0/(21.0-14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 46, 116, 0, 40, 5.0, 5.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 50, 116, 0, 40, 4.5, 1.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 60, 116, 0, 40, 4.0, 0.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 46, 116, 0, 40, 5.0, 5.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 50, 116, 0, 40, 4.5, 1.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 60, 116, 0, 40, 4.0, 0.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_attack_s4_expression(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_attacks4(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); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn diddy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.5, 110, 100, 110, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 125, 100, 30, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.5, 95, 100, 50, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.5, 110, 100, 110, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 125, 100, 30, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.5, 95, 100, 50, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.5, 130, 100, 25, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.5, 130, 100, 25, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 140, 100, 65, 0, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 140, 100, 65, 0, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 80, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 80, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 85, 148, 0, 55, 7.5, 4.5, 0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 6.0, 85, 148, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 85, 148, 0, 55, 7.5, 4.5, 0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 6.0, 85, 148, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn diddy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 16.0, 361, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 361, 80, 0, 40, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 361, 80, 0, 40, 4.5, 5.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 16.0, 361, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 361, 80, 0, 40, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 361, 80, 0, 40, 4.5, 5.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 361, 80, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 80, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 35, 4.5, 5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 361, 80, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 80, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 35, 4.5, 5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attacks4", diddy_attack_s4_game) - .acmd("expression_attacks4", diddy_attack_s4_expression) - .acmd("game_attackhi4", diddy_attack_hi4_game) - .acmd("game_attacklw4", diddy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/diddy/src/acmd/specials.rs b/fighters/diddy/src/acmd/specials.rs index 74810e754a..9d9e70d3c8 100644 --- a/fighters/diddy/src/acmd/specials.rs +++ b/fighters/diddy/src/acmd/specials.rs @@ -1,14 +1,16 @@ - use super::*; -unsafe extern "C" fn diddy_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::clear_speed_all(boma); - KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - +unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } @@ -52,137 +54,84 @@ unsafe extern "C" fn game_specialsstickattack2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsstick(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); //wait_loop_clear(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 2.0, 361, 50, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 2.0, 361, 50, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *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_DIDDY_SCRATCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *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_DIDDY_SCRATCH, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *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_DIDDY_SCRATCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *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_DIDDY_SCRATCH, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_specialairsjump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.4); + FT_MOTION_RATE(agent, 0.4); } -unsafe extern "C" fn game_specialairskick(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); +unsafe extern "C" fn game_specialairskick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(31.0 - 1.0)); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn diddy_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn diddy_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn diddy_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn diddy_special_air_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(35.0 - 1.0)); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::clear_speed_all(boma); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } -unsafe extern "C" fn diddy_special_air_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn diddy_special_air_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn diddy_special_air_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_specialairhistart", diddy_special_air_hi_start_game) - .acmd("game_specialsstickattack", game_specialsstickattack) - .acmd("game_specialsstickattack2", game_specialsstickattack2) - .acmd("game_specialsstick", game_specialsstick) - .acmd("game_specialairsjump", game_specialairsjump) - .acmd("game_specialairskick", game_specialairskick) - .acmd("game_specialncancel", diddy_special_n_cancel_game) - .acmd("effect_specialncancel", diddy_special_n_cancel_effect) - .acmd("sound_specialncancel", diddy_special_n_cancel_sound) - .acmd("expression_specialncancel", diddy_special_n_cancel_expression) - .acmd("game_specialairncancel", diddy_special_air_n_cancel_game) - .acmd("effect_specialairncancel", diddy_special_air_n_cancel_effect) - .acmd("sound_specialairncancel", diddy_special_air_n_cancel_sound) - .acmd("expression_specialairncancel", diddy_special_air_n_cancel_expression) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialncancel", game_specialncancel); + agent.acmd("effect_specialncancel", stub); + agent.acmd("sound_specialncancel", stub); + agent.acmd("expression_specialncancel", stub); + agent.acmd("game_specialairncancel", game_specialncancel); + agent.acmd("effect_specialairncancel", stub); + agent.acmd("sound_specialairncancel", stub); + agent.acmd("expression_specialairncancel", stub); + + agent.acmd("game_specialsstickattack", game_specialsstickattack); + agent.acmd("game_specialsstickattack2", game_specialsstickattack2); + agent.acmd("game_specialsstick", game_specialsstick); + agent.acmd("game_specialairsjump", game_specialairsjump); + agent.acmd("game_specialairskick", game_specialairskick); + + agent.acmd("game_specialairhistart", game_specialairhistart); } diff --git a/fighters/diddy/src/acmd/throws.rs b/fighters/diddy/src/acmd/throws.rs index 288f8ad2a8..1f793f2059 100644 --- a/fighters/diddy/src/acmd/throws.rs +++ b/fighters/diddy/src/acmd/throws.rs @@ -1,150 +1,150 @@ use super::*; -unsafe extern "C" fn diddy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 diddy_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 diddy_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 21.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 21.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 22, 18); + CHECK_FINISH_CAMERA(agent, 22, 18); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 8, 5, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-2.5, y: 9.0, z: -13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let release_position = Vector3f{ x:-2.5, y: 9.0, z: -15.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 75, 120, 0, 50, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 75, 120, 0, 50, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 40); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 40); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2.0); //FighterCutInManager::set_throw_finish_offset(boma, 0, 10.0, 0.0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 27.0, z: -1.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 115, 53, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 115, 53, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 5, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_catch", diddy_catch_game) - .acmd("game_catchdash", diddy_catch_dash_game) - .acmd("game_catchturn", diddy_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/diddy/src/acmd/tilts.rs b/fighters/diddy/src/acmd/tilts.rs index db93e9e44e..c57cf068a1 100644 --- a/fighters/diddy/src/acmd/tilts.rs +++ b/fighters/diddy/src/acmd/tilts.rs @@ -1,42 +1,38 @@ - use super::*; -unsafe extern "C" fn diddy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 100, 105, 0, 45, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 100, 105, 0, 45, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn diddy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 30, 2.5, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 55, 75, 0, 30, 3.0, 0.0, 3.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 65, 75, 0, 30, 4.0, 4.0, 2.5, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 30, 2.5, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 55, 75, 0, 30, 3.0, 0.0, 3.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 65, 75, 0, 30, 4.0, 4.0, 2.5, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attackhi3", diddy_attack_hi3_game) - .acmd("game_attacklw3", diddy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/diddy/src/lib.rs b/fighters/diddy/src/lib.rs index 5537dac979..769b0d5e6e 100644 --- a/fighters/diddy/src/lib.rs +++ b/fighters/diddy/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("diddy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/diddy/src/opff.rs b/fighters/diddy/src/opff.rs index dc2a91107a..0bcbff4b7c 100644 --- a/fighters/diddy/src/opff.rs +++ b/fighters/diddy/src/opff.rs @@ -194,8 +194,7 @@ pub unsafe fn diddy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("diddy") - .on_line(Main, diddy_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, diddy_frame_wrapper); } diff --git a/fighters/diddy/src/status/jump_squat.rs b/fighters/diddy/src/status/jump_squat.rs new file mode 100644 index 0000000000..4a4a845965 --- /dev/null +++ b/fighters/diddy/src/status/jump_squat.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP_SQUAT + +unsafe extern "C" fn jump_squat_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_JumpSquat(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, jump_squat_end); +} \ No newline at end of file diff --git a/fighters/diddy/src/status.rs b/fighters/diddy/src/status/mod.rs similarity index 52% rename from fighters/diddy/src/status.rs rename to fighters/diddy/src/status/mod.rs index a309a454b2..f75c70b3d7 100644 --- a/fighters/diddy/src/status.rs +++ b/fighters/diddy/src/status/mod.rs @@ -1,19 +1,12 @@ use super::*; use globals::*; +// status script import mod special_n; - mod special_s; mod special_s_jump; - mod special_hi; - -// FIGHTER_STATUS_KIND_JUMP_SQUAT - -unsafe extern "C" fn end_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_JumpSquat(); - 0.into() -} +mod jump_squat; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -33,23 +26,18 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn diddy_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_DIDDY { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - special_n::install(); - special_s::install(); - special_s_jump::install(); - special_hi::install(); - smashline::Agent::new("diddy") - .status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat) - .on_start(diddy_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); + special_s_jump::install(agent); + special_hi::install(agent); + jump_squat::install(agent); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_hi.rs b/fighters/diddy/src/status/special_hi.rs index 6c8b47e92a..f111f6dabc 100644 --- a/fighters/diddy/src/status/special_hi.rs +++ b/fighters/diddy/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE @@ -17,9 +16,7 @@ pub unsafe extern "C" fn special_hi_upper_damage_main(fighter: &mut L2CFighterCo ret } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE, special_hi_charge_damage_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER_DAMAGE, special_hi_upper_damage_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE, special_hi_charge_damage_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER_DAMAGE, special_hi_upper_damage_main); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_n.rs b/fighters/diddy/src/status/special_n.rs index 7387eb62b9..f5f0db7d25 100644 --- a/fighters/diddy/src/status/special_n.rs +++ b/fighters/diddy/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { @@ -240,20 +241,14 @@ unsafe extern "C" fn special_n_shoot_motion_helper(fighter: &mut L2CFighterCommo } } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main) - .install(); - smashline::Agent::new("diddy") - .status(Pre, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); - smashline::Agent::new("diddy") - .status(Pre, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre) - .status(Main, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main) - .status(End, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main); + agent.status(Pre, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_end); + agent.status(Pre, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre); + agent.status(Main, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main); + agent.status(End, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_s.rs b/fighters/diddy/src/status/special_s.rs index 0f38acd293..6824e47558 100644 --- a/fighters/diddy/src/status/special_s.rs +++ b/fighters/diddy/src/status/special_s.rs @@ -1,15 +1,12 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); 0.into() } -pub fn install() { - smashline::Agent::new("diddy") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_s_jump.rs b/fighters/diddy/src/status/special_s_jump.rs index 2654a3a2a1..41e4f78c0e 100644 --- a/fighters/diddy/src/status/special_s_jump.rs +++ b/fighters/diddy/src/status/special_s_jump.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { let start_speed_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("monkey_flip_jump_start_spd_y")); @@ -102,8 +101,6 @@ unsafe extern "C" fn special_s_jump_main_loop(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } \ No newline at end of file diff --git a/fighters/dolly/src/acmd/aerials.rs b/fighters/dolly/src/acmd/aerials.rs index 64fd467404..79bccf0b31 100644 --- a/fighters/dolly/src/acmd/aerials.rs +++ b/fighters/dolly/src/acmd/aerials.rs @@ -1,54 +1,52 @@ - use super::*; -unsafe extern "C" fn dolly_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dolly_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -58,69 +56,68 @@ unsafe extern "C" fn dolly_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.000); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 48, 125, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 48, 125, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 48, 125, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 48, 125, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 50, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 50, 80, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 50, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 50, 80, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 3.0, 55, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 55, 105, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 3.0, 55, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 55, 105, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 65, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 65, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dolly_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -130,98 +127,96 @@ unsafe extern "C" fn dolly_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dolly_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 70, 90, 0, 55, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 70, 90, 0, 55, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 70, 90, 0, 55, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 70, 90, 0, 55, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 75, 88, 0, 50, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 75, 88, 0, 50, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 75, 88, 0, 50, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 75, 88, 0, 50, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn dolly_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -231,48 +226,49 @@ unsafe extern "C" fn dolly_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 67, 50, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 67, 50, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else{ // Air-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 15.0, 310, 66, 0, 10, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 15.0, 310, 66, 0, 10, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("shoulderr"), 11.0, 85, 45, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("shoulderr"), 11.0, 85, 45, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attackairn", dolly_attack_air_n_game) - .acmd("game_attackairf", dolly_attack_air_f_game) - .acmd("game_attackairb", dolly_attack_air_b_game) - .acmd("game_attackairhi", dolly_attack_air_hi_game) - .acmd("game_attackairlw", dolly_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/dolly/src/acmd/ground.rs b/fighters/dolly/src/acmd/ground.rs index f340701947..fe23e567ca 100644 --- a/fighters/dolly/src/acmd/ground.rs +++ b/fighters/dolly/src/acmd/ground.rs @@ -1,432 +1,427 @@ - use super::*; -unsafe extern "C" fn dolly_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 5.5, Some(0.0), Some(11.0), Some(5.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 180, 10, 0, 27, 4.0, 0.0, 12.5, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 2.5, Some(0.0), Some(11.0), Some(2.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 5.5, Some(0.0), Some(11.0), Some(5.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 180, 10, 0, 27, 4.0, 0.0, 12.5, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 2.5, Some(0.0), Some(11.0), Some(2.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 3.0, 0.0, 5.0, 2.5, Some(0.0), Some(5.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 3.0, 0.0, 5.0, 2.5, Some(0.0), Some(5.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn dolly_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.5-3.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.5-3.0)); } frame(lua_state, 3.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 275, 15, 0, 28, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 250, 15, 0, 25, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.5, 0.0, 10.0, 6.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 275, 15, 0, 28, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 250, 15, 0, 25, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.5, 0.0, 10.0, 6.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); // Handle the multihit - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 275, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 250, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 361, 15, 0, 25, 4.5, 0.0, 12.0, 10.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); // Handle the multihit + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 275, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 250, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 361, 15, 0, 25, 4.5, 0.0, 12.0, 10.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_attack_12_expression(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_attack12(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); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn dolly_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(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) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { KineticModule::add_speed(boma, &Vector3f::new(1.5, 0.0, 0.0)); } } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 67, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 5.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 67, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 5.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut ex_speed = -3.0; - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 8.0/(10.0-6.0)); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 8.0/(10.0-6.0)); } // EX detection - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 10.0/(10.0-6.0)); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 10.0/(10.0-6.0)); } } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_level(boma, 0, 1 as u8); AttackModule::set_attack_level(boma, 1, 2 as u8); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + //ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); KineticModule::add_speed(boma, &Vector3f::new(ex_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); // Heavy dash attack - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 88, 0, 65, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 88, 0, 65, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } // Light dash attack else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 48, 0, 73, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 48, 0, 73, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } } } wait(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(-1.0*ex_speed, 0.0, 0.0)); } else{ // Heavy dash attack - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 73, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 73, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_BODY); } // Light dash attack else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 75, 63, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 75, 63, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_BODY); } } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 1.250); + MeterModule::watch_damage(agent.battle_object, false); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 1.250); } } } frame(lua_state, 25.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 24.0/(28.0-25.0)); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 24.0/(28.0-25.0)); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.5); } } - } -unsafe extern "C" fn dolly_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } else{ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); } - LAST_EFFECT_SET_RATE(fighter, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); } } } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.0, true); } else{ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } else{ - 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, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } } frame(lua_state, 9.0); for _ in 0..2 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 25.0); for _ in 0..3 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } - } -unsafe extern "C" fn dolly_attack_dash_expression(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_NONE); +unsafe extern "C" fn expression_attackdash(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_NONE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_critical"), 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_critical"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 39.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attack11", dolly_attack_11_game) - .acmd("game_attack12", dolly_attack_12_game) - .acmd("expression_attack12", dolly_attack_12_expression) - .acmd("game_attack13", dolly_attack_13_game) - .acmd("game_attackdash", dolly_attack_dash_game) - .acmd("effect_attackdash", dolly_attack_dash_effect) - .acmd("expression_attackdash", dolly_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/dolly/src/acmd/mod.rs b/fighters/dolly/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/dolly/src/acmd/mod.rs +++ b/fighters/dolly/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/dolly/src/acmd/other.rs b/fighters/dolly/src/acmd/other.rs index f5132d2205..0b3c247cc4 100644 --- a/fighters/dolly/src/acmd/other.rs +++ b/fighters/dolly/src/acmd/other.rs @@ -1,334 +1,196 @@ - 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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_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(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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_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_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dashb_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dolly_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, 11.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 dolly_escape_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.500); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 9.5, 4.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 9.5, 4.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 11.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 12.0, 8.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 11.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 12.0, 8.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 19.0, 4.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 23.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 19.0, 4.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 23.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_landing_fall_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - FT_MOTION_RATE(fighter, 0.35); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + FT_MOTION_RATE(agent, 0.35); } } - -} - -unsafe extern "C" fn dolly_burst_super_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - } -unsafe extern "C" fn dolly_burst_final3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - AttackModule::set_no_dead_all(boma, true, false); - if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, 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_DOLLY_PUNCH, *ATTACK_REGION_BOMB); - } - } - frame(lua_state, 5.0); - if is_excute(fighter) { - if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn dolly_wave_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - MeterModule::add(owner_module_accessor.object(), 8.0); - } -} - -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("dolly") - .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("sound_dashb", dashb_sound) - .acmd("game_turndash", dolly_turn_dash_game) - .acmd("game_escapeattack", dolly_escape_attack_game) - .acmd("game_landingfallspecial", dolly_landing_fall_special_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("dolly_burst") - .acmd("game_superspecial", dolly_burst_super_special_game) - .acmd("game_final3", dolly_burst_final3_game) - .install(); - smashline::Agent::new("dolly_wave") - .acmd("game_hit", dolly_wave_hit_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_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damagefly); + + agent.acmd("sound_dash", sound_dash); + + agent.acmd("sound_dashb", sound_dashb); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeattack", game_escapeattack); + + agent.acmd("game_landingfallspecial", game_landingfallspecial); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/dolly/src/acmd/smashes.rs b/fighters/dolly/src/acmd/smashes.rs index 78ab9fc03c..3638eaedbe 100644 --- a/fighters/dolly/src/acmd/smashes.rs +++ b/fighters/dolly/src/acmd/smashes.rs @@ -1,30 +1,29 @@ - use super::*; -unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut shatter_strike_speed = -0.5; - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - if MeterModule::drain(fighter.battle_object, 2) { - VarModule::on_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); + if MeterModule::drain(agent.battle_object, 2) { + VarModule::on_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); } } - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - FT_MOTION_RATE(fighter, 1.000); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + FT_MOTION_RATE(agent, 1.000); } else{ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); @@ -32,26 +31,26 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); KineticModule::add_speed(boma, &Vector3f::new(shatter_strike_speed, 0.0, 0.0)); } } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_level(boma, 0, 3 as u8); AttackModule::set_attack_level(boma, 1, 3 as u8); AttackModule::set_attack_level(boma, 2, 3 as u8); @@ -68,22 +67,22 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 5, 60.0, false); AttackModule::set_add_reaction_frame(boma, 6, 60.0, false); AttackModule::set_add_reaction_frame(boma, 7, 60.0, false); - FT_MOTION_RATE(fighter, 2.0/(18.0-13.0)); + FT_MOTION_RATE(agent, 2.0/(18.0-13.0)); // Add more negative speed to counteract the faster animation speed KineticModule::add_speed(boma, &Vector3f::new(2.5*shatter_strike_speed, 0.0, 0.0)); } else{ - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 16.0, 361, 85, 0, 50, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 16.0, 361, 85, 0, 50, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } @@ -91,12 +90,12 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - FT_MOTION_RATE(fighter, 10.0/(20.0-18.0)); + MeterModule::watch_damage(agent.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + FT_MOTION_RATE(agent, 10.0/(20.0-18.0)); // Counteract the added speed we had during the faster part of the animation KineticModule::add_speed(boma, &Vector3f::new(-2.5*shatter_strike_speed, 0.0, 0.0)); // Add positive speed to keep the speed consistent through the slower part of the animation [anim is 80% slower <10/(20-18) = 0.2; 1-0.2 = 0.8> so counteract 80% of the originally added speed] @@ -106,253 +105,250 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract the added speed we had during the slower part of the animation, and the additional forward speed we added KineticModule::add_speed(boma, &Vector3f::new(0.8*shatter_strike_speed, 0.0, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(0.2*shatter_strike_speed, 0.0, 0.0)); // Add positive speed to counteract the original added speed on frame 9 by 40% KineticModule::add_speed(boma, &Vector3f::new(-0.4*shatter_strike_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ } } frame(lua_state, 29.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract 20% more of the remaining speed KineticModule::add_speed(boma, &Vector3f::new(-0.2*shatter_strike_speed, 0.0, 0.0)); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract the last portion of the originally added speed KineticModule::add_speed(boma, &Vector3f::new(-0.4*shatter_strike_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } - } -unsafe extern "C" fn dolly_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.45, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 14.0, 4.0, 90, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.45, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 14.0, 4.0, 90, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); } } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 9.0, 6.0, 100, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 9.0, 6.0, 100, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 4.0, 6.0, 80, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 4.0, 6.0, 80, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } else{ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_arc6"), Hash40::new("dolly_attack_arc6"), Hash40::new("top"), 2, 12, 5, -9, -46, 32, 0.8, true, *EF_FLIP_YZ, 1); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_attack_arc6"), Hash40::new("dolly_attack_arc6"), Hash40::new("top"), 2, 12, 5, -9, -46, 32, 0.8, true, *EF_FLIP_YZ, 1); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 28.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn dolly_attack_s4_s_expression(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_attacks4(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); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_critical"), 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_critical"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dolly_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE(agent, 1.0/(7.5-7.0)); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 60, 40, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 40, 0, 50, 5.0, 0.0, 6.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 60, 40, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 40, 0, 50, 5.0, 0.0, 6.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 83, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 83, 90, 0, 40, 5.0, 0.0, 7.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 83, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 83, 90, 0, 40, 5.0, 0.0, 7.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 18.0, 85, 82, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 18.0, 85, 82, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } AttackModule::clear(boma, 3, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut fire_kick_speed = 0.85; frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.000); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - VarModule::on_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + VarModule::on_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); KineticModule::add_speed(boma, &Vector3f::new(fire_kick_speed, 0.0, 0.0)); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 70, 100, 65, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 63, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 91, 100, 61, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 70, 100, 65, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 63, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 91, 100, 61, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 1.5, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 4.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 1.5, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 4.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { MotionModule::change_motion_force_inherit_frame(boma, Hash40::new("attack_13"), 2.0, 1.0, 1.0); } @@ -360,59 +356,57 @@ unsafe extern "C" fn dolly_attack_lw4_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 13.0); for _ in 0..7 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { KineticModule::add_speed(boma, &Vector3f::new(-0.125*fire_kick_speed, 0.0, 0.0)); } } wait(lua_state, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("legr"), 0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 5.0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("legr"), 0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 5.0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("kneer"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, true, *EF_FLIP_YZ, 0.5); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("kneer"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, true, *EF_FLIP_YZ, 0.5); + EFFECT_FLIP_ALPHA(agent, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.0); } } - } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attacks4", dolly_attack_s4_s_game) - .acmd("effect_attacks4", dolly_attack_s4_s_effect) - .acmd("expression_attacks4", dolly_attack_s4_s_expression) - .acmd("game_attackhi4", dolly_attack_hi4_game) - .acmd("game_attacklw4", dolly_attack_lw4_game) - .acmd("effect_attacklw4", dolly_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/dolly/src/acmd/specials.rs b/fighters/dolly/src/acmd/specials.rs index 8de5f604c9..b4eec8e7e1 100644 --- a/fighters/dolly/src/acmd/specials.rs +++ b/fighters/dolly/src/acmd/specials.rs @@ -1,770 +1,763 @@ - use super::*; -unsafe extern "C" fn dolly_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.588); + FT_MOTION_RATE(agent, 0.588); } if !WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_N_WORK_FLAG_GENERATE); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::add(fighter.battle_object, 3.0); + if is_excute(agent) { + MeterModule::add(agent.battle_object, 3.0); } - } -unsafe extern "C" fn dolly_special_f_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - FT_MOTION_RATE(fighter, 8.0/(7.0-6.0)); - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + FT_MOTION_RATE(agent, 8.0/(7.0-6.0)); + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.0); } } - } -unsafe extern "C" fn dolly_special_f_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsfstart(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) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } else{ - EFFECT(fighter, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } - } -unsafe extern "C" fn dolly_special_air_f_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - FT_MOTION_RATE(fighter, 8.0/(7.0-6.0)); - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + FT_MOTION_RATE(agent, 8.0/(7.0-6.0)); + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.0); } } - } -unsafe extern "C" fn dolly_special_air_f_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsfstart(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) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } else{ - EFFECT(fighter, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } - } -unsafe extern "C" fn dolly_special_f_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsfattack(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) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_S_WORK_FLAG_AIR_ATTACK) { } if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 0.833); + FT_MOTION_RATE(agent, 0.833); } if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.250); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - MeterModule::watch_damage(fighter.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.250); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, false); } else { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::set_damage_gain_mul(fighter.battle_object, 0.5); + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::set_damage_gain_mul(agent.battle_object, 0.5); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.250); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.250); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 42, 0, 82, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 42, 0, 82, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 95, 0, 54, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 95, 0, 54, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 90, 42, 0, 82, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 90, 42, 0, 82, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 40, 100, 0, 57, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 100, 0, 57, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn dolly_special_f_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - COL_NORMAL(fighter); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { +unsafe extern "C" fn effect_specialsfattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + COL_NORMAL(agent); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { /* - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - LAST_EFFECT_SET_RATE(fighter, 0.9); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.9); */ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - //EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("arml"), 3.0, 0, 0, 0, 90, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + //EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("arml"), 3.0, 0, 0, 0, 90, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - EFFECT_FLW_POS_NO_STOP(fighter,Hash40::new("dolly_drive_tail_s0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent,Hash40::new("dolly_drive_tail_s0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } else { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } } else { if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_n0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_n0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } else { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_n1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_n1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - //EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + //EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } } frame(lua_state, 3.0); for _ in 0..4 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 2, 0, 4, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 2, 0, 4, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); } for _ in 0..3 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); } - } -unsafe extern "C" fn dolly_special_f_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); +unsafe extern "C" fn game_specialsfend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } -unsafe extern "C" fn dolly_special_air_f_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairsfend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn dolly_special_b_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - //FT_MOTION_RATE(fighter, 9.0/(7.0-1.0)); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + //FT_MOTION_RATE(agent, 9.0/(7.0-1.0)); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ WorkModule::set_int(boma, *FIGHTER_DOLLY_STRENGTH_S, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH); } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 4.0); + FT_MOTION_RATE(agent, 4.0); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_b_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_special_air_b_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - //FT_MOTION_RATE(fighter, 9.0/(7.0-1.0)); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + //FT_MOTION_RATE(agent, 9.0/(7.0-1.0)); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ WorkModule::set_int(boma, *FIGHTER_DOLLY_STRENGTH_S, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH); } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 4.0); + FT_MOTION_RATE(agent, 4.0); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_air_b_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_special_b_attack_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbattackw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut add_jump_h_speed = -1.4; let mut add_jump_v_speed = 0.5; if !WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_S_WORK_FLAG_AIR_ATTACK) { add_jump_h_speed = -0.7; add_jump_v_speed = 0.25; } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(add_jump_h_speed, add_jump_v_speed, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.25*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.35*add_jump_v_speed, 0.0)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.35*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.2*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn dolly_special_b_attack_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbattackw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // EX - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_w_command"), Hash40::new("dolly_kick_arc_w_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_w_command"), Hash40::new("dolly_kick_arc_w_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); } // Regular else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); } else{ if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w02"), Hash40::new("dolly_kick_arc_w02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w02"), Hash40::new("dolly_kick_arc_w02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w03"), Hash40::new("dolly_kick_arc_w03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w03"), Hash40::new("dolly_kick_arc_w03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w04"), Hash40::new("dolly_kick_arc_w04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w04"), Hash40::new("dolly_kick_arc_w04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w05"), Hash40::new("dolly_kick_arc_w05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w05"), Hash40::new("dolly_kick_arc_w05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w06"), Hash40::new("dolly_kick_arc_w06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w06"), Hash40::new("dolly_kick_arc_w06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w07"), Hash40::new("dolly_kick_arc_w07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w07"), Hash40::new("dolly_kick_arc_w07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w08"), Hash40::new("dolly_kick_arc_w08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w08"), Hash40::new("dolly_kick_arc_w08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } EffectModule::set_disable_render_offset_last(boma); } @@ -773,34 +766,34 @@ unsafe extern "C" fn dolly_special_b_attack_w_effect(fighter: &mut L2CAgentBase) } frame(lua_state, 4.0); for _ in 0..5 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } } -unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut add_jump_h_speed = -1.0; let mut add_jump_v_speed = 0.5; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { add_jump_h_speed = -1.3; add_jump_v_speed = 2.0; } @@ -808,67 +801,67 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { add_jump_h_speed = -0.3; add_jump_v_speed = 0.3; } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(add_jump_h_speed, add_jump_v_speed, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(-0.4*add_jump_h_speed, 0.0, 0.0)); } else{ @@ -877,49 +870,49 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); /* Ground-only */ - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 1, Hash40::new("legr"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 1, Hash40::new("legr"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } // Speed handling - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.5*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } @@ -927,12 +920,12 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.4*add_jump_v_speed, 0.0)); } else{ @@ -941,80 +934,79 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 17.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn dolly_special_b_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // EX - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); } // Regular else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); } else{ if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s02"), Hash40::new("dolly_kick_arc_s02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s02"), Hash40::new("dolly_kick_arc_s02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s03"), Hash40::new("dolly_kick_arc_s03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s03"), Hash40::new("dolly_kick_arc_s03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s04"), Hash40::new("dolly_kick_arc_s04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s04"), Hash40::new("dolly_kick_arc_s04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s05"), Hash40::new("dolly_kick_arc_s05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s05"), Hash40::new("dolly_kick_arc_s05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s06"), Hash40::new("dolly_kick_arc_s06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s06"), Hash40::new("dolly_kick_arc_s06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s07"), Hash40::new("dolly_kick_arc_s07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s07"), Hash40::new("dolly_kick_arc_s07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s08"), Hash40::new("dolly_kick_arc_s08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s08"), Hash40::new("dolly_kick_arc_s08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } EffectModule::set_disable_render_offset_last(boma); } @@ -1023,556 +1015,554 @@ unsafe extern "C" fn dolly_special_b_attack_effect(fighter: &mut L2CAgentBase) { } frame(lua_state, 4.0); for _ in 0..5 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } } -unsafe extern "C" fn dolly_special_b_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.1); } else{ - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } } } -unsafe extern "C" fn dolly_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 2.0, 98, 100, 100, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 0.75); + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 2.0, 98, 100, 100, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 0.75); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { // Light Rising Tackle early hit if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 0.75); + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 0.75); } // Heavy Rising Tackle else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_S { AttackModule::clear_all(boma); } WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { // Light Rising Tackle late hit if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } // Heavy Rising Tackle else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.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); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } - } -unsafe extern "C" fn dolly_special_hi_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } else { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); } else{ if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 40.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); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } - } -unsafe extern "C" fn dolly_special_hi_command_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); - - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); + + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); } else{ - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); EffectModule::enable_sync_init_pos_last(boma); } @@ -1580,547 +1570,544 @@ unsafe extern "C" fn dolly_special_hi_command_effect(fighter: &mut L2CAgentBase) } for _ in 0..4 { wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color2"), false, true); - } - + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); + } } -unsafe extern "C" fn dolly_special_air_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 83, 65, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 83, 65, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.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); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } - } -unsafe extern "C" fn dolly_special_air_hi_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5),0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5),0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } else { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); } else{ if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 40.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); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } - } -unsafe extern "C" fn dolly_special_air_hi_command_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); - - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); + + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); } else{ - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); EffectModule::enable_sync_init_pos_last(boma); } @@ -2128,335 +2115,328 @@ unsafe extern "C" fn dolly_special_air_hi_command_effect(fighter: &mut L2CAgentB } for _ in 0..4 { wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color2"), false, true); - } - + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); + } } -unsafe extern "C" fn dolly_special_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - FT_MOTION_RATE(fighter, 0.667); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE(agent, 0.667); } - } -unsafe extern "C" fn dolly_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn dolly_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } else if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); } } } - } -unsafe extern "C" fn dolly_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } - } -unsafe extern "C" fn dolly_special_lw_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwrisew(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::clear_speed_all(boma); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //KineticModule::add_speed(boma, &Vector3f::new(0.0, -5.0, 0.0)); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 10.0); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 1.3); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //boma.change_status_req(*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_F_END, false); boma.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } frame(lua_state, 18.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::add_speed(boma, &Vector3f::new(5.0, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } - } -unsafe extern "C" fn dolly_special_lw_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - //LAST_EFFECT_SET_RATE(fighter, 1.1); +unsafe extern "C" fn effect_specialairlwrisew(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + //LAST_EFFECT_SET_RATE(agent, 1.1); } } } -unsafe extern "C" fn dolly_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::clear_speed_all(boma); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //KineticModule::add_speed(boma, &Vector3f::new(0.0, -5.0, 0.0)); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 10.0); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 85, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 80, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 85, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 80, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 1.3); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //boma.change_status_req(*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_F_END, false); boma.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.5, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.5, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.5, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 0.5, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 2, Hash40::new("top"), 2.0, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 2, Hash40::new("top"), 2.0, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 2, Hash40::new("top"), 2.0, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 2, Hash40::new("top"), 2.0, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 3, Hash40::new("top"), 2.0, 40, 100, 30, 10, 7.0, 0.0, 10.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 3, Hash40::new("top"), 2.0, 40, 100, 30, 10, 7.0, 0.0, 10.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } frame(lua_state, 22.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::add_speed(boma, &Vector3f::new(0.3, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } - } -unsafe extern "C" fn dolly_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } - else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - //LAST_EFFECT_SET_RATE(fighter, 1.1); +unsafe extern "C" fn effect_specialairlwrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.4, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + //LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 3.0); for _ in 0..6 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); @@ -2464,11 +2444,11 @@ unsafe extern "C" fn dolly_special_lw_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); let addSpeed1 = Vector3f{ x: 0.3, y: -1.0, z: 0.0 }; @@ -2483,7 +2463,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: -0.3, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2494,7 +2474,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2505,33 +2485,33 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 75, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 75, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 65, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 65, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2542,46 +2522,46 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 310, 95, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 310, 95, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 310, 60, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 310, 60, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.833); + FT_MOTION_RATE(agent, 0.833); let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); let addSpeed1 = Vector3f{ x: 0.0, y: 0.2, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2592,7 +2572,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2603,7 +2583,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2614,7 +2594,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2625,7 +2605,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2636,7 +2616,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2647,7 +2627,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2658,7 +2638,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2669,501 +2649,519 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.100); + FT_MOTION_RATE(agent, 0.100); } else { - FT_MOTION_RATE(fighter, 0.100); + FT_MOTION_RATE(agent, 0.100); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_DOLLY_SPECIAL_LW_FALL); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_LW_WORK_FLAG_LANDING_HEAVY); } - } -unsafe extern "C" fn dolly_special_lw_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("shoulderr"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.25, true); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("shoulderr"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.25, true); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } } } frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_wave_aura"), true, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_wave_aura"), true, true); } } frame(lua_state, 3.0); for _ in 0..7 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_tail_n"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_n"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_tail_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_s"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_tail_n"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_n"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_tail_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_s"), false, true); } } -unsafe extern "C" fn dolly_special_lw_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { +unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); - SET_SPEED_EX(fighter, 0.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Star Dunk Volcano if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 3) { + if MeterModule::drain(agent.battle_object, 3) { VarModule::on_flag(boma.object(), vars::shotos::instance::IS_TARGET_COMBO_2); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 277, 35, 0, 120, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 3.0, 85, 35, 0, 110, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 277, 35, 0, 120, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 85, 35, 0, 110, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } else{ - SET_SPEED_EX(fighter, 1.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_BURST, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { SlowModule::set_whole(boma, 2, 20); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - FT_MOTION_RATE(fighter, 4.000); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + FT_MOTION_RATE(agent, 4.000); } else{ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ - FT_MOTION_RATE(fighter, 2.000); + FT_MOTION_RATE(agent, 2.000); } } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); } - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.000); } } - } -unsafe extern "C" fn dolly_special_lw_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { // EX/Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_s"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_s"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); } else{ - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } else{ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_s"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_s"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_n"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_n"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_n"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_n"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_super_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - SLOW_OPPONENT(fighter, 15.0, 40.0); + SLOW_OPPONENT(agent, 15.0, 40.0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 15.0/(8.0-6.0)); + FT_MOTION_RATE(agent, 15.0/(8.0-6.0)); } else{ - FT_MOTION_RATE(fighter, 8.0/(8.0-6.0)); + FT_MOTION_RATE(agent, 8.0/(8.0-6.0)); } } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_BURST, false, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0/3.0); + FT_MOTION_RATE(agent, 2.0/3.0); } } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 8.0); } } -unsafe extern "C" fn dolly_super_special_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_wave_arc"), Hash40::new("dolly_wave_arc"), Hash40::new("top"), 0, 10, 4, 69, -46, -45, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_wave_arc"), Hash40::new("dolly_wave_arc"), Hash40::new("top"), 0, 10, 4, 69, -46, -45, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn dolly_super_special_2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0.0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0.0); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); - SLOW_OPPONENT(fighter, 30.0, 30.0); + FT_MOTION_RATE(agent, 1.0); + SLOW_OPPONENT(agent, 30.0, 30.0); } else{ - //FT_MOTION_RATE(fighter, 0.5); - FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 0.5); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 15.0/(9.0-5.0)); + FT_MOTION_RATE(agent, 15.0/(9.0-5.0)); } else{ - //FT_MOTION_RATE(fighter, 0.5); - FT_MOTION_RATE(fighter, 8.0/(9.0-5.0)); + //FT_MOTION_RATE(agent, 0.5); + FT_MOTION_RATE(agent, 8.0/(9.0-5.0)); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } else{ - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(boma, true, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_FIRE, false, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn dolly_super_special_2_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_superspecial2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_ball_damage"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_ball"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_smash_ball_damage"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_smash_ball"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); /* - EFFECT_FOLLOW(fighter, Hash40::new("sys_absorption"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_absorption"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.25); */ - //EFFECT_FOLLOW(fighter, Hash40::new("sys_cross_bomb"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); - //LAST_EFFECT_SET_RATE(fighter, 3.0); + //EFFECT_FOLLOW(agent, Hash40::new("sys_cross_bomb"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); + //LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_hold"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_hold"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_buster_punch"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_buster_dash"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_buster_punch"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_buster_dash"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, false); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_buster_punch"), 6); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_buster_punch"), 6); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_buster_dash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_buster_dash"), false, true); } } -unsafe extern "C" fn dolly_super_special_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 20.0, 45, 79, 0, 40, 0.8, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 20.0, 45, 79, 0, 40, 0.8, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 63, 0, 90, 8.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(25.0), Some(17.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(20.0), Some(25.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(12.0), Some(30.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(33.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 63, 0, 90, 8.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(25.0), Some(17.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(20.0), Some(25.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(12.0), Some(30.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(33.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_OBJECT_ID), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_OBJECT_ID), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 40.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_specialn", dolly_special_n_game) - .acmd("game_specialsfstart", dolly_special_f_start_game) - .acmd("effect_specialsfstart", dolly_special_f_start_effect) - .acmd("game_specialairsfstart", dolly_special_air_f_start_game) - .acmd("effect_specialairsfstart", dolly_special_air_f_start_effect) - .acmd("game_specialsfattack", dolly_special_f_attack_game) - .acmd("effect_specialsfattack", dolly_special_f_attack_effect) - .acmd("game_specialsfend", dolly_special_f_end_game) - .acmd("game_specialairsfend", dolly_special_air_f_end_game) - .acmd("game_specialsbstart", dolly_special_b_start_game) - .acmd("effect_specialsbstart", dolly_special_b_start_effect) - .acmd("game_specialairsbstart", dolly_special_air_b_start_game) - .acmd("effect_specialairsbstart", dolly_special_air_b_start_effect) - .acmd("game_specialsbattackw", dolly_special_b_attack_w_game) - .acmd("effect_specialsbattackw", dolly_special_b_attack_w_effect) - .acmd("game_specialsbattack", dolly_special_b_attack_game) - .acmd("effect_specialsbattack", dolly_special_b_attack_effect) - .acmd("game_specialsbend", dolly_special_b_end_game) - .acmd("game_specialhi1", dolly_special_hi1_game) - .acmd("game_specialhicommand", dolly_special_hi_command_game) - .acmd("effect_specialhicommand", dolly_special_hi_command_effect) - .acmd("game_specialairhi1", dolly_special_air_hi1_game) - .acmd("game_specialairhicommand", dolly_special_air_hi_command_game) - .acmd("effect_specialairhicommand", dolly_special_air_hi_command_effect) - .acmd("game_specialhifall", dolly_special_hi_fall_game) - .acmd("game_specialairhiend", dolly_special_air_hi_end_game) - .acmd("game_speciallwstart", dolly_special_lw_start_game) - .acmd("game_specialairlwstart", dolly_special_air_lw_start_game) - .acmd("game_specialairlwrisew", dolly_special_lw_w_game) - .acmd("effect_specialairlwrisew", dolly_special_lw_w_effect) - .acmd("game_specialairlwrise", dolly_special_lw_game) - .acmd("effect_specialairlwrise", dolly_special_lw_effect) - .acmd("game_specialairlw", dolly_special_lw_attack_game) - .acmd("effect_specialairlw", dolly_special_lw_attack_effect) - .acmd("game_speciallwend", dolly_special_lw_landing_game) - .acmd("effect_speciallwend", dolly_special_lw_landing_effect) - .acmd("game_superspecial", dolly_super_special_game) - .acmd("effect_superspecial", dolly_super_special_effect) - .acmd("game_superspecial2start", dolly_super_special_2_start_game) - .acmd("effect_superspecial2start", dolly_super_special_2_start_effect) - .acmd("game_superspecial2", dolly_super_special_2_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + + agent.acmd("game_specialsfstart", game_specialsfstart); + agent.acmd("effect_specialsfstart", effect_specialsfstart); + agent.acmd("game_specialairsfstart", game_specialairsfstart); + agent.acmd("effect_specialairsfstart", effect_specialairsfstart); + + agent.acmd("game_specialsfattack", game_specialsfattack); + agent.acmd("effect_specialsfattack", effect_specialsfattack); + + agent.acmd("game_specialsfend", game_specialsfend); + agent.acmd("game_specialairsfend", game_specialairsfend); + + agent.acmd("game_specialsbstart", game_specialsbstart); + agent.acmd("effect_specialsbstart", effect_specialsbstart); + agent.acmd("game_specialairsbstart", game_specialairsbstart); + agent.acmd("effect_specialairsbstart", effect_specialairsbstart); + + agent.acmd("game_specialsbattackw", game_specialsbattackw); + agent.acmd("effect_specialsbattackw", effect_specialsbattackw); + + agent.acmd("game_specialsbattack", game_specialsbattack); + agent.acmd("effect_specialsbattack", effect_specialsbattack); + + agent.acmd("game_specialsbend", game_specialsbend); + + agent.acmd("game_specialhi1", game_specialhi1); + + agent.acmd("game_specialhicommand", game_specialhicommand); + agent.acmd("effect_specialhicommand", effect_specialhicommand); + + agent.acmd("game_specialairhi1", game_specialairhi1); + + agent.acmd("game_specialairhicommand", game_specialairhicommand); + agent.acmd("effect_specialairhicommand", effect_specialairhicommand); + + agent.acmd("game_specialhifall", game_specialhifall); + + agent.acmd("game_specialairhiend", game_specialairhiend); + + agent.acmd("game_speciallwstart", game_speciallwstart); + + agent.acmd("game_specialairlwstart", game_specialairlwstart); + + agent.acmd("game_specialairlwrisew", game_specialairlwrisew); + agent.acmd("effect_specialairlwrisew", effect_specialairlwrisew); + + agent.acmd("game_specialairlwrise", game_specialairlwrise); + agent.acmd("effect_specialairlwrise", effect_specialairlwrise); + + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("effect_speciallwend", effect_speciallwend); + + agent.acmd("game_superspecial", game_superspecial); + agent.acmd("effect_superspecial", effect_superspecial); + + agent.acmd("game_superspecial2start", game_superspecial2start); + agent.acmd("effect_superspecial2start", effect_superspecial2start); + + agent.acmd("game_superspecial2", game_superspecial2); } diff --git a/fighters/dolly/src/acmd/throws.rs b/fighters/dolly/src/acmd/throws.rs index 86d6f51890..d391150093 100644 --- a/fighters/dolly/src/acmd/throws.rs +++ b/fighters/dolly/src/acmd/throws.rs @@ -1,118 +1,113 @@ use super::*; -unsafe extern "C" fn dolly_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 dolly_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 dolly_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 dolly_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 1); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn dolly_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 11, 1); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 11, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_catch", dolly_catch_game) - .acmd("game_catchdash", dolly_catch_dash_game) - .acmd("game_catchturn", dolly_catch_turn_game) - .acmd("game_throwf", dolly_throw_f_game) - .acmd("game_throwb", dolly_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/dolly/src/acmd/tilts.rs b/fighters/dolly/src/acmd/tilts.rs index de98d5e33b..b980caca46 100644 --- a/fighters/dolly/src/acmd/tilts.rs +++ b/fighters/dolly/src/acmd/tilts.rs @@ -1,155 +1,152 @@ - use super::*; -unsafe extern "C" fn dolly_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(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) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } - FT_MOTION_RATE(fighter, 7.0/(9.0-1.0)); - MeterModule::watch_damage(fighter.battle_object, true); + FT_MOTION_RATE(agent, 7.0/(9.0-1.0)); + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - //HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + //HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); VarModule::off_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -unsafe extern "C" fn dolly_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 75, 45, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 75, 45, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 77, 30, 0, 86, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 77, 40, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 77, 30, 0, 86, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 77, 40, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); VarModule::off_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } - } -unsafe extern "C" fn dolly_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } } frame(lua_state, 6.0); - if is_excute(fighter) { - //if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) || VarModule::get_int(fighter.battle_object, vars::shotos::instance::REPEAT_COUNT_LW) >= 2 { - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) || VarModule::get_int(agent.battle_object, vars::shotos::instance::REPEAT_COUNT_LW) >= 2 { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 82, 36, 0, 25, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 82, 36, 0, 25, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *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_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); @@ -157,33 +154,30 @@ unsafe extern "C" fn dolly_attack_lw3_game(fighter: &mut L2CAgentBase) { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_MOTION_RATE(fighter, 0.700); + FT_MOTION_RATE(agent, 0.700); } else { - FT_MOTION_RATE(fighter, 1.250); + FT_MOTION_RATE(agent, 1.250); } */ } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attacks3", dolly_attack_s3_s_game) - .acmd("game_attackhi3", dolly_attack_hi3_game) - .acmd("game_attacklw3", dolly_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/dolly/src/burst/acmd.rs b/fighters/dolly/src/burst/acmd.rs new file mode 100644 index 0000000000..131209d731 --- /dev/null +++ b/fighters/dolly/src/burst/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_final3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + AttackModule::set_no_dead_all(boma, true, false); + if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, 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_DOLLY_PUNCH, *ATTACK_REGION_BOMB); + } + } + frame(lua_state, 5.0); + if is_excute(agent) { + if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_superspecial", game_superspecial); + agent.acmd("game_final3", game_final3); +} \ No newline at end of file diff --git a/fighters/dolly/src/burst/mod.rs b/fighters/dolly/src/burst/mod.rs new file mode 100644 index 0000000000..44652b5900 --- /dev/null +++ b/fighters/dolly/src/burst/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("dolly_burst"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dolly/src/lib.rs b/fighters/dolly/src/lib.rs index 5537dac979..8805736c89 100644 --- a/fighters/dolly/src/lib.rs +++ b/fighters/dolly/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod wave; +mod burst; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("dolly"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + wave::install(); + burst::install(); } \ No newline at end of file diff --git a/fighters/dolly/src/opff.rs b/fighters/dolly/src/opff.rs index 3a46e80c9d..f1c8265ffb 100644 --- a/fighters/dolly/src/opff.rs +++ b/fighters/dolly/src/opff.rs @@ -469,7 +469,6 @@ unsafe fn special_cancels(boma: &mut BattleObjectModuleAccessor) { } } } - } unsafe fn jab_cancels(boma: &mut BattleObjectModuleAccessor) { @@ -741,7 +740,6 @@ unsafe fn smash_cancels(boma: &mut BattleObjectModuleAccessor) { boma.change_status_req(new_status, false); } } - } unsafe fn aerial_cancels(boma: &mut BattleObjectModuleAccessor) { @@ -836,7 +834,6 @@ unsafe fn magic_series(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo aerial_cancels(boma); return; } - } pub extern "C" fn dolly_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -873,9 +870,7 @@ pub unsafe fn dolly_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("dolly") - .on_line(Main, dolly_frame_wrapper) - .on_line(Main, dolly_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dolly_frame_wrapper); + agent.on_line(Main, dolly_meter); } \ No newline at end of file diff --git a/fighters/dolly/src/status.rs b/fighters/dolly/src/status.rs deleted file mode 100644 index 17e080c054..0000000000 --- a/fighters/dolly/src/status.rs +++ /dev/null @@ -1,462 +0,0 @@ -use super::*; -use globals::*; -// status script import - -utils::import_noreturn!(common::shoto_status::{ - fgc_end_dashback, - ryu_idkwhatthisis2 -}); - -extern "Rust" { - // from common::shoto_status - fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; - fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; - fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -// Prevents sideB from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // Re-enables the ability to use sideB when connecting to ground or cliff - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - - // ORIGINAL - if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_WAIT { - FighterSpecializer_Dolly::update_opponent_lr_1on1(fighter.module_accessor, fighter.global_table[STATUS_KIND].get_i32()); - } - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLAG_AUTO_TURN_END_STATUS); - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr == 0.0 - || PostureModule::lr(fighter.module_accessor) == lr - || StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { - return 0.into(); - } - - unsafe fn update_lr(fighter: &mut L2CFighterCommon, lr: f32) { - PostureModule::set_lr(fighter.module_accessor, lr); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - - if [ - *FIGHTER_STATUS_KIND_WALK, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_LANDING_LIGHT, - *FIGHTER_STATUS_KIND_GUARD_ON, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, - *FIGHTER_STATUS_KIND_ATTACK_LW4_START, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_ITEM_SWING, - *FIGHTER_STATUS_KIND_SPECIAL_N, - *FIGHTER_STATUS_KIND_FINAL, - *FIGHTER_RYU_STATUS_KIND_WALK_BACK, - ].contains(&fighter.global_table[globals::STATUS_KIND].get_i32()) - { - update_lr(fighter, lr); - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_WAIT { - if ![ - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - *FIGHTER_STATUS_KIND_RUN_BRAKE, - *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_GUARD_OFF, - *FIGHTER_STATUS_KIND_GUARD_DAMAGE, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE_F, - *FIGHTER_STATUS_KIND_ESCAPE_B, - *FIGHTER_STATUS_KIND_ATTACK_DASH, - *FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_CATCH_DASH, - *FIGHTER_STATUS_KIND_CATCH_TURN, - *FIGHTER_STATUS_KIND_CATCH_CUT, - *FIGHTER_STATUS_KIND_THROW, - *FIGHTER_STATUS_KIND_CAPTURE_CUT, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DOWN_STAND, - *FIGHTER_STATUS_KIND_DOWN_STAND_FB, - *FIGHTER_STATUS_KIND_PASSIVE, - *FIGHTER_STATUS_KIND_PASSIVE_FB, - *FIGHTER_STATUS_KIND_FURAFURA_END, - *FIGHTER_STATUS_KIND_DAMAGE_SONG_END, - *FIGHTER_STATUS_KIND_CLIFF_CLIMB, - *FIGHTER_STATUS_KIND_CLIFF_ATTACK, - *FIGHTER_STATUS_KIND_CLIFF_ESCAPE, - *FIGHTER_STATUS_KIND_SLIP_STAND, - *FIGHTER_STATUS_KIND_SLIP_STAND_ATTACK, - *FIGHTER_STATUS_KIND_SLIP_STAND_F, - *FIGHTER_STATUS_KIND_SLIP_STAND_B, - *FIGHTER_STATUS_KIND_ITEM_LIGHT_PICKUP, - *FIGHTER_STATUS_KIND_ITEM_THROW, - *FIGHTER_STATUS_KIND_ITEM_THROW_DASH, - *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, - *FIGHTER_STATUS_KIND_ITEM_SWING, - *FIGHTER_STATUS_KIND_ITEM_SWING_S3, - *FIGHTER_STATUS_KIND_ITEM_SWING_S4, - *FIGHTER_STATUS_KIND_ITEM_SWING_DASH, - *FIGHTER_STATUS_KIND_APPEAL, - *FIGHTER_STATUS_KIND_SPECIAL_N - ].contains(&fighter.global_table[globals::STATUS_KIND_INTERRUPT].get_i32()) - { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_JUMP_SQUAT { - if fighter.global_table[globals::STATUS_KIND_INTERRUPT] != FIGHTER_STATUS_KIND_TURN_RUN { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ATTACK { - if fighter.global_table[globals::STATUS_KIND] != FIGHTER_STATUS_KIND_ATTACK || ComboModule::count(fighter.module_accessor) == 0 { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ITEM_THROW - && fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND - { - let cat3 = fighter.global_table[globals::CMD_CAT3].get_i32(); - if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_4 != 0 && cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_FB4 == 0 { - update_lr(fighter, lr); - } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_HI != 0 { - update_lr(fighter, lr); - } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_LW != 0 { - update_lr(fighter, lr); - } - } - - 0.into() -} - -extern "C" fn dolly_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_DOLLY { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -// FIGHTER_STATUS_KIND_SPECIAL_S // - -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND // - -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B // - -pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND // - -pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP - -pub unsafe extern "C" fn init_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.select_cliff_hangdata_from_name("special_hi"); - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL - -pub unsafe extern "C" fn init_special_hi_fall(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.select_cliff_hangdata_from_name("special_hi"); - 0.into() -} - -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - WorkModule::enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND, - ); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() -} - -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - app::FighterSpecializer_Dolly::update_opponent_lr_1on1( - fighter.module_accessor, - *FIGHTER_STATUS_KIND_TURN_DASH, - ); - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL // - -pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - let boma = app::sv_system::battle_object_module_accessor(lua_state); - let mut agent_base = fighter.fighter_base.agent_base; - let id = VarModule::get_int( - fighter.battle_object, - vars::common::instance::COSTUME_SLOT_NUMBER, - ) as usize; - - // Only use meter if you didn't cancel directly from a different super - if !VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL) { - MeterModule::drain(boma.object(), 4); - } - smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL)(fighter) -} - -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 // - -pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - let boma = app::sv_system::battle_object_module_accessor(lua_state); - let mut agent_base = fighter.fighter_base.agent_base; - let id = VarModule::get_int( - fighter.battle_object, - vars::common::instance::COSTUME_SLOT_NUMBER, - ) as usize; - - // Only use meter if you didn't cancel directly from a different supper - if !VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL) { - MeterModule::drain(boma.object(), 4); - } - smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2)(fighter) -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() - * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("walk_stick_x"), - ); - let squat_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("squat_stick_y"), - ); - - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, - ) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_LANDING // - -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) -} - -pub fn install() { - smashline::Agent::new("dolly") - .on_start(dolly_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, init_special_s_command) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, init_special_b) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, init_special_b_command) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, init_special_hi_jump) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, init_special_hi_fall) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, end_dashback) - .status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, pre_superspecial) - .status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, pre_superspecial2) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); -} \ No newline at end of file diff --git a/fighters/dolly/src/status/dash_back.rs b/fighters/dolly/src/status/dash_back.rs new file mode 100644 index 0000000000..9907e14241 --- /dev/null +++ b/fighters/dolly/src/status/dash_back.rs @@ -0,0 +1,25 @@ +use super::*; + +utils::import_noreturn!(common::shoto_status::{ + fgc_end_dashback, +}); + +extern "Rust" { + fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK + +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, dash_back_end); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/guard_off.rs b/fighters/dolly/src/status/guard_off.rs new file mode 100644 index 0000000000..847e1a99ff --- /dev/null +++ b/fighters/dolly/src/status/guard_off.rs @@ -0,0 +1,89 @@ +use super::*; + +pub unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + WorkModule::enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND, + ); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_off_main_loop) +} + +unsafe extern "C" fn guard_off_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off_main); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/landing.rs b/fighters/dolly/src/status/landing.rs new file mode 100644 index 0000000000..07c9175fcf --- /dev/null +++ b/fighters/dolly/src/status/landing.rs @@ -0,0 +1,15 @@ +use super::*; + +extern "Rust" { + fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_STATUS_KIND_LANDING + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/mod.rs b/fighters/dolly/src/status/mod.rs new file mode 100644 index 0000000000..6d722eae79 --- /dev/null +++ b/fighters/dolly/src/status/mod.rs @@ -0,0 +1,179 @@ +use super::*; +use globals::*; +// status script import + +mod wait; +mod turn_dash; +mod dash_back; +mod landing; +mod guard_off; + +mod special_s; +mod special_hi; +mod super_special; +mod super_special2; + +// Prevents sideB from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + // Re-enables the ability to use sideB when connecting to ground or cliff + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + + // ORIGINAL + if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_WAIT { + FighterSpecializer_Dolly::update_opponent_lr_1on1(fighter.module_accessor, fighter.global_table[STATUS_KIND].get_i32()); + } + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLAG_AUTO_TURN_END_STATUS); + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr == 0.0 + || PostureModule::lr(fighter.module_accessor) == lr + || StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { + return 0.into(); + } + + unsafe fn update_lr(fighter: &mut L2CFighterCommon, lr: f32) { + PostureModule::set_lr(fighter.module_accessor, lr); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } + + if [ + *FIGHTER_STATUS_KIND_WALK, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_LANDING_LIGHT, + *FIGHTER_STATUS_KIND_GUARD_ON, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_LW3, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, + *FIGHTER_STATUS_KIND_ATTACK_LW4_START, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_ITEM_SWING, + *FIGHTER_STATUS_KIND_SPECIAL_N, + *FIGHTER_STATUS_KIND_FINAL, + *FIGHTER_RYU_STATUS_KIND_WALK_BACK, + ].contains(&fighter.global_table[globals::STATUS_KIND].get_i32()) + { + update_lr(fighter, lr); + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_WAIT { + if ![ + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + *FIGHTER_STATUS_KIND_RUN_BRAKE, + *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_GUARD_OFF, + *FIGHTER_STATUS_KIND_GUARD_DAMAGE, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE_F, + *FIGHTER_STATUS_KIND_ESCAPE_B, + *FIGHTER_STATUS_KIND_ATTACK_DASH, + *FIGHTER_STATUS_KIND_ATTACK_S3, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4, + *FIGHTER_STATUS_KIND_ATTACK_LW4, + *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_CATCH_DASH, + *FIGHTER_STATUS_KIND_CATCH_TURN, + *FIGHTER_STATUS_KIND_CATCH_CUT, + *FIGHTER_STATUS_KIND_THROW, + *FIGHTER_STATUS_KIND_CAPTURE_CUT, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DOWN_STAND, + *FIGHTER_STATUS_KIND_DOWN_STAND_FB, + *FIGHTER_STATUS_KIND_PASSIVE, + *FIGHTER_STATUS_KIND_PASSIVE_FB, + *FIGHTER_STATUS_KIND_FURAFURA_END, + *FIGHTER_STATUS_KIND_DAMAGE_SONG_END, + *FIGHTER_STATUS_KIND_CLIFF_CLIMB, + *FIGHTER_STATUS_KIND_CLIFF_ATTACK, + *FIGHTER_STATUS_KIND_CLIFF_ESCAPE, + *FIGHTER_STATUS_KIND_SLIP_STAND, + *FIGHTER_STATUS_KIND_SLIP_STAND_ATTACK, + *FIGHTER_STATUS_KIND_SLIP_STAND_F, + *FIGHTER_STATUS_KIND_SLIP_STAND_B, + *FIGHTER_STATUS_KIND_ITEM_LIGHT_PICKUP, + *FIGHTER_STATUS_KIND_ITEM_THROW, + *FIGHTER_STATUS_KIND_ITEM_THROW_DASH, + *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, + *FIGHTER_STATUS_KIND_ITEM_SWING, + *FIGHTER_STATUS_KIND_ITEM_SWING_S3, + *FIGHTER_STATUS_KIND_ITEM_SWING_S4, + *FIGHTER_STATUS_KIND_ITEM_SWING_DASH, + *FIGHTER_STATUS_KIND_APPEAL, + *FIGHTER_STATUS_KIND_SPECIAL_N + ].contains(&fighter.global_table[globals::STATUS_KIND_INTERRUPT].get_i32()) + { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_JUMP_SQUAT { + if fighter.global_table[globals::STATUS_KIND_INTERRUPT] != FIGHTER_STATUS_KIND_TURN_RUN { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ATTACK { + if fighter.global_table[globals::STATUS_KIND] != FIGHTER_STATUS_KIND_ATTACK || ComboModule::count(fighter.module_accessor) == 0 { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ITEM_THROW + && fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND + { + let cat3 = fighter.global_table[globals::CMD_CAT3].get_i32(); + if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_4 != 0 && cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_FB4 == 0 { + update_lr(fighter, lr); + } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_HI != 0 { + update_lr(fighter, lr); + } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_LW != 0 { + update_lr(fighter, lr); + } + } + + 0.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + wait::install(agent); + turn_dash::install(agent); + dash_back::install(agent); + landing::install(agent); + guard_off::install(agent); + + special_s::install(agent); + special_hi::install(agent); + super_special::install(agent); + super_special2::install(agent); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/special_hi.rs b/fighters/dolly/src/status/special_hi.rs new file mode 100644 index 0000000000..392b296c2b --- /dev/null +++ b/fighters/dolly/src/status/special_hi.rs @@ -0,0 +1,20 @@ +use super::*; + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP + +pub unsafe extern "C" fn special_hi_jump_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.select_cliff_hangdata_from_name("special_hi"); + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL + +pub unsafe extern "C" fn special_hi_fall_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.select_cliff_hangdata_from_name("special_hi"); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_init); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/special_s.rs b/fighters/dolly/src/status/special_s.rs new file mode 100644 index 0000000000..76b328d491 --- /dev/null +++ b/fighters/dolly/src/status/special_s.rs @@ -0,0 +1,44 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND + +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B + +pub unsafe extern "C" fn special_b_init(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND + +pub unsafe extern "C" fn special_b_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, special_b_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, special_b_command_init); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special.rs b/fighters/dolly/src/status/super_special.rs new file mode 100644 index 0000000000..9f9f1312c2 --- /dev/null +++ b/fighters/dolly/src/status/super_special.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL + +pub unsafe extern "C" fn super_special_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + // Only use meter if you didn't cancel directly from a different super + if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { + MeterModule::drain(fighter.battle_object, 4); + } + smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, super_special_pre); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special2.rs b/fighters/dolly/src/status/super_special2.rs new file mode 100644 index 0000000000..3fcf03a680 --- /dev/null +++ b/fighters/dolly/src/status/super_special2.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 + +pub unsafe extern "C" fn super_special2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + // Only use meter if you didn't cancel directly from a different supper + if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { + MeterModule::drain(fighter.battle_object, 4); + } + smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, super_special2_pre); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/turn_dash.rs b/fighters/dolly/src/status/turn_dash.rs new file mode 100644 index 0000000000..36d283f009 --- /dev/null +++ b/fighters/dolly/src/status/turn_dash.rs @@ -0,0 +1,32 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + app::FighterSpecializer_Dolly::update_opponent_lr_1on1( + fighter.module_accessor, + *FIGHTER_STATUS_KIND_TURN_DASH, + ); + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/wait.rs b/fighters/dolly/src/status/wait.rs new file mode 100644 index 0000000000..a8ee262329 --- /dev/null +++ b/fighters/dolly/src/status/wait.rs @@ -0,0 +1,60 @@ +use super::*; + +// FIGHTER_STATUS_KIND_WAIT + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() + * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("walk_stick_x"), + ); + let squat_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("squat_stick_y"), + ); + + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, + ) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file diff --git a/fighters/dolly/src/wave/acmd.rs b/fighters/dolly/src/wave/acmd.rs new file mode 100644 index 0000000000..f5810d3426 --- /dev/null +++ b/fighters/dolly/src/wave/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + MeterModule::add(owner_module_accessor.object(), 8.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hit", game_hit); +} \ No newline at end of file diff --git a/fighters/dolly/src/wave/mod.rs b/fighters/dolly/src/wave/mod.rs new file mode 100644 index 0000000000..8079f0a753 --- /dev/null +++ b/fighters/dolly/src/wave/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("dolly_wave"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/donkey/src/acmd/aerials.rs b/fighters/donkey/src/acmd/aerials.rs index eae17a7c0b..96dccf44d7 100644 --- a/fighters/donkey/src/acmd/aerials.rs +++ b/fighters/donkey/src/acmd/aerials.rs @@ -1,247 +1,241 @@ - use super::*; -unsafe extern "C" fn attack_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 25, 8.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handl"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 25, 8.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 50, 100, 0, 10, 7.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handl"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 50, 100, 0, 10, 7.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn attack_air_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } - frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("handr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("handr"), 17.0, 270, 100, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 17.0, 270, 100, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("handl"), 15.0, 270, 55, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 15.0, 270, 55, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 13.0, 361, 104, 0, 20, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 361, 104, 0, 20, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 361, 104, 0, 20, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 13.0, 361, 104, 0, 20, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 361, 104, 0, 20, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 361, 104, 0, 20, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 8.0, 361, 100, 0, 10, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 10, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 361, 100, 0, 10, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 10, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn donkey_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc_c"), Hash40::new("donkey_attack_arc_c"), Hash40::new("top"), 0.0, 9, -1.0 /*left-right */, -155.5, -125, 57, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter, 2.0); - } } -unsafe extern "C" fn donkey_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state,6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter,Hash40::new("donkey_attack_line"), Hash40::new("donkey_attack_line"), Hash40::new("top"), 0, 8, 8, 180, 0, 0, 1.5, true, *EF_FLIP_YZ) + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent,Hash40::new("donkey_attack_line"), Hash40::new("donkey_attack_line"), Hash40::new("top"), 0, 8, 8, 180, 0, 0, 1.5, true, *EF_FLIP_YZ) } frame(lua_state,7.0); - if is_excute(fighter) { - EFFECT(fighter,Hash40::new("sys_attack_impact"), Hash40::new("top"), -2.5, 9, -18, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent,Hash40::new("sys_attack_impact"), Hash40::new("top"), -2.5, 9, -18, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 360, true); } - } -unsafe extern "C" fn attack_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - //HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + //HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 90, 86, 0, 54, 7.25, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 90, 86, 0, 54, 7.25, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc_c"), Hash40::new("donkey_attack_arc_c"), Hash40::new("top"), 0.0, 9, -1.0 /*left-right */, -155.5, -125, 57, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent, 2.0); + } +} + +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn attack_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.15); + FT_MOTION_RATE(agent, 1.15); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 270, 90, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 13.0, 270, 90, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 270, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 270, 90, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 13.0, 270, 90, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 270, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 16.0, 270, 49, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 13.0, 270, 62, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 13.0, 270, 62, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 16.0, 270, 49, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legl"), 13.0, 270, 62, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 13.0, 270, 62, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn donkey_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 2, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 2, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_smash_line"), Hash40::new("donkey_smash_line"), Hash40::new("top"), -2, 19, -3.5, 83, 0, 0, 1.1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_smash_line"), Hash40::new("donkey_smash_line"), Hash40::new("top"), -2, 19, -3.5, 83, 0, 0, 1.1, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 360, false); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attackairn", attack_air_n) - .acmd("expression_attackairn", attack_air_n_expression) - .acmd("game_attackairf", attack_air_f) - .acmd("game_attackairb", attack_air_b) - .acmd("effect_attackairhi", donkey_attack_air_hi_effect) - .acmd("effect_attackairb", donkey_attack_air_b_effect) - .acmd("game_attackairhi", attack_air_hi) - .acmd("expression_attackairhi", attack_air_hi_expression) - .acmd("game_attackairlw", attack_air_lw) - .acmd("effect_attackairlw", donkey_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/donkey/src/acmd/ground.rs b/fighters/donkey/src/acmd/ground.rs index e5710bcbf4..c324c3a334 100644 --- a/fighters/donkey/src/acmd/ground.rs +++ b/fighters/donkey/src/acmd/ground.rs @@ -1,143 +1,122 @@ - use super::*; -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 6.0, 0.0, 11.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 4.5, 0.0, 10.5, 11.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 120, 25, 0, 35, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 25, 3.0, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(12.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 4.0, 361, 30, 0, 25, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 6.0, 0.0, 11.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 4.5, 0.0, 10.5, 11.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 120, 25, 0, 35, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 25, 3.0, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(12.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl"), 4.0, 361, 30, 0, 25, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn attack_12_exp(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_attack12(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); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } -} - -unsafe extern "C" fn attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8 ); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.3 ); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 80); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 8.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 80); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 8.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 8.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 8.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8 ); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 0.5); } } -unsafe extern "C" fn attack_dash_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn attack_dash_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_donkey_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_donkey_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_donkey_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_donkey_attackdash")); } } -unsafe extern "C" fn attack_dash_exp(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_INTP, SLOPE_STATUS_TOP, 4, true); +unsafe extern "C" fn expression_attackdash(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_INTP, SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_erase"), @@ -147,7 +126,7 @@ unsafe extern "C" fn attack_dash_exp(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitl"), @@ -157,27 +136,25 @@ unsafe extern "C" fn attack_dash_exp(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 41.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attack11", attack_11) - .acmd("expression_attack12", attack_12_exp) - .acmd("game_dash", dash) - .acmd("game_attackdash", attack_dash) - .acmd("game_attackairdash", attack_dash) - .acmd("effect_attackdash", attack_dash_eff) - .acmd("effect_attackairdash", attack_dash_eff) - .acmd("sound_attackdash", attack_dash_snd) - .acmd("sound_attackairdash", attack_dash_snd) - .acmd("expression_attackdash", attack_dash_exp) - .acmd("expression_attackairdash", attack_dash_exp) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attackairdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("effect_attackairdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("sound_attackairdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); + agent.acmd("expression_attackairdash", expression_attackdash); } diff --git a/fighters/donkey/src/acmd/mod.rs b/fighters/donkey/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/donkey/src/acmd/mod.rs +++ b/fighters/donkey/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/donkey/src/acmd/other.rs b/fighters/donkey/src/acmd/other.rs index cc30fbb31f..52742e910e 100644 --- a/fighters/donkey/src/acmd/other.rs +++ b/fighters/donkey/src/acmd/other.rs @@ -1,226 +1,169 @@ - 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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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(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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + } + frame(lua_state, 8.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } - 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_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + frame(lua_state, 16.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - } -} - -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_donkey_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_donkey_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_donkey_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_donkey_step_left_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_donkey_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_donkey_step_right_m")); } } -unsafe extern "C" fn dk_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, 16.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); } } -unsafe extern "C" fn expression_superliftlanding(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_S); +unsafe extern "C" fn expression_superliftlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn expression_shoulderlanding(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_shoulderlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + //QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("donkey") - .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("expression_landingheavy", expression_landingheavy) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", dk_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("expression_superliftlanding", expression_superliftlanding) - .acmd("expression_shoulderlanding", expression_shoulderlanding) - .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("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_dash", game_dash); + 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("expression_superliftlanding", expression_superliftlanding); + agent.acmd("expression_shoulderlanding", expression_shoulderlanding); } diff --git a/fighters/donkey/src/acmd/smashes.rs b/fighters/donkey/src/acmd/smashes.rs index f82697e0a0..b525c9fcc9 100644 --- a/fighters/donkey/src/acmd/smashes.rs +++ b/fighters/donkey/src/acmd/smashes.rs @@ -1,97 +1,93 @@ - use super::*; -unsafe extern "C" fn attack_s4_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 22.0, 46, 95, 0, 21, 5.7, 0.0, 6.4, 24.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 361, 93, 0, 18, 3.7, 0.0, 6.4, 18.0, Some(0.0), Some(6.4), Some(10.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 22.0, 46, 95, 0, 21, 5.7, 0.0, 6.4, 24.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 361, 93, 0, 18, 3.7, 0.0, 6.4, 18.0, Some(0.0), Some(6.4), Some(10.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 8.8, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 7.0, 0.0, 18.0, 5.0, Some(0.0), Some(18.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 8.8, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 7.0, 0.0, 18.0, 5.0, Some(0.0), Some(18.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_lw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attacks4", attack_s4_s) - .acmd("game_attackhi4", attack_hi4) - .acmd("game_attacklw4", attack_lw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/donkey/src/acmd/specials.rs b/fighters/donkey/src/acmd/specials.rs index 9c2086afba..78147c6894 100644 --- a/fighters/donkey/src/acmd/specials.rs +++ b/fighters/donkey/src/acmd/specials.rs @@ -1,532 +1,518 @@ use super::*; -unsafe extern "C" fn special_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); // Kirby if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 361, 80, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 361, 80, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_n_max(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); WorkModule::set_int(boma, 3, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_IGNORE_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 28.0, 361, 80, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 28.0, 361, 80, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); // Kirby if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 361, 75, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 361, 75, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_air_n_max(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); WorkModule::set_int(boma, 3, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_IGNORE_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 28.0, 361, 75, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 28.0, 361, 75, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_s_common(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_S_FLAG_FALL_START); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 270, 50, 0, 40, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 270, 50, 0, 40, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 300, 41, 0, 45, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 300, 41, 0, 45, 9.0, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 300, 41, 0, 45, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 300, 41, 0, 45, 9.0, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_headbat_line"), Hash40::new("top"), 0, 12, -3, 0, -75, -85, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_headbat_line"), Hash40::new("top"), 0, 12, -3, 0, -75, -85, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 1.5, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 1.5, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_headbat"), Hash40::new("top"), 0, 0, 6, 5, 0, 0, 0.70, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_headbat"), Hash40::new("top"), 0, 0, 6, 5, 0, 0, 0.70, true); } } -unsafe extern "C" fn special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.33); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.33); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 90, 0, 60, 5.0, 0.0, 10.5, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_XLU), 0); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 90, 0, 60, 5.0, 0.0, 10.5, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } - frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_whole(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 19.0); - // looping decreasingly effective multihits let mut damage = 6.0; for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), damage + 1.0, 361, 80, 0, 30, 8.0, 0.0, 11.0, 15.0, Some(0.0), Some(11.0), Some(-6.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), damage + 1.0, 361, 80, 0, 30, 8.0, 0.0, 11.0, 15.0, Some(0.0), Some(11.0), Some(-6.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); damage = damage * 0.5; } wait(lua_state, 5.0); } - frame(lua_state, 62.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_YACL_DEFAULT); WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_GROUND_SPINEND); //old finisher - //ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 85, 0, 75, 8.0, 0.0, 11.0, 20.0, Some(0.0), Some(11.0), Some(-4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + //ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 85, 0, 75, 8.0, 0.0, 11.0, 20.0, Some(0.0), Some(11.0), Some(-4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); } - } -unsafe extern "C" fn special_lw_start(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, 0.750); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 14.0); + for _ in 0..5 { + if is_excute(agent) { + let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(agent.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 14, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); + } + wait(lua_state, 4.0); + if is_excute(agent) { + let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(agent.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_XY); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 11, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); + } + wait(lua_state, 4.0); + } + frame(lua_state, 63.0); + if is_excute(agent) { + //LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 80.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind_flash"), Hash40::new("donkey_spin_wind_flash"), Hash40::new("top"), -3.5, 17, 15.5, 0, 0, 60, 1.3, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn special_lw_loop(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, 0.750); +unsafe extern "C" fn expression_specialhi(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); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.6); - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - wait(lua_state, 1.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 19.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - wait(lua_state, 3.0); - if !ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - MotionModule::set_frame(boma, MotionModule::frame(boma) + 15.0, true); - } else { - wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.6); - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } + frame(lua_state, 23.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.50); + frame(lua_state, 30.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 5.5, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 7.0, 0.0, 4.0, 13.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + frame(lua_state, 38.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 24.0); - if is_excute(fighter) { - grab!(fighter, MA_MSC_CMD_GRAB_CLEAR_ALL); + frame(lua_state, 47.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn sound_special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_donkey_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_donkey_attackdash")); + frame(lua_state, 53.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } -} - -unsafe extern "C" fn effect_special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 5, 16, 9, 0, 0, 0, 0.8, true); + frame(lua_state, 60.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, -27, 0, 180, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, 27, 0, 0, 1.4, true); + frame(lua_state, 62.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 81.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn game_special_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_GROUND_MOT_FRAME); } frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 40, 8.0, 0.0, 11.0, -8.0, Some(0.0), Some(11.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_XLU), 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 40, 8.0, 0.0, 11.0, -8.0, Some(0.0), Some(11.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 8.0); // loop increasingly weak multihits let mut damage = 8.0; for _ in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { damage = damage * 0.75; WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_CLIFF_CHECK); AttackModule::clear_all(boma); } } frame(lua_state, 68.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_YACL_DEFAULT); // set on 68 in vanilla (this is frame 72 rn) - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } } -unsafe extern "C" fn effect_special_lw_loop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); - //LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); - //LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } } -unsafe extern "C" fn effect_special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 14.0); - for _ in 0..5 { - if is_excute(fighter) { - let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(fighter.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 14, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(fighter.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_XY); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 11, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); - } - wait(lua_state, 4.0); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - //LAST_EFFECT_SET_RATE(fighter, 0.8); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 19.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 5.5, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 7.0, 0.0, 4.0, 13.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } - frame(lua_state, 80.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind_flash"), Hash40::new("donkey_spin_wind_flash"), Hash40::new("top"), -3.5, 17, 15.5, 0, 0, 60, 1.3, true, *EF_FLIP_YZ); + frame(lua_state, 24.0); + if is_excute(agent) { + grab!(agent, MA_MSC_CMD_GRAB_CLEAR_ALL); } } -unsafe extern "C" fn expression_specialhi(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 effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flash"), Hash40::new("top"), 5, 16, 9, 0, 0, 0, 0.8, true); } - - frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, -27, 0, 180, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, 27, 0, 0, 1.4, true); } +} - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn sound_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_donkey_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_donkey_attackdash")); } - frame(lua_state, 23.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); +} + +unsafe extern "C" fn game_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } - frame(lua_state, 30.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.6); + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); } - frame(lua_state, 38.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); } - frame(lua_state, 47.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(lua_state, 53.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 3.0); + if !ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + MotionModule::set_frame(boma, MotionModule::frame(boma) + 15.0, true); + } else { + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.6); + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } } - frame(lua_state, 60.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.50); } - frame(lua_state, 62.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); +} + +unsafe extern "C" fn effect_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); + //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } - frame(lua_state, 81.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); + //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_specialn", special_n) - .acmd("game_specialnmax", special_n_max) - .acmd("game_specialairn", special_air_n) - .acmd("game_specialairnmax", special_air_n_max) - .acmd("game_specials", special_s_common) - .acmd("game_specialairs", special_s_common) - .acmd("effect_specials", special_s_effect) - .acmd("effect_specialairs", special_s_effect) - .acmd("game_specialhi", special_hi) - .acmd("game_speciallwstart", special_lw_start) - .acmd("game_speciallwloop", special_lw_loop) - .acmd("game_specialairlw", special_air_lw) - .acmd("sound_specialairlw", sound_special_air_lw) - .acmd("effect_specialairlw", effect_special_air_lw) - .acmd("game_specialairhi", game_special_air_hi) - .acmd("effect_speciallwloop", effect_special_lw_loop) - .acmd("effect_specialhi", effect_special_hi) - .acmd("expression_specialhi", expression_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialnmax", game_specialnmax); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialairnmax", game_specialairnmax); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("sound_specialairlw", sound_specialairlw); + agent.acmd("game_speciallwloop", game_speciallwloop); + agent.acmd("effect_speciallwloop", effect_speciallwloop); } diff --git a/fighters/donkey/src/acmd/throws.rs b/fighters/donkey/src/acmd/throws.rs index 1b1799579f..d2c64055e5 100644 --- a/fighters/donkey/src/acmd/throws.rs +++ b/fighters/donkey/src/acmd/throws.rs @@ -1,282 +1,277 @@ - use super::*; -unsafe extern "C" fn catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(14.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(14.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 catch_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 3.4, Some(0.0), Some(7.0), Some(18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 3.4, Some(0.0), Some(7.0), Some(18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 catch_turn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-21.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-21.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 53, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 53, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 38, 19); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 38, 19); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{x:-5.0, y: 8.0, z: 24.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwfb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 52, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwfb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 52, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 26, 14); + CHECK_FINISH_CAMERA(agent, 26, 14); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let release_position = Vector3f{ x:5.0, y: 9.0, z: -12.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwfhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwfhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 36.0, 39.0 + 18.0 * (weight / 100.0 - 1.0)); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 36.0, 39.0 + 18.0 * (weight / 100.0 - 1.0)); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 31); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 31); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 16.0, z: 0.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwflw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 46, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwflw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 46, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - CHECK_FINISH_CAMERA(fighter, 4, 2); + CHECK_FINISH_CAMERA(agent, 4, 2); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - SET_SPEED_EX(fighter, 0.0, 1.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + SET_SPEED_EX(agent, 0.0, 1.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - } -unsafe extern "C" fn heavy_item_throw_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS, boma.stick_x().abs() < 0.33); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - } - - let is_neutral_toss = VarModule::is_flag(fighter.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS); - let toss_frame = match is_neutral_toss { - true => 16.0, - false => 17.0 - }; - frame(lua_state, toss_frame); - if is_excute(fighter) { - ItemModule::throw_item(boma, 45.0, 3.0, 1.0, 0, true, 0.0); - FT_MOTION_RATE(fighter, 1.0); - } +unsafe extern "C" fn game_itemheavythrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + VarModule::set_flag(agent.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS, boma.stick_x().abs() < 0.33); + } + frame(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); + } + let is_neutral_toss = VarModule::is_flag(agent.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS); + let toss_frame = match is_neutral_toss { + true => 16.0, + false => 17.0 + }; + frame(lua_state, toss_frame); + if is_excute(agent) { + ItemModule::throw_item(boma, 45.0, 3.0, 1.0, 0, true, 0.0); + FT_MOTION_RATE(agent, 1.0); + } } -unsafe extern "C" fn heavy_item_throw_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 19.5); - if is_excute(fighter) { - // the exact *real* frame we are on needs to stay a whole - // number in order for the barrel (or other item) to be - // released at an appropriate location. - ItemModule::throw_item(boma, 135.0, 4.0, 1.0, 0, true, 0.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); - } +unsafe extern "C" fn game_itemheavythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); + } + frame(lua_state, 19.5); + if is_excute(agent) { + // the exact *real* frame we are on needs to stay a whole + // number in order for the barrel (or other item) to be + // released at an appropriate location. + ItemModule::throw_item(boma, 135.0, 4.0, 1.0, 0, true, 0.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); + } } -unsafe extern "C" fn game_itemheavythrowlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_itemheavythrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 13.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ItemModule::throw_item(boma, 270.0, 4.0, 1.0, 0, true, 0.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - let main_speed_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let stick_add_x = fighter.stick_x() * 0.5; + if is_excute(agent) { + let main_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let stick_add_x = agent.stick_x() * 0.5; // change to kinetic type fall and change to air situation - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + GroundModule::set_correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(boma, SituationKind(*SITUATION_KIND_AIR), true); let kinetic = *FIGHTER_KINETIC_TYPE_FALL; - KineticModule::change_kinetic(fighter.module_accessor, kinetic); + KineticModule::change_kinetic(boma, kinetic); // pop up into the air - SET_SPEED_EX(fighter, (main_speed_x + stick_add_x) * PostureModule::lr(fighter.module_accessor), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, (main_speed_x + stick_add_x) * PostureModule::lr(boma), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } // when we reach the cancel frame, transition into fall instead - let motion_kind = Hash40::new_raw(MotionModule::motion_kind(fighter.module_accessor)); - let cancel_frame = FighterMotionModuleImpl::get_cancel_frame( - boma, motion_kind, true); + let motion_kind = Hash40::new_raw(MotionModule::motion_kind(boma)); + let cancel_frame = FighterMotionModuleImpl::get_cancel_frame(boma, motion_kind, true); frame(lua_state, cancel_frame); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); } } } -unsafe extern "C" fn effect_heavyitemthrowlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_heavyitemthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), -2, 16, -1, -5, -33, -102, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), -2, 16, -1, -5, -33, -102, 1.2, true, *EF_FLIP_YZ); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_catch", catch) - .acmd("game_catchdash", catch_dash) - .acmd("game_catchturn", catch_turn) - .acmd("game_throwff", game_throwff) - .acmd("game_throwfb", game_throwfb) - .acmd("game_throwfhi", game_throwfhi) - .acmd("game_throwflw", game_throwflw) - .acmd("game_itemheavythrowf", heavy_item_throw_f) - .acmd("game_itemheavythrowb", heavy_item_throw_b) - .acmd("game_itemheavythrowlw", game_itemheavythrowlw) - .acmd("game_itemheavythrowlw4", game_itemheavythrowlw) - .acmd("effect_itemheavythrowlw", effect_heavyitemthrowlw) - .acmd("effect_itemheavythrowlw4", effect_heavyitemthrowlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwff", game_throwff); + + agent.acmd("game_throwfb", game_throwfb); + + agent.acmd("game_throwfhi", game_throwfhi); + + agent.acmd("game_throwflw", game_throwflw); + + agent.acmd("game_itemheavythrowf", game_itemheavythrowf); + + agent.acmd("game_itemheavythrowb", game_itemheavythrowb); + + agent.acmd("game_itemheavythrowlw", game_itemheavythrowlw); + agent.acmd("game_itemheavythrowlw4", game_itemheavythrowlw); + agent.acmd("effect_itemheavythrowlw", effect_heavyitemthrowlw); + agent.acmd("effect_itemheavythrowlw4", effect_heavyitemthrowlw); } diff --git a/fighters/donkey/src/acmd/tilts.rs b/fighters/donkey/src/acmd/tilts.rs index abd8e6da9f..ccaf9f0174 100644 --- a/fighters/donkey/src/acmd/tilts.rs +++ b/fighters/donkey/src/acmd/tilts.rs @@ -1,209 +1,171 @@ - use super::*; -unsafe extern "C" fn attack_s3_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.910); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.5, 6.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 78, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_s3_hi_expression(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_attacks3(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); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn attack_s3_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.910); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.5, 6.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 78, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_s3_s_expression(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); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn attack_s3_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.910); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.910); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 3, 9, 1.5, 2.5, -42, 15, 1.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 3, 9, 1.5, 2.5, -42, 15, 1.9, true, *EF_FLIP_YZ); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn attack_s3_lw_expression(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); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn attack_hi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 9.0, 110, 105, 0, 70, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 110, 110, 0, 70, 4.0, 3.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 110, 115, 0, 70, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 9.0, 110, 105, 0, 70, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 110, 110, 0, 70, 4.0, 3.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 110, 115, 0, 70, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 0, 12.5, -3, -138, 80, -54, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.9); - } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter, 5.0); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 0, 12.5, -3, -138, 80, -54, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.9); + } + frame(lua_state, 10.0); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent, 5.0); } } -unsafe extern "C" fn attack_lw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 4.4, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 5.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 4.4, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 5.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attacks3hi", attack_s3_hi) - .acmd("expression_attacks3hi", attack_s3_hi_expression) - .acmd("game_attacks3", attack_s3_s) - .acmd("expression_attacks3", attack_s3_s_expression) - .acmd("game_attacks3lw", attack_s3_lw) - .acmd("effect_attacks3lw", attack_s3_lw_effect) - .acmd("expression_attacks3lw", attack_s3_lw_expression) - .acmd("game_attackhi3", attack_hi3) - .acmd("effect_attackhi3", attack_hi3_effect) - .acmd("game_attacklw3", attack_lw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/donkey/src/lib.rs b/fighters/donkey/src/lib.rs index 8e2ddcc726..248375e7f6 100644 --- a/fighters/donkey/src/lib.rs +++ b/fighters/donkey/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("donkey"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/donkey/src/opff.rs b/fighters/donkey/src/opff.rs index 09e3d7b153..a597c6605a 100644 --- a/fighters/donkey/src/opff.rs +++ b/fighters/donkey/src/opff.rs @@ -195,8 +195,7 @@ pub unsafe fn donkey_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("donkey") - .on_line(Main, donkey_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, donkey_frame_wrapper); } diff --git a/fighters/donkey/src/status/catch_pull.rs b/fighters/donkey/src/status/catch_pull.rs index 363b26234f..f28e908efd 100644 --- a/fighters/donkey/src/status/catch_pull.rs +++ b/fighters/donkey/src/status/catch_pull.rs @@ -72,8 +72,6 @@ unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2C } } -pub fn install() { - smashline::Agent::new("donkey") - .status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main); } diff --git a/fighters/donkey/src/status/item_throw_heavy.rs b/fighters/donkey/src/status/item_throw_heavy.rs index 1182786aba..7fcf1116ff 100644 --- a/fighters/donkey/src/status/item_throw_heavy.rs +++ b/fighters/donkey/src/status/item_throw_heavy.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY -unsafe extern "C" fn heavy_throw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn item_throw_heavy_end(fighter: &mut L2CFighterCommon) -> L2CValue { if MotionModule::motion_kind(fighter.module_accessor) == hash40("item_heavy_throw_b") { PostureModule::reverse_lr(fighter.module_accessor); } @@ -10,8 +10,6 @@ unsafe extern "C" fn heavy_throw_end(fighter: &mut L2CFighterCommon) -> L2CValue return smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY)(fighter); } -pub fn install() { - smashline::Agent::new("donkey") - .status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, heavy_throw_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, item_throw_heavy_end); } diff --git a/fighters/donkey/src/status.rs b/fighters/donkey/src/status/mod.rs similarity index 75% rename from fighters/donkey/src/status.rs rename to fighters/donkey/src/status/mod.rs index a2e643542b..2170fbd448 100644 --- a/fighters/donkey/src/status.rs +++ b/fighters/donkey/src/status/mod.rs @@ -56,24 +56,18 @@ unsafe extern "C" fn status_change(fighter: &mut L2CFighterCommon) -> L2CValue { // setting the callback for shield to be used for b in shield -extern "C" fn donkey_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) == *FIGHTER_KIND_DONKEY { - //fighter.global_table[0x34].assign(&L2CValue::Ptr(when_shield as *const () as _)); - fighter.global_table[STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(status_change as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + //fighter.global_table[0x34].assign(&L2CValue::Ptr(when_shield as *const () as _)); + fighter.global_table[STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(status_change as *const () as _)); } -pub fn install() { - item_throw_heavy::install(); - special_hi::install(); - special_lw::install(); - catch_pull::install(); - shoulder::install(); - super_lift::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); - smashline::Agent::new("donkey") - .on_start(donkey_init) - .install(); + item_throw_heavy::install(agent); + special_hi::install(agent); + special_lw::install(agent); + catch_pull::install(agent); + shoulder::install(agent); + super_lift::install(agent); } diff --git a/fighters/donkey/src/status/shoulder.rs b/fighters/donkey/src/status/shoulder.rs index 305055142b..a355fb35e2 100644 --- a/fighters/donkey/src/status/shoulder.rs +++ b/fighters/donkey/src/status/shoulder.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -// status script import + +// FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING /// cargo carry @@ -29,12 +29,6 @@ unsafe extern "C" fn shoulder_landing_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -pub fn install() { - smashline::Agent::new("donkey") - .status( - Main, - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING, - shoulder_landing_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING, shoulder_landing_main); } diff --git a/fighters/donkey/src/status/special_hi.rs b/fighters/donkey/src/status/special_hi.rs index ae333cc89c..d0610e4144 100644 --- a/fighters/donkey/src/status/special_hi.rs +++ b/fighters/donkey/src/status/special_hi.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_HI -pub unsafe extern "C" fn exec_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); @@ -15,8 +15,6 @@ pub unsafe extern "C" fn exec_special_hi(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("donkey") - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, exec_special_hi) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); } diff --git a/fighters/donkey/src/status/special_lw.rs b/fighters/donkey/src/status/special_lw.rs index 7a6fd28903..cffb94763a 100644 --- a/fighters/donkey/src/status/special_lw.rs +++ b/fighters/donkey/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { // if you are grounded, pick up heavy item/spawn barrel @@ -112,8 +114,6 @@ unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2C 1.into() } -pub fn install() { - smashline::Agent::new("donkey") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/donkey/src/status/super_lift.rs b/fighters/donkey/src/status/super_lift.rs index 0bb92dd09f..2b3e03ddd1 100644 --- a/fighters/donkey/src/status/super_lift.rs +++ b/fighters/donkey/src/status/super_lift.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -// status script import + +// FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING /// heavy item carry @@ -127,13 +127,8 @@ pub unsafe extern "C" fn donkey_frame_wrapper(fighter: &mut smash::lua2cpp::L2CF if status == *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_JUMP_SQUAT_B { super_lift_jump_squat_b(fighter) } } -pub fn install() { - smashline::Agent::new("donkey") - .status( - Main, - *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING, - super_lift_landing_main, - ) - .on_line(Main, donkey_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING, super_lift_landing_main); + + agent.on_line(Main, donkey_frame_wrapper); } diff --git a/fighters/duckhunt/src/acmd/aerials.rs b/fighters/duckhunt/src/acmd/aerials.rs index 3a12c4d659..05a2bbd135 100644 --- a/fighters/duckhunt/src/acmd/aerials.rs +++ b/fighters/duckhunt/src/acmd/aerials.rs @@ -1,212 +1,209 @@ use super::*; -unsafe extern "C" fn duckhunt_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("arml"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 100, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 100, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); //Air-only - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); //Air-only - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 6.0, 0.0, 21.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 6.0, 0.0, 21.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), -1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), -1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 0, 2, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 0, 2, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn duckhunt_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 255, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 130, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 255, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 130, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 270, 60, 0, 30, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 270, 60, 0, 30, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); // Ground-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 250, 95, 0, 60, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 250, 95, 0, 60, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attackairn", duckhunt_attack_air_n_game) - .acmd("game_attackairf", duckhunt_attack_air_f_game) - .acmd("game_attackairb", duckhunt_attack_air_b_game) - .acmd("game_attackairhi", duckhunt_attack_air_hi_game) - .acmd("effect_attackairhi", duckhunt_attack_air_hi_effect) - .acmd("game_attackairlw", duckhunt_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/duckhunt/src/acmd/ground.rs b/fighters/duckhunt/src/acmd/ground.rs index 73f22f0709..b9ecb3d52a 100644 --- a/fighters/duckhunt/src/acmd/ground.rs +++ b/fighters/duckhunt/src/acmd/ground.rs @@ -1,140 +1,137 @@ - use super::*; -unsafe extern "C" fn duckhunt_attackdash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(10.0-1.0)); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn duckhunt_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //Locking hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn duckhunt_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 30, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 25, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 30, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 25, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); //Locking hitboxes - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn duckhunt_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 28.0, 30.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 28.0, 30.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn duckhunt_attack_100_sub_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack100sub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 361, 15, 0, 16, 4.5, 0.0, 7.5, 4.5, None, None, None, 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 361, 10, 0, 12, 6.5, 0.0, 7.5, 14.0, Some(0.0), Some(7.5), Some(6.5), 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 361, 15, 0, 16, 4.5, 0.0, 7.5, 4.5, None, None, None, 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 361, 10, 0, 12, 6.5, 0.0, 7.5, 14.0, Some(0.0), Some(7.5), Some(6.5), 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 5.0); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 5.0); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); } } -unsafe extern "C" fn duckhunt_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 17.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 17.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 36.3/(39.0-6.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 36.3/(39.0-6.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attackdash", duckhunt_attackdash_game) - .acmd("game_attack11", duckhunt_attack_11_game) - .acmd("game_attack12", duckhunt_attack_12_game) - .acmd("game_attack13", duckhunt_attack_13_game) - .acmd("game_attack100sub", duckhunt_attack_100_sub_game) - .acmd("game_attack100end", duckhunt_attack_100_end_game) - .install(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 6.0/(10.0-1.0)); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100sub", game_attack100sub); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/duckhunt/src/acmd/mod.rs b/fighters/duckhunt/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/duckhunt/src/acmd/mod.rs +++ b/fighters/duckhunt/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/duckhunt/src/acmd/other.rs b/fighters/duckhunt/src/acmd/other.rs index e7e7008d69..afcf2256d8 100644 --- a/fighters/duckhunt/src/acmd/other.rs +++ b/fighters/duckhunt/src/acmd/other.rs @@ -1,392 +1,152 @@ - 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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_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(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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_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_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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 duckhunt_can_explode_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"), 12.0, 60, 100, 0, 40, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 95, 0, 40, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 300, 1, 0, 0, 26, 60); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn duckhunt_clay_fly_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"), 2.0, 75, 50, 0, 20, 1.0, 0.0, 0.0, 0.0, None, None, None, 3.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_IS_ADD_ACCEL_Y); - } -} - -unsafe extern "C" fn duckhunt_clay_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 60, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 100, 100, 20, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 9.0, -6.0, Some(0.0), Some(-9.0), Some(6.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 0.5, -11.0, Some(0.0), Some(-1.1), Some(11.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, -8.0, -8.0, Some(0.0), Some(8.0), Some(8.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l02")); - } - frame(lua_state, 275.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_duckhunt_special_l09")); - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_effectl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 275.0); - let gunman_kind = WorkModule::get_int(fighter.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - if is_excute(fighter) { - match gunman_kind { - 0 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_effectr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 275.0); - let gunman_kind = WorkModule::get_int(fighter.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - if is_excute(fighter) { - match gunman_kind { - 0 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - } } -unsafe extern "C" fn duckhunt_gunmanbullet_move_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 90, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 70, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 65, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.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 effect_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn sound_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeals(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) { let handle = SoundModule::play_se(boma, Hash40::new("se_duckhunt_appeal_s01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 3.0, 0); } } -unsafe extern "C" fn expression_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 10); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 10); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_superleaf"), 72, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 88.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("duckhunt_gunmanbullet") - .acmd("game_move", duckhunt_gunmanbullet_move_game) - .install(); - smashline::Agent::new("duckhunt_gunman") - .acmd("sound_readyr", duckhunt_gunman_ready_sound) - .acmd("sound_readyl", duckhunt_gunman_ready_sound) - .acmd("effect_readyl", duckhunt_gunman_ready_effectl) - .acmd("effect_readyr", duckhunt_gunman_ready_effectr) - .install(); - smashline::Agent::new("duckhunt_can") - .acmd("game_explode", duckhunt_can_explode_game) - .install(); - smashline::Agent::new("duckhunt") - .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("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_appealsl", effect_appeals) - .acmd("effect_appealsr", effect_appeals) - .acmd("sound_appealsl", sound_appeals) - .acmd("sound_appealsr", sound_appeals) - .acmd("expression_appealsl", expression_appeals) - .acmd("expression_appealsr", expression_appeals) - .install(); - smashline::Agent::new("duckhunt_clay") - .acmd("game_fly", duckhunt_clay_fly_game) - .acmd("game_hit", duckhunt_clay_hit_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +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("game_dash", game_dash); + 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("effect_appealsl", stub); + agent.acmd("effect_appealsr", stub); + agent.acmd("sound_appealsl", sound_appeals); + agent.acmd("sound_appealsr", sound_appeals); + agent.acmd("expression_appealsl", expression_appeals); + agent.acmd("expression_appealsr", expression_appeals); } diff --git a/fighters/duckhunt/src/acmd/smashes.rs b/fighters/duckhunt/src/acmd/smashes.rs index 5ebc766300..50f39b7017 100644 --- a/fighters/duckhunt/src/acmd/smashes.rs +++ b/fighters/duckhunt/src/acmd/smashes.rs @@ -1,115 +1,115 @@ use super::*; -unsafe extern "C" fn duckhunt_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 4, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 100, 66, 0, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 100, 66, 0, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 45, 100, 70, 0, 7.0, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 45, 100, 70, 0, 7.0, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 361, 131, 0, 50, 9.0, 0.0, 6.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 361, 131, 0, 50, 9.0, 0.0, 6.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s01")); } frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s02")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s02")); + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_duckhunt_rnd_attack_dog")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_duckhunt_rnd_attack_dog")); } frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s03")); } } -unsafe extern "C" fn duckhunt_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 11); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 11); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 64.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn duckhunt_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 5, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 127, 0, 0, 110, 5.3, 0.0, 6.0, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 127, 0, 0, 110, 5.3, 0.0, 6.0, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 85, 120, 0, 50, 9.3, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 85, 120, 0, 50, 9.3, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -132,119 +132,119 @@ unsafe extern "C" fn duckhunt_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 12); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 38.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 62.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn duckhunt_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 5, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 170, 0, 0, 120, 6.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 170, 0, 0, 120, 6.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 35, 70, 0, 70, 7.0, 0.0, 8.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 35, 70, 0, 70, 7.0, 0.0, 8.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_l02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_duckhunt_rnd_attack_dog")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_duckhunt_rnd_attack_dog")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_l03")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_l03")); + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } } -unsafe extern "C" fn duckhunt_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 12); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 61.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attacks4", duckhunt_attack_s4_s_game) - .acmd("sound_attacks4", duckhunt_attack_s4_sound) - .acmd("expression_attacks4", duckhunt_attack_s4_expression) - .acmd("game_attackhi4", duckhunt_attack_hi4_game) - .acmd("sound_attackhi4", duckhunt_attack_hi4_sound) - .acmd("expression_attackhi4", duckhunt_attack_hi4_expression) - .acmd("game_attacklw4", duckhunt_attack_lw4_game) - .acmd("sound_attacklw4", duckhunt_attack_lw4_sound) - .acmd("expression_attacklw4", duckhunt_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/duckhunt/src/acmd/specials.rs b/fighters/duckhunt/src/acmd/specials.rs index ff7f7e0f51..d1f6457d99 100644 --- a/fighters/duckhunt/src/acmd/specials.rs +++ b/fighters/duckhunt/src/acmd/specials.rs @@ -1,70 +1,68 @@ use super::*; -unsafe extern "C" fn duckhunt_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_REQUEST_SPECIAL_HI_CANCEL); - } - -} - -unsafe extern "C" fn duckhunt_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state: u64 = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_STATUS_SPECIAL_LW_FLAG_CALL_TRIGGER); - } - frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.15); -} - -unsafe extern "C" fn duckhunt_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state: u64 = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state: u64 = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 42.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 42.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_RELEASE_CAN); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn duckhunt_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 18.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 18.0); frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 50.0, 41.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 50.0, 41.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_RELEASE_CLAY); } frame(lua_state, 40.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_specialhi", duckhunt_special_hi_game) - .acmd("game_specialairlw", duckhunt_special_lw_game) - .acmd("game_speciallw", duckhunt_special_lw_game) - .acmd("game_specialairn", duckhunt_special_n_game) - .acmd("game_specialn", duckhunt_special_n_game) - .acmd("game_specials", duckhunt_special_s_game) - .acmd("game_specialairs", duckhunt_special_s_game) - .install(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_REQUEST_SPECIAL_HI_CANCEL); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state: u64 = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_STATUS_SPECIAL_LW_FLAG_CALL_TRIGGER); + } + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 1.15); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/duckhunt/src/acmd/throws.rs b/fighters/duckhunt/src/acmd/throws.rs index 0b31347f61..ec1be7906b 100644 --- a/fighters/duckhunt/src/acmd/throws.rs +++ b/fighters/duckhunt/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn duckhunt_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.5), Some(9.70), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.5), Some(9.70), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 duckhunt_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn duckhunt_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,57 +63,57 @@ unsafe extern "C" fn duckhunt_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 72, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 72, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 6, 1); - CHECK_FINISH_CAMERA(fighter, 3, 17); + if is_excute(agent) { + FT_CATCH_STOP(agent, 6, 1); + CHECK_FINISH_CAMERA(agent, 3, 17); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn duckhunt_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 80, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 80, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 70, 0, 50, 7.0, 0.0, 4.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 4.0, 50, 70, 0, 50, 7.0, 0.0, 4.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - FT_CATCH_STOP(fighter, 8, 1); - CHECK_FINISH_CAMERA(fighter, 10, 0); + FT_CATCH_STOP(agent, 8, 1); + CHECK_FINISH_CAMERA(agent, 10, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_catch", duckhunt_catch_game) - .acmd("game_catchdash", duckhunt_catch_dash_game) - .acmd("game_catchturn", duckhunt_catch_turn_game) - .acmd("game_throwhi", duckhunt_throw_hi_game) - .acmd("game_throwlw", duckhunt_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/duckhunt/src/acmd/tilts.rs b/fighters/duckhunt/src/acmd/tilts.rs index b05bbca570..7fd87ad74c 100644 --- a/fighters/duckhunt/src/acmd/tilts.rs +++ b/fighters/duckhunt/src/acmd/tilts.rs @@ -1,158 +1,152 @@ - use super::*; -unsafe extern "C" fn duckhunt_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5,-8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5,-8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 8.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 3.5, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 3.5, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 6.9, 2.5, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 6.9, 2.5, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_openwing") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } } -unsafe extern "C" fn duckhunt_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 25, 60, 0, 50, 3.5, -8.0, -5.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, -3.0, -1.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, 2.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 25, 60, 0, 50, 3.5, -8.0, -5.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, -3.0, -1.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, 2.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } // Squat Attack -unsafe extern "C" fn duckhunt_attack_squat_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacksquats3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); + if is_excute(agent) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Inside Hitbox - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); // Tipper Hitbox - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 70, 45, 0, 45, 4.5, 0.0, 1.0, 15.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 70, 45, 0, 45, 4.5, 0.0, 1.0, 15.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - CancelModule::enable_cancel(fighter.boma()); + if is_excute(agent) { + CancelModule::enable_cancel(agent.boma()); } } -unsafe extern "C" fn duckhunt_attack_squat_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -167,7 +161,7 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_squat_s3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -185,7 +179,7 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_squat_s3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -207,17 +201,18 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_expression(agent: &mut L2CAgentBas } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attacks3hi", duckhunt_attack_s3_hi_game) - .acmd("game_attacks3", duckhunt_attack_s3_game) - .acmd("game_attacks3lw", duckhunt_attack_s3_lw_game) - .acmd("game_attacksquats3", duckhunt_attack_squat_s3_game) - .acmd("effect_attacksquats3", duckhunt_attack_squat_s3_effect) - .acmd("sound_attacksquats3", duckhunt_attack_squat_s3_sound) - .acmd("expression_attacksquats3", duckhunt_attack_squat_s3_expression) - .acmd("game_attackhi3", duckhunt_attack_hi3_game) - .acmd("expression_attackhi3", duckhunt_attack_hi3_expression) - .acmd("game_attacklw3", duckhunt_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + + agent.acmd("game_attacksquats3", game_attacksquats3); + agent.acmd("effect_attacksquats3", effect_attacksquats3); + agent.acmd("sound_attacksquats3", sound_attacksquats3); + agent.acmd("expression_attacksquats3", expression_attacksquats3); } diff --git a/fighters/duckhunt/src/can/acmd.rs b/fighters/duckhunt/src/can/acmd.rs new file mode 100644 index 0000000000..ed9c280385 --- /dev/null +++ b/fighters/duckhunt/src/can/acmd.rs @@ -0,0 +1,23 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 100, 0, 40, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 95, 0, 40, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 300, 1, 0, 0, 26, 60); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} diff --git a/fighters/duckhunt/src/can/mod.rs b/fighters/duckhunt/src/can/mod.rs new file mode 100644 index 0000000000..3c2f93e42d --- /dev/null +++ b/fighters/duckhunt/src/can/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_can"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/clay/acmd.rs b/fighters/duckhunt/src/clay/acmd.rs new file mode 100644 index 0000000000..9cc9102202 --- /dev/null +++ b/fighters/duckhunt/src/clay/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 50, 0, 20, 1.0, 0.0, 0.0, 0.0, None, None, None, 3.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_IS_ADD_ACCEL_Y); + } +} + +unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 60, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 100, 100, 20, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 9.0, -6.0, Some(0.0), Some(-9.0), Some(6.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 0.5, -11.0, Some(0.0), Some(-1.1), Some(11.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, -8.0, -8.0, Some(0.0), Some(8.0), Some(8.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_hit", game_hit); +} diff --git a/fighters/duckhunt/src/clay/mod.rs b/fighters/duckhunt/src/clay/mod.rs new file mode 100644 index 0000000000..b1878ce5ba --- /dev/null +++ b/fighters/duckhunt/src/clay/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_clay"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/clay/status.rs b/fighters/duckhunt/src/clay/status.rs new file mode 100644 index 0000000000..04a6797094 --- /dev/null +++ b/fighters/duckhunt/src/clay/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; + +// WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY + +pub unsafe extern "C" fn fly_init(weapon: &mut L2CWeaponCommon) -> L2CValue { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let duckhunt = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(duckhunt, vars::duckhunt::status::CLAY_SMASH_INPUT) { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_BY_SMASH); + } + smashline::original_status(Init, weapon, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY)(weapon) +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY, fly_init); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunman/acmd.rs b/fighters/duckhunt/src/gunman/acmd.rs new file mode 100644 index 0000000000..5f13ad1662 --- /dev/null +++ b/fighters/duckhunt/src/gunman/acmd.rs @@ -0,0 +1,87 @@ +use super::*; + +unsafe extern "C" fn sound_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l02")); + } + frame(lua_state, 275.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_duckhunt_special_l09")); + } +} + +unsafe extern "C" fn effect_readyl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 275.0); + let gunman_kind = WorkModule::get_int(agent.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + if is_excute(agent) { + match gunman_kind { + 0 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + } +} + +unsafe extern "C" fn effect_readyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 275.0); + let gunman_kind = WorkModule::get_int(agent.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + if is_excute(agent) { + match gunman_kind { + 0 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_readyl", sound_ready); + agent.acmd("sound_readyr", sound_ready); + + agent.acmd("effect_readyl", effect_readyl); + agent.acmd("effect_readyr", effect_readyr); +} diff --git a/fighters/duckhunt/src/gunman/mod.rs b/fighters/duckhunt/src/gunman/mod.rs new file mode 100644 index 0000000000..96b0cea94f --- /dev/null +++ b/fighters/duckhunt/src/gunman/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_gunman"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunman/opff.rs b/fighters/duckhunt/src/gunman/opff.rs new file mode 100644 index 0000000000..70baddc2b1 --- /dev/null +++ b/fighters/duckhunt/src/gunman/opff.rs @@ -0,0 +1,56 @@ +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; + +pub extern "C" fn gunman_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.kind() != WEAPON_KIND_DUCKHUNT_GUNMAN { + return + } + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if weapon.is_status(*WEAPON_DUCKHUNT_GUNMAN_STATUS_KIND_READY) { + let duckhunt = utils::util::get_battle_object_from_id(owner_id); + let duckhunt_boma = &mut *(*duckhunt).module_accessor; + + if duckhunt_boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_STANDBY]) { + return + } + + if duckhunt_boma.is_cat_flag(Cat1::SpecialLw) && duckhunt_boma.is_button_trigger(Buttons::Special | Buttons::SpecialRaw) && WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) > 25 { + PLAY_STATUS(weapon, Hash40::new("se_duckhunt_special_l09")); + let gunman_kind = WorkModule::get_int(weapon.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + let lr = PostureModule::lr(weapon.boma()); + match gunman_kind { + 0 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + WorkModule::set_int(weapon.module_accessor, 25, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + VarModule::set_int(duckhunt, vars::duckhunt::instance::GUNMAN_TIMER, 300); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gunman_callback); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunmanbullet/acmd.rs b/fighters/duckhunt/src/gunmanbullet/acmd.rs new file mode 100644 index 0000000000..d8a0344234 --- /dev/null +++ b/fighters/duckhunt/src/gunmanbullet/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 90, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 70, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 65, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/duckhunt/src/gunmanbullet/mod.rs b/fighters/duckhunt/src/gunmanbullet/mod.rs new file mode 100644 index 0000000000..382dbb7893 --- /dev/null +++ b/fighters/duckhunt/src/gunmanbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_gunmanbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/lib.rs b/fighters/duckhunt/src/lib.rs index 7cbe3d5d55..1d7a6ab4f0 100644 --- a/fighters/duckhunt/src/lib.rs +++ b/fighters/duckhunt/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod can; +mod clay; +mod gunman; +mod gunmanbullet; use smash::{ lib::{ @@ -37,21 +44,17 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn duckhunt_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_DUCKHUNT { - return; - } - VarModule::set_int(fighter.battle_object, vars::duckhunt::instance::GUNMAN_TIMER, 0); - } -} +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); - smashline::Agent::new("duckhunt") - .on_start(duckhunt_reset) - .install(); + let agent = &mut Agent::new("duckhunt"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + can::install(); + clay::install(); + gunman::install(); + gunmanbullet::install(); } \ No newline at end of file diff --git a/fighters/duckhunt/src/opff.rs b/fighters/duckhunt/src/opff.rs index 2cdb8420e9..82ea23af3f 100644 --- a/fighters/duckhunt/src/opff.rs +++ b/fighters/duckhunt/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn duck_jump_cancel(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY) && fighter.motion_frame() > 20.0 @@ -66,61 +65,6 @@ pub extern "C" fn duckhunt_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighte } } -pub extern "C" fn gunman_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_DUCKHUNT_GUNMAN { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if weapon.is_status(*WEAPON_DUCKHUNT_GUNMAN_STATUS_KIND_READY) { - let duckhunt = utils::util::get_battle_object_from_id(owner_id); - let duckhunt_boma = &mut *(*duckhunt).module_accessor; - - if duckhunt_boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_STANDBY]) { - return - } - - if duckhunt_boma.is_cat_flag(Cat1::SpecialLw) && duckhunt_boma.is_button_trigger(Buttons::Special | Buttons::SpecialRaw) && WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) > 25 { - PLAY_STATUS(weapon, Hash40::new("se_duckhunt_special_l09")); - let gunman_kind = WorkModule::get_int(weapon.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - let lr = PostureModule::lr(weapon.boma()); - match gunman_kind { - 0 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - WorkModule::set_int(weapon.module_accessor, 25, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - VarModule::set_int(duckhunt, vars::duckhunt::instance::GUNMAN_TIMER, 300); - } - } -} - -pub fn install() { - smashline::Agent::new("duckhunt") - .on_line(Main, duckhunt_frame_wrapper) - .install(); - smashline::Agent::new("duckhunt_gunman") - .on_line(Main, gunman_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, duckhunt_frame_wrapper); } \ No newline at end of file diff --git a/fighters/duckhunt/src/status/attacks3.rs b/fighters/duckhunt/src/status/attacks3.rs index 8bbbb851a3..40c31e6814 100644 --- a/fighters/duckhunt/src/status/attacks3.rs +++ b/fighters/duckhunt/src/status/attacks3.rs @@ -1,6 +1,4 @@ - use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_S3 @@ -37,8 +35,6 @@ unsafe extern "C" fn attack_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); } diff --git a/fighters/duckhunt/src/status/mod.rs b/fighters/duckhunt/src/status/mod.rs index b2ac8f05dd..485e01d74d 100644 --- a/fighters/duckhunt/src/status/mod.rs +++ b/fighters/duckhunt/src/status/mod.rs @@ -1,11 +1,19 @@ use super::*; +use globals::*; +// status script import +mod attacks3; mod special_n; mod special_s; -mod attacks3; -pub fn install() { - special_n::install(); - special_s::install(); - attacks3::install(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::set_int(fighter.battle_object, vars::duckhunt::instance::GUNMAN_TIMER, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attacks3::install(agent); + special_n::install(agent); + special_s::install(agent); } diff --git a/fighters/duckhunt/src/status/special_n.rs b/fighters/duckhunt/src/status/special_n.rs index e17ce7b14c..09a1f920bd 100644 --- a/fighters/duckhunt/src/status/special_n.rs +++ b/fighters/duckhunt/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_N @@ -84,8 +83,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/duckhunt/src/status/special_s.rs b/fighters/duckhunt/src/status/special_s.rs index c80d7463be..dc1565e116 100644 --- a/fighters/duckhunt/src/status/special_s.rs +++ b/fighters/duckhunt/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S @@ -94,20 +93,6 @@ unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn clay_fly_init(weapon: &mut L2CWeaponCommon) -> L2CValue { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let duckhunt = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(duckhunt, vars::duckhunt::status::CLAY_SMASH_INPUT) { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_BY_SMASH); - } - smashline::original_status(Init, weapon, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY)(weapon) -} - -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .install(); - smashline::Agent::new("duckhunt_clay") - .status(Init, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY, clay_fly_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/aerials.rs b/fighters/edge/src/acmd/aerials.rs index 4217767917..0ecae63d52 100644 --- a/fighters/edge/src/acmd/aerials.rs +++ b/fighters/edge/src/acmd/aerials.rs @@ -1,500 +1,496 @@ - use super::*; -unsafe extern "C" fn sephiroth_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.3); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 50, 70, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 50, 70, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.824); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.824); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn sephiroth_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_light_finger_aura"), Hash40::new("handr"), 2.5, 1, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_light_finger_aura"), Hash40::new("handr"), 2.5, 1, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_light_finger_snapping"), -1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_light_finger_snapping"), -1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("legl"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("legl"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_light_finger_aura"), false, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("edge_light_impact2"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); - EFFECT_FLW_POS(fighter, Hash40::new("edge_light_impact"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("edge_light_finger_snapping"), Hash40::new("handr"), 3.5, 1, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_light_finger_aura"), false, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("edge_light_impact2"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("edge_light_impact"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("edge_light_finger_snapping"), Hash40::new("handr"), 3.5, 1, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_light_impact2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_light_impact2"), false, false); } - } -unsafe extern "C" fn sephiroth_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 6.0); // F12 startup + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 6.0); // F12 startup frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_AIR_F_WORK_FLAG_PIERCE_GROUND); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 15.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 86, 0, 39, 3.0, 18.0, 0.0, 0.4, Some(23.0), Some(0.0), Some(0.8), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.0, 361, 86, 0, 39, 3.0, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 13.0, 15.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 86, 0, 39, 3.0, 18.0, 0.0, 0.4, Some(23.0), Some(0.0), Some(0.8), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.0, 361, 86, 0, 39, 3.0, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_AIR_F_WORK_FLAG_PIERCE_GROUND); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 8.0, 361, 81, 0, 39, 2.5, 18.0, 0.0, 0.4, Some(23.5), Some(0.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 7.0, 361, 81, 0, 39, 2.5, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 5.0, 361, 81, 0, 39, 2.5, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 8.0, 361, 81, 0, 39, 2.5, 18.0, 0.0, 0.4, Some(23.5), Some(0.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 7.0, 361, 81, 0, 39, 2.5, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 5.0, 361, 81, 0, 39, 2.5, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.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 sephiroth_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.4); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -26, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -26, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - //EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + //EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_sword_flash2"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_speedline"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_sword_flash2"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_speedline"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } } -unsafe extern "C" fn sephiroth_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 5.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 15.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 15.5, 1.0); frame(lua_state, 15.5); - FT_MOTION_RATE_RANGE(fighter, 15.5, 17.3, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clavicler"), 8.0, 45, 102, 0, 45, 2.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 45, 102, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, -1.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 17.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("swordl1"), 11.5, 42, 104, 0, 39, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 15.5, 17.3, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clavicler"), 8.0, 45, 102, 0, 45, 2.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 45, 102, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, -1.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 17.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("swordl1"), 11.5, 42, 104, 0, 39, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.3); - FT_MOTION_RATE_RANGE(fighter, 17.3, 18.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 17.3, 18.0, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sephiroth_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword3"), Hash40::new("tex_edge_sword4"), 5, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword3"), Hash40::new("tex_edge_sword4"), 5, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), -2, 12.0, 0.6, 0, -150, 15, 1.17, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), -2, 12.0, 0.6, 0, -150, 15, 1.17, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_slash_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_slash_arc"), -1); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); - AFTER_IMAGE_OFF(fighter, 5); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); + AFTER_IMAGE_OFF(agent, 5); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_slash_arc"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_slash_arc"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn sephiroth_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 64, 96, 0, 55, 2.5, -1.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 5.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 8.5, 106, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 64, 96, 0, 55, 2.5, -1.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 5.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 8.5, 106, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 4.0, 5.75, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 4.0, 5.75, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 8.5, 74, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 8.5, 74, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sephiroth_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 16, 19, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 16, 19, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), 0, 10, -2.7, 2.5, 120, 90, 1.05, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), 0, 10, -2.7, 2.5, 120, 90, 1.05, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_slash_light"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_slash_light"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn sephiroth_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 8.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -4.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -4.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - //ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 4.0, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 4.0, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Ground only - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 15.0, 270, 90, 0, 58, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 15.0, 270, 90, 0, 58, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air only - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 15.0, 270, 38, 0, 35, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 15.0, 270, 38, 0, 35, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter,1, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent,1, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Ground only - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air only - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sephiroth_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("swordl2"), 13, 0, -3.5, 0, 0, 0, 0.8, 1, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("swordl2"), 13, 0, -3.5, 0, 0, 0, 0.8, 1, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_gokumon_wind"), Hash40::new("top"), -2.2, 30, 1.7, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_gokumon_wind"), Hash40::new("top"), -2.2, 30, 1.7, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_gokumon_speedline"), Hash40::new("top"), 0, 0, 0, 0, 46, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_gokumon_speedline"), Hash40::new("top"), 0, 0, 0, 0, 46, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_sword_flash2"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_sword_flash2"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attackairn", sephiroth_attack_air_n_game) - .acmd("effect_attackairn", sephiroth_attack_air_n_effect) - .acmd("game_attackairf", sephiroth_attack_air_f_game) - .acmd("effect_attackairf", sephiroth_attack_air_f_effect) - .acmd("game_attackairb", sephiroth_attack_air_b_game) - .acmd("effect_attackairb", sephiroth_attack_air_b_effect) - .acmd("game_attackairhi", sephiroth_attack_air_hi_game) - .acmd("effect_attackairhi", sephiroth_attack_air_hi_effect) - .acmd("game_attackairlw", sephiroth_attack_air_lw_game) - .acmd("effect_attackairlw", sephiroth_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/edge/src/acmd/ground.rs b/fighters/edge/src/acmd/ground.rs index 09e757a91c..861b8ce13e 100644 --- a/fighters/edge/src/acmd/ground.rs +++ b/fighters/edge/src/acmd/ground.rs @@ -1,183 +1,178 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 3, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sephiroth_attack_11_expression(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_attack11(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); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 4); } frame(lua_state, 4.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 35.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 13); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 13); } } -unsafe extern "C" fn sephiroth_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 3, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sephiroth_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(6.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(6.5-1.0)); } frame(lua_state, 6.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(7.0-6.5)); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.5, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 75, 50, 0, 70, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 7.0, 361, 80, 0, 55, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(7.0-6.5)); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.5, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + //ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 75, 50, 0, 70, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 7.0, 361, 80, 0, 55, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Blade sourspot - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 1.0); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(36.0-16.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(36.0-16.0)); } frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sephiroth_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 6.5); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); if PostureModule::lr(boma) > 1.0{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -11, 2, -12, 0, 0.45, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -11, 2, -12, 0, 0.45, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -12, 2, -12, 0, 0.55, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -12, 2, -12, 0, 0.55, true); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 8, -2, 1.2, -12, 0, 0.7, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -0.5, 9, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_line"), Hash40::new("top"), 6.2, 10.5, -20.8, 2, -12, 0, 1.03, true); - LAST_EFFECT_SET_ALPHA(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 8, -2, 1.2, -12, 0, 0.7, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -0.5, 9, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_line"), Hash40::new("top"), 6.2, 10.5, -20.8, 2, -12, 0, 1.03, true); + LAST_EFFECT_SET_ALPHA(agent, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } - } -unsafe extern "C" fn sephiroth_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 70, 0, 67, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 70, 0, 67, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 53, 82, 0, 67, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 70, 0, 67, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 70, 0, 67, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 53, 82, 0, 67, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attack11", sephiroth_attack_11_game) - .acmd("expression_attack11", sephiroth_attack_11_expression) - .acmd("game_attack12", sephiroth_attack_12_game) - .acmd("game_attack13", sephiroth_attack_13_game) - .acmd("effect_attack13", sephiroth_attack_13_effect) - .acmd("game_attackdash", sephiroth_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/edge/src/acmd/mod.rs b/fighters/edge/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/edge/src/acmd/mod.rs +++ b/fighters/edge/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index c56a630a82..c0c093ab78 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -1,326 +1,124 @@ - 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_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_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(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_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_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_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - PLAY_SE(fighter, Hash40::new("se_edge_winged_landing02")); + PLAY_SE(agent, Hash40::new("se_edge_winged_landing02")); } - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn edge_fire_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn edge_fire_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn edge_fire_burst_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - AttackModule::disable_tip(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn edge_flare1_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); - } - } -unsafe extern "C" fn edge_flare2_exp_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - if !WorkModule::is_flag(boma, *WEAPON_EDGE_FLARE2_INSTANCE_WORK_ID_FLAG_REFLECT) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } - } -} - -unsafe extern "C" fn edge_flare2_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 15, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn edge_flare2_try_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn edge_flash_game_attack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let edge = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(edge, vars::edge::status::FLASH_HOLD) { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let facing = PostureModule::lr(boma); - PostureModule::set_pos(boma, &Vector3f::new(pos_x + (35.0 * PostureModule::lr(boma)), pos_y, 0.0)); - } - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 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_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -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("edge") - .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("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) - .install(); - smashline::Agent::new("edge_fire") - .acmd("game_specialn1", edge_fire_special_n1_game) - .acmd("game_specialn2", edge_fire_special_n2_game) - .acmd("game_bursts", edge_fire_burst_s_game) - .install(); - smashline::Agent::new("edge_flare1") - .acmd("game_fly", edge_flare1_fly_game) - .install(); - smashline::Agent::new("edge_flare2") - .acmd("game_exp", edge_flare2_exp_game) - .acmd("game_fly", edge_flare2_fly_game) - .acmd("game_try", edge_flare2_try_game) - .install(); - smashline::Agent::new("edge_flash") - .acmd("game_attack", edge_flash_game_attack) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/edge/src/acmd/smashes.rs b/fighters/edge/src/acmd/smashes.rs index f847dd5788..cda73f3273 100644 --- a/fighters/edge/src/acmd/smashes.rs +++ b/fighters/edge/src/acmd/smashes.rs @@ -1,373 +1,367 @@ - use super::*; -unsafe extern "C" fn sephiroth_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 3.0); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(25.5-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(25.5-25.0)); } frame(lua_state, 25.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(26.0-25.5)); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 8.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 15.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.5, 361, 85, 0, 57, 3.0, 1.0, -1.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 15.0, 361, 88, 0, 57, 3.0, 22.0, -1.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(26.0-25.5)); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 8.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 15.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.5, 361, 85, 0, 57, 3.0, 1.0, -1.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 15.0, 361, 88, 0, 57, 3.0, 22.0, -1.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } - } -unsafe extern "C" fn sephiroth_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.2, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.2, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 24.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 10, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 10, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword"), Hash40::new("top"), -1, 13.2, 1.5, 0, -50, 24, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), -1, 13.2,1.5, 0, 40, 24, 1.05, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword"), Hash40::new("top"), -1, 13.2, 1.5, 0, -50, 24, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), -1, 13.2,1.5, 0, 40, 24, 1.05, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } -unsafe extern "C" fn sephiroth_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 3.5, 21.0, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 4.5, 5.2, 0.0, 3.0, Some(4.5), Some(-2.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 6.5, 13.8, 0.0, 3.5, Some(12.5), Some(-2.5), Some(11.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 4.5, 22.0, 0.0, 3.0, Some(19.0), Some(-3.0), Some(13.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 3.5, 21.0, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 4.5, 5.2, 0.0, 3.0, Some(4.5), Some(-2.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 4, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 6.5, 13.8, 0.0, 3.5, Some(12.5), Some(-2.5), Some(11.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 5, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 4.5, 22.0, 0.0, 3.0, Some(19.0), Some(-3.0), Some(13.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 97, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 97, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 97, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 97, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 83, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 83, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 83, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 83, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } // frame(lua_state, 30.0); - // if is_excute(fighter) { - // ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 97, 79, 0, 67, 6.5, 0.0, 34.0, 5.0, Some(0.0), Some(34.0), Some(-5.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 97, 81, 0, 67, 4.5, 0.0, 40.5, 8.5, Some(0.0), Some(40.5), Some(-8.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // if is_excute(agent) { + // ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 97, 79, 0, 67, 6.5, 0.0, 34.0, 5.0, Some(0.0), Some(34.0), Some(-5.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 97, 81, 0, 67, 4.5, 0.0, 40.5, 8.5, Some(0.0), Some(40.5), Some(-8.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // } // frame(lua_state, 31.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear(boma, 3, false); // AttackModule::clear(boma, 4, false); // } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sephiroth_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 23, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 23, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 120, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 120, 90, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 85, 90, 0.92, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 85, 90, 0.92, true); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 33.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 53.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } frame(lua_state, 54.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4.5, 0, 2, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4.5, 0, 2, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } - } -unsafe extern "C" fn sephiroth_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 3.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterSpecializer_Edge::attack_lw4_ray_check(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.5, 63, 68, 0, 85, 4.6, 0.0, 2.5, 23.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 63, 68, 0, 85, 8.8, 0.0, 6.5, 23.5, Some(0.0), Some(8.5), Some(23.5), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.5, 48, 68, 0, 80, 1.5, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.5, 48, 68, 0, 80, 1.5, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 13.0, 48, 68, 0, 80, 1.5, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.5, 63, 68, 0, 85, 4.6, 0.0, 2.5, 23.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 63, 68, 0, 85, 8.8, 0.0, 6.5, 23.5, Some(0.0), Some(8.5), Some(23.5), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.5, 48, 68, 0, 80, 1.5, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.5, 48, 68, 0, 80, 1.5, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 13.0, 48, 68, 0, 80, 1.5, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.5, 48, 63, 0, 75, 1.7, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 11.5, 48, 63, 0, 75, 1.7, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 315, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 13.0, 48, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.5, 48, 63, 0, 75, 1.7, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 11.5, 48, 63, 0, 75, 1.7, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 315, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 13.0, 48, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 23.0); if !WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 24.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn sephiroth_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_smashlw_speedline"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_smashlw_swordflare"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_smashlw_speedline"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_smashlw_swordflare"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 20.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flash2"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flash2"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash2"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 23.5, 0, 0, 0, 180, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT(fighter, Hash40::new("edge_smashlw_impact"), Hash40::new("top"), 0, 0, 23.5, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 24.5, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 23.5, 0, 0, 0, 180, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT(agent, Hash40::new("edge_smashlw_impact"), Hash40::new("top"), 0, 0, 23.5, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 24.5, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_smashlw_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_smashlw_speedline"), -1); } frame(lua_state, 42.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), false, true); } frame(lua_state, 49.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("edge_smashlw_smoke"), Hash40::new("top"), 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("edge_smashlw_smoke"), Hash40::new("top"), 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - } - else{ + } else { frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_smashlw_speedline"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_smashlw_swordflare"), false, true); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_smashlw_speedline"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("edge_smashlw_swordflare"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), false, true); } } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attacks4", sephiroth_attack_s4_s_game) - .acmd("effect_attacks4", sephiroth_attack_s4_s_effect) - .acmd("game_attackhi4", sephiroth_attack_hi4_game) - .acmd("effect_attackhi4", sephiroth_attack_hi4_effect) - .acmd("game_attacklw4", sephiroth_attack_lw4_game) - .acmd("effect_attacklw4", sephiroth_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("effect_attacks4", game_attackhi4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/edge/src/acmd/specials.rs b/fighters/edge/src/acmd/specials.rs index 82613f7f83..67911918fc 100644 --- a/fighters/edge/src/acmd/specials.rs +++ b/fighters/edge/src/acmd/specials.rs @@ -1,167 +1,164 @@ use super::*; -unsafe extern "C" fn edge_special_n_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 79.0, 51.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 79.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 99.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 100.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 105.0); - FT_MOTION_RATE(fighter, 1.6); + FT_MOTION_RATE(agent, 1.6); frame(lua_state, 115.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 120.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); } frame(lua_state, 140.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } } -unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE) { - VarModule::off_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE) { + VarModule::off_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE); ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } - } -unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE) { - VarModule::off_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE) { + VarModule::off_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE); ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 0.4); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.4); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(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) { VarModule::off_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_button_on(Buttons::Special) && boma.is_situation(*SITUATION_KIND_GROUND) { VarModule::on_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DECIDED_RUSH); } frame(lua_state, 21.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH) { - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } else if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } - } -unsafe extern "C" fn effect_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_charge"), Hash40::new("swordl1"), 0, 0, 0, 0, 180, -90, 0.9, true); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_charge"), Hash40::new("swordl1"), 0, 0, 0, 0, 180, -90, 0.9, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn game_specialairhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(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) { VarModule::off_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DECIDED_RUSH); } } -unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } FighterSpecializer_Edge::set_special_hi_jostle_area(boma); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 0.0 }, 4, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 0.0 }, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); @@ -170,16 +167,16 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera_ex(boma, 3, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 4.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 5.0 }, 4, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("rot"), &Vector2f{ x: 10.0, y: 0.0 }, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); @@ -188,7 +185,7 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera_ex(boma, 3, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); @@ -197,136 +194,136 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { FighterSpecializer_Edge::clear_special_hi_jostle_area(boma); } -unsafe extern "C" fn edge_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_charge"), false, false); +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_charge"), false, false); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - EFFECT(fighter, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - EFFECT(fighter, Hash40::new("edge_octaslash_illution_01"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_speed_line"), Hash40::new("rot"), 0, -1, 0, 0, 0, 0, 2, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_01"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_speed_line"), Hash40::new("rot"), 0, -1, 0, 0, 0, 0, 2, true); EffectModule::enable_sync_init_pos_last(boma); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 4, 2, 0, -3.5, 196, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 4, 2, 0, -3.5, 196, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 3, 2, -4, -19, 13, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 3, 2, -4, -19, 13, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 6, 2, -15, -18, -144.7, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 6, 2, -15, -18, -144.7, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.6, 2, 29, -55, -13, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.6, 2, 29, -55, -13, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.5, 2, -2.5, -20, -163, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.5, 2, -2.5, -20, -163, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 5.3, 10, -12, -38, 35, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 5.3, 10, -12, -38, 35, 0.3, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 7.5, 7, -2.7, -24.5, -141, 0.25, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 7.5, 7, -2.7, -24.5, -141, 0.25, 0, 0, 0, 0, 0, 0, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc"), Hash40::new("rot"), -3.2, 3.8, -3, -5.7, -0.5, 23, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc"), Hash40::new("rot"), -3.2, 3.8, -3, -5.7, -0.5, 23, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_sword_flare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_sword_flare"), false, true); } } -unsafe extern "C" fn game_specialhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { JostleModule::set_status(boma, false); if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 9.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 9.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn effect_specialhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_charge"), false, false); +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_charge"), false, false); if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); } let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); @@ -342,51 +339,51 @@ unsafe extern "C" fn effect_specialhi1(fighter: &mut L2CAgentBase) { _ => Hash40::new("edge_octaslash_illution_01") }; if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - EFFECT(fighter, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - EFFECT(fighter, eff_hash, Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT(agent, eff_hash, Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_line"), Hash40::new("rot"), 0, 0, 7, 0, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_line"), Hash40::new("rot"), 0, 0, 7, 0, 0, 0, 0.85, true); EffectModule::enable_sync_init_pos_last(boma); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_sword_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_sword_flare"), false, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } } -unsafe extern "C" fn edge_special_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.08); // if VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { // MotionModule::set_rate(boma, 2.0); @@ -397,171 +394,169 @@ unsafe extern "C" fn edge_special_hi1_end_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairhi1end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn edge_special_hi2_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, 361, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, 361, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.256); } } -unsafe extern "C" fn edge_special_air_hi_2_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut kb_angle = 0; - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("charged_special_hi"); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_float(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE) <= 0.0 { kb_angle = (WorkModule::get_float(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE) * -1.0) as u64; } else { kb_angle = 361 as u64; } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, kb_angle, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, kb_angle, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.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); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn edge_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 27.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 27.0, 13.0); + if is_excute(agent) { if app::sv_math::rand(hash40("fighter"), 2) == 1 { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_VOICE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 11.0, 3.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn edge_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_senkou_start"), Hash40::new("waist"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_senkou_start"), Hash40::new("waist"), 2, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.75); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.75); } frame(lua_state, 8.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn edge_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - VarModule::on_flag(fighter.object(), vars::edge::status::FLASH_HOLD); + VarModule::on_flag(agent.object(), vars::edge::status::FLASH_HOLD); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FLASH, false, -1); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_ENABLE_CONTROL_X); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_ENABLE_FALL_SPEED); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.15); + FT_MOTION_RATE(agent, 1.15); frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn edge_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_senkou_shield"), true, true); - let offset = if VarModule::is_flag(fighter.object(), vars::edge::status::FLASH_HOLD) { 35 } else { 0 }; - EFFECT(fighter, Hash40::new("edge_senkou_shield_break"), Hash40::new("top"), 0, 13, 12 + offset, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_senkou_shield"), true, true); + let offset = if VarModule::is_flag(agent.object(), vars::edge::status::FLASH_HOLD) { 35 } else { 0 }; + EFFECT(agent, Hash40::new("edge_senkou_shield_break"), Hash40::new("top"), 0, 13, 12 + offset, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_specialnstart", edge_special_n_start) - .acmd("game_specialairnstart", edge_special_n_start) - .acmd("game_specialn1", edge_special_n1_game) - .acmd("game_specialairn1", edge_special_n1_game) - .acmd("game_specialn2", edge_special_n2_game) - .acmd("game_specialairn2", edge_special_n2_game) - //.acmd("game_specialhistart", game_specialhistart) - //.acmd("effect_specialhistart", effect_specialhistart) - //.acmd("game_specialairhistart", game_specialairhistart) - .acmd("game_specialhi2", edge_special_hi2_game) - .acmd("effect_specialhi2", edge_special_hi2_effect) - //.acmd("game_specialhi1", game_specialhi1) - //.acmd("effect_specialhi1", effect_specialhi1) - .acmd("game_specialhi1end", edge_special_hi1_end_game) - .acmd("game_specialairhi1end", game_specialairhi1end) - .acmd("game_specialhi2end", edge_special_hi2_end_game) - .acmd("game_specialairhi2end", edge_special_air_hi_2_end_game) - .acmd("game_speciallw", edge_special_lw_game) - .acmd("game_specialairlw", edge_special_lw_game) - .acmd("effect_speciallw", edge_special_lw_effect) - .acmd("effect_specialairlw", edge_special_lw_effect) - .acmd("game_speciallwhit", edge_special_lw_hit_game) - .acmd("game_specialairlwhit", edge_special_lw_hit_game) - .acmd("effect_speciallwhit", edge_special_lw_hit_effect) - .acmd("effect_specialairlwhit", edge_special_lw_hit_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + + // agent.acmd("game_specialhistart", game_specialhistart); + // agent.acmd("effect_specialhistart", effect_specialhistart); + // agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + // agent.acmd("game_specialhi1", game_specialhi1); + // agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("game_specialhi1end", game_specialhi1end); + agent.acmd("game_specialairhi1end", game_specialairhi1end); + agent.acmd("game_specialhi2end", game_specialhi2end); + agent.acmd("game_specialairhi2end", game_specialairhi2end); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/throws.rs b/fighters/edge/src/acmd/throws.rs index 53ee95b7f7..7f5321c8f1 100644 --- a/fighters/edge/src/acmd/throws.rs +++ b/fighters/edge/src/acmd/throws.rs @@ -1,27 +1,26 @@ use super::*; -unsafe extern "C" fn edge_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.5, 4.7, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.5, 4.7, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 edge_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn edge_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -61,207 +60,205 @@ unsafe extern "C" fn edge_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.5, 58, 105, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.5, 58, 105, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_THROW_FLAG_REVERSE_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 80, 0, 60, 7.5, 0.0, 11.0, -13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 80, 0, 60, 7.5, 0.0, 11.0, -13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -15.0, 8); + CHECK_FINISH_CAMERA(agent, -15.0, 8); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn edge_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 12.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 98, 138, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 12.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 98, 138, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 40.0, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 90, 0, 60, 7.0, 0.0, 20.0, 0.0, Some(0.0), Some(40.0), Some(0.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 18.0, 40.0, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 90, 0, 60, 7.0, 0.0, 20.0, 0.0, Some(0.0), Some(40.0), Some(0.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 14); + CHECK_FINISH_CAMERA(agent, 15, 14); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn edge_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light2"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light2"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -15.0, 0, 1.5, 90, 0, 180, 0.9, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 12.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -15.0, 0, 1.5, 90, 0, 180, 0.9, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 12.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_speedline"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_speedline"), false, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); } } -unsafe extern "C" fn edge_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h01")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_edge_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h02")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_edge_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h02")); } frame(lua_state, 33.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h03")); } } -unsafe extern "C" fn edge_throw_hi_expression(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_throwhi(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); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_78_slash"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_78_slash"), 12); } } -unsafe extern "C" fn edge_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 67, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 67, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 40.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 40.0, 12.0); frame(lua_state, 32.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11.0, 0.0); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn edge_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_catch_handaura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_catch_handaura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - EFFECT(fighter, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } else{ - EFFECT(fighter, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 40.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 44.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_catch_handaura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_catch_handaura"), false, true); } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_catch", edge_catch_game) - .acmd("game_catchdash", edge_catch_dash_game) - .acmd("game_catchturn", edge_catch_turn_game) - .acmd("game_throwb", edge_throw_b_game) - .acmd("game_throwhi", edge_throw_hi_game) - .acmd("effect_throwhi", edge_throw_hi_effect) - .acmd("sound_throwhi", edge_throw_hi_sound) - .acmd("expression_throwhi", edge_throw_hi_expression) - .acmd("game_throwlw", edge_throw_lw_game) - .acmd("effect_throwlw", edge_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/tilts.rs b/fighters/edge/src/acmd/tilts.rs index 5cd65dca9f..c366c67a1f 100644 --- a/fighters/edge/src/acmd/tilts.rs +++ b/fighters/edge/src/acmd/tilts.rs @@ -1,443 +1,434 @@ use super::*; -unsafe extern "C" fn edge_attack_s3_hi_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, 0.6); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); - } - frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn edge_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } -unsafe extern "C" fn edge_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); } frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn edge_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); + } +} + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); + } + frame(lua_state, 13.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 14.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - } -unsafe extern "C" fn edge_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); } frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn edge_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.4, 9.75, 3.8, 19, 33, 13.8, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.4, 9.75, 3.8, 19, 33, 13.8, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } -unsafe extern "C" fn edge_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.5, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.5, 10.0); frame(lua_state, 12.5); - FT_MOTION_RATE_RANGE(fighter, 12.5, 13.0, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 88, 75, 0, 69, 4.5, 0.0, 8.5, 5.0, Some(0.0), Some(8.5), Some(10.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 12.5, 13.0, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 88, 75, 0, 69, 4.5, 0.0, 8.5, 5.0, Some(0.0), Some(8.5), Some(10.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 20.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 88, 75, 0, 69, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 10.5, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 14.0, 20.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 88, 75, 0, 69, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 10.5, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn edge_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 10, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.0, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 10, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.0, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } } -unsafe extern "C" fn edge_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackair_h01")); - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackair_h01")); + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 12.5); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_edge_rnd_attack_hard")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_edge_rnd_attack_hard")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackair_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackair_h02")); } } -unsafe extern "C" fn edge_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 12.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_78_slash"), 28, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn edge_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 70, 75, 0, 81, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.0, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 70, 75, 0, 81, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.0, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn edge_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, -3, 0, 0, 0, 0.45, 0, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, -3, 0, 0, 0, 0.45, 0, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.5, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.5, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.3, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.3, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -2, 0, 0, 0, 0.35, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -2, 0, 0, 0, 0.35, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } - } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attacks3hi", edge_attack_s3_hi_game) - .acmd("effect_attacks3hi", edge_attack_s3_hi_effect) - .acmd("game_attacks3", edge_attack_s3_s_game) - .acmd("effect_attacks3", edge_attack_s3_s_effect) - .acmd("game_attacks3lw", edge_attack_s3_lw_game) - .acmd("effect_attacks3lw", edge_attack_s3_lw_effect) - .acmd("game_attackhi3", edge_attack_hi3_game) - .acmd("effect_attackhi3", edge_attack_hi3_effect) - .acmd("sound_attackhi3", edge_attack_hi3_sound) - .acmd("expression_attackhi3", edge_attack_hi3_expression) - .acmd("game_attacklw3", edge_attack_lw3_game) - .acmd("effect_attacklw3", edge_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } \ No newline at end of file diff --git a/fighters/edge/src/fire/acmd.rs b/fighters/edge/src/fire/acmd.rs new file mode 100644 index 0000000000..bf91f3bc97 --- /dev/null +++ b/fighters/edge/src/fire/acmd.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn game_bursts(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AttackModule::disable_tip(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 6.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", stub); + agent.acmd("game_specialn2", stub); + + agent.acmd("game_bursts", game_bursts); +} \ No newline at end of file diff --git a/fighters/edge/src/fire/mod.rs b/fighters/edge/src/fire/mod.rs new file mode 100644 index 0000000000..97c5fa6456 --- /dev/null +++ b/fighters/edge/src/fire/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("edge_fire"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/status/edge_fire_fly.rs b/fighters/edge/src/fire/status.rs similarity index 96% rename from fighters/edge/src/status/edge_fire_fly.rs rename to fighters/edge/src/fire/status.rs index abfe6cf7b1..38e798d381 100644 --- a/fighters/edge/src/status/edge_fire_fly.rs +++ b/fighters/edge/src/fire/status.rs @@ -89,9 +89,7 @@ unsafe extern "C" fn sub_fly(fighter: &mut L2CWeaponCommon, status: L2CValue) -> return 1.into() } -pub fn install() { - smashline::Agent::new("edge_fire") - .status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, fly_s_main) - .status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, fly_m_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, fly_s_main); + agent.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, fly_m_main); } \ No newline at end of file diff --git a/fighters/edge/src/flare1/acmd.rs b/fighters/edge/src/flare1/acmd.rs new file mode 100644 index 0000000000..f9e53ecfdd --- /dev/null +++ b/fighters/edge/src/flare1/acmd.rs @@ -0,0 +1,21 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/edge/src/flare1/mod.rs b/fighters/edge/src/flare1/mod.rs new file mode 100644 index 0000000000..219c3c32e6 --- /dev/null +++ b/fighters/edge/src/flare1/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flare1"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flare2/acmd.rs b/fighters/edge/src/flare2/acmd.rs new file mode 100644 index 0000000000..9274f73fc5 --- /dev/null +++ b/fighters/edge/src/flare2/acmd.rs @@ -0,0 +1,40 @@ +use super::*; + +unsafe extern "C" fn game_exp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 1.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *WEAPON_EDGE_FLARE2_INSTANCE_WORK_ID_FLAG_REFLECT) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } + } +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 15, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_try(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_exp", game_exp); + agent.acmd("game_fly", game_fly); + agent.acmd("game_try", game_try); +} diff --git a/fighters/edge/src/flare2/mod.rs b/fighters/edge/src/flare2/mod.rs new file mode 100644 index 0000000000..0573cdb060 --- /dev/null +++ b/fighters/edge/src/flare2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flare2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flaredummy/mod.rs b/fighters/edge/src/flaredummy/mod.rs new file mode 100644 index 0000000000..cb155c70fd --- /dev/null +++ b/fighters/edge/src/flaredummy/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod opff; + +pub fn install() { + let agent = &mut Agent::new("edge_flaredummy"); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flaredummy/opff.rs b/fighters/edge/src/flaredummy/opff.rs new file mode 100644 index 0000000000..4a5137f983 --- /dev/null +++ b/fighters/edge/src/flaredummy/opff.rs @@ -0,0 +1,28 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn shadowflare_orb_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status(*WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_FLY) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let sephiroth = utils::util::get_battle_object_from_id(owner_id); + let sephiroth_boma = &mut *(*sephiroth).module_accessor; + let sephiroth_status_kind = StatusModule::status_kind(sephiroth_boma); + if sephiroth_status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH && AttackModule::is_infliction_status(sephiroth_boma, *COLLISION_KIND_MASK_HIT) { + // Explode if Sephiroth hits the target marked with this set of orbs with Blade Dash + let x_distance = PostureModule::pos_x(weapon.module_accessor) - PostureModule::pos_x(sephiroth_boma); + let y_distance = PostureModule::pos_y(weapon.module_accessor) - PostureModule::pos_y(sephiroth_boma); + let tolerance = 20.0; + if x_distance.abs() <= tolerance && y_distance.abs() <= tolerance{ + StatusModule::change_status_force(weapon.module_accessor, *WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_TRY, false); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shadowflare_orb_callback); +} \ No newline at end of file diff --git a/fighters/edge/src/flash/acmd.rs b/fighters/edge/src/flash/acmd.rs new file mode 100644 index 0000000000..d56eac00d4 --- /dev/null +++ b/fighters/edge/src/flash/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let edge = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(edge, vars::edge::status::FLASH_HOLD) { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let facing = PostureModule::lr(boma); + PostureModule::set_pos(boma, &Vector3f::new(pos_x + (35.0 * PostureModule::lr(boma)), pos_y, 0.0)); + } + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 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_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 16.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack", game_attack); +} diff --git a/fighters/edge/src/flash/mod.rs b/fighters/edge/src/flash/mod.rs new file mode 100644 index 0000000000..07ec161372 --- /dev/null +++ b/fighters/edge/src/flash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/lib.rs b/fighters/edge/src/lib.rs index c033917585..9024786d6c 100644 --- a/fighters/edge/src/lib.rs +++ b/fighters/edge/src/lib.rs @@ -4,8 +4,16 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod fire; +mod flare1; +mod flare2; +mod flaredummy; +mod flash; use smash::{ lib::{ @@ -37,9 +45,19 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("edge"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + fire::install(); + flare1::install(); + flare2::install(); + flaredummy::install(); + flash::install(); + } \ No newline at end of file diff --git a/fighters/edge/src/opff.rs b/fighters/edge/src/opff.rs index 1ff9b4df49..f6e8609078 100644 --- a/fighters/edge/src/opff.rs +++ b/fighters/edge/src/opff.rs @@ -104,34 +104,6 @@ pub unsafe fn edge_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn shadowflare_orb_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_EDGE_FLAREDUMMY { - return - } - if weapon.is_status(*WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_FLY) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let sephiroth = utils::util::get_battle_object_from_id(owner_id); - let sephiroth_boma = &mut *(*sephiroth).module_accessor; - let sephiroth_status_kind = StatusModule::status_kind(sephiroth_boma); - if sephiroth_status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH && AttackModule::is_infliction_status(sephiroth_boma, *COLLISION_KIND_MASK_HIT) { - // Explode if Sephiroth hits the target marked with this set of orbs with Blade Dash - let x_distance = PostureModule::pos_x(weapon.module_accessor) - PostureModule::pos_x(sephiroth_boma); - let y_distance = PostureModule::pos_y(weapon.module_accessor) - PostureModule::pos_y(sephiroth_boma); - let tolerance = 20.0; - if x_distance.abs() <= tolerance && y_distance.abs() <= tolerance{ - StatusModule::change_status_force(weapon.module_accessor, *WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_TRY, false); - } - } - } - } -} - -pub fn install() { - smashline::Agent::new("edge") - .on_line(Main, edge_frame_wrapper) - .install(); - smashline::Agent::new("edge_flaredummy") - .on_line(Main, shadowflare_orb_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, edge_frame_wrapper); } \ No newline at end of file diff --git a/fighters/edge/src/status/mod.rs b/fighters/edge/src/status/mod.rs index b34c1e9582..8876be00dd 100644 --- a/fighters/edge/src/status/mod.rs +++ b/fighters/edge/src/status/mod.rs @@ -1,11 +1,11 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_hi; -mod edge_fire_fly; -pub fn install() { - special_n::install(); - special_hi::install(); - edge_fire_fly::install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/edge/src/status/special_hi.rs b/fighters/edge/src/status/special_hi.rs index 9a7a942f63..1b1b52e57d 100644 --- a/fighters/edge/src/status/special_hi.rs +++ b/fighters/edge/src/status/special_hi.rs @@ -1,17 +1,16 @@ use super::*; -use globals::*; -unsafe extern "C" fn edge_special_hi_param_int_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { - let param = edge_special_hi_param_helper_inner(hash, charged_rush).get_u64(); +unsafe extern "C" fn special_hi_param_int_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { + let param = special_hi_param_helper_inner(hash, charged_rush).get_u64(); WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), param).into() } -unsafe extern "C" fn edge_special_hi_param_float_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { - let param = edge_special_hi_param_helper_inner(hash, charged_rush).get_u64(); +unsafe extern "C" fn special_hi_param_float_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { + let param = special_hi_param_helper_inner(hash, charged_rush).get_u64(); WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), param).into() } -unsafe extern "C" fn edge_special_hi_param_helper_inner(hash: L2CValue, charged_rush: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_param_helper_inner(hash: L2CValue, charged_rush: L2CValue) -> L2CValue { let hash = hash.get_u64(); if !charged_rush.get_bool() { return hash.into(); @@ -75,7 +74,7 @@ unsafe extern "C" fn edge_special_hi_param_helper_inner(hash: L2CValue, charged_ // FIGHTER_STATUS_KIND_SPECIAL_HI -unsafe extern "C" fn edge_special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -107,12 +106,12 @@ unsafe extern "C" fn edge_special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn edge_special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); WorkModule::on_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DIRECTION_EFFECT_VISIBLE); WorkModule::set_int(fighter.module_accessor, *EFFECT_HANDLE_NULL, *FIGHTER_EDGE_STATUS_SPECIAL_HI_INT_DIRECTION_EFFECT_HANDLE); fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, true.into()); + special_hi_set_kinetics(fighter, true.into()); let mot = if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { Hash40::new("special_air_hi_start") } @@ -129,10 +128,10 @@ unsafe extern "C" fn edge_special_hi_main(fighter: &mut L2CFighterCommon) -> L2C false, false ); - fighter.sub_shift_status_main(L2CValue::Ptr(edge_special_hi_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe extern "C" fn edge_special_hi_set_kinetics(fighter: &mut L2CFighterCommon, param_1: L2CValue) { +unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, param_1: L2CValue) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { if param_1.get_bool() && fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { return; @@ -154,13 +153,13 @@ unsafe extern "C" fn edge_special_hi_set_kinetics(fighter: &mut L2CFighterCommon } } -unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) { fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, false.into()); + special_hi_set_kinetics(fighter, false.into()); fighter.sub_change_motion_by_situation(Hash40::new("special_hi_start").into(), Hash40::new("special_air_hi_start").into(), true.into()); } - edge_special_hi_set_accel(fighter); + special_hi_set_accel(fighter); let stick_x = fighter.global_table[STICK_X].get_f32(); let stick_y = fighter.global_table[STICK_Y].get_f32(); let mut stick = fighter.Vector2__create(stick_x.into(), stick_y.into()); @@ -169,9 +168,9 @@ unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) - stick["y"].assign(&L2CValue::F32(1.0)); } let normalize = fighter.Vector2__normalize(stick); - edge_special_hi_set_dir_handle(fighter, normalize["x"].clone(), normalize["y"].clone()); + special_hi_set_dir_handle(fighter, normalize["x"].clone(), normalize["y"].clone()); let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); - let param = edge_special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); + let param = special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); if param as f32 <= fighter.global_table[CURRENT_FRAME].get_f32() { WorkModule::set_float(fighter.module_accessor, normalize["x"].get_f32(), *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_X); WorkModule::set_float(fighter.module_accessor, normalize["y"].get_f32(), *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_Y); @@ -179,28 +178,28 @@ unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) - PostureModule::set_stick_lr(fighter.module_accessor, 0.0); PostureModule::update_rot_y_lr(fighter.module_accessor); } - let direction = edge_special_hi_ground_touch_down(fighter, normalize["x"].clone(), normalize["y"].clone()); + let direction = special_hi_ground_touch_down(fighter, normalize["x"].clone(), normalize["y"].clone()); let lr = PostureModule::lr(fighter.module_accessor); let angle = sv_math::vec2_angle(lr, 0.0, direction["x"].get_f32(), direction["y"].get_f32()); let degrees = angle.to_degrees(); let sign = fighter.sign((angle * -1.0).into()).get_f32(); WorkModule::set_float(fighter.module_accessor, degrees * sign, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_ROT_DEGREE); - fighter.shift(L2CValue::Ptr(edge_special_hi_main_loop_shift as *const () as _)); + fighter.shift(L2CValue::Ptr(special_hi_main_loop_shift as *const () as _)); } 0.into() } -unsafe extern "C" fn edge_special_hi_main_loop_shift(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main_loop_shift(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, false.into()); + special_hi_set_kinetics(fighter, false.into()); fighter.sub_change_motion_by_situation(Hash40::new("special_hi_start").into(), Hash40::new("special_air_hi_start").into(), true.into()); - edge_special_hi_set_accel(fighter); + special_hi_set_accel(fighter); let stick_x = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_X); let stick_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_Y); - edge_special_hi_set_dir_handle(fighter, stick_x.into(), stick_y.into()); + special_hi_set_dir_handle(fighter, stick_x.into(), stick_y.into()); let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); - let rot_decide_frame = edge_special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); - let rot_end_frame = edge_special_hi_param_int_helper(fighter, hash40("rot_end_frame").into(), charged_rush.into()).get_i32(); + let rot_decide_frame = special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); + let rot_end_frame = special_hi_param_int_helper(fighter, hash40("rot_end_frame").into(), charged_rush.into()).get_i32(); let frame = fighter.global_table[CURRENT_FRAME].get_f32(); let diff = rot_end_frame - rot_decide_frame; let ratio: f32 = (frame - rot_decide_frame as f32) / diff as f32; @@ -242,7 +241,7 @@ unsafe extern "C" fn edge_special_hi_main_loop_shift(fighter: &mut L2CFighterCom 0.into() } -unsafe extern "C" fn edge_special_hi_set_accel(fighter: &mut L2CFighterCommon) { +unsafe extern "C" fn special_hi_set_accel(fighter: &mut L2CFighterCommon) { let start_stop_y_frame_air = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("start_stop_y_frame_air")); if start_stop_y_frame_air as f32 <= fighter.global_table[CURRENT_FRAME].get_f32() + 1.0 { let start_gravity = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("start_gravity")); @@ -255,7 +254,7 @@ unsafe extern "C" fn edge_special_hi_set_accel(fighter: &mut L2CFighterCommon) { } } -unsafe extern "C" fn edge_special_hi_set_dir_handle(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) { +unsafe extern "C" fn special_hi_set_dir_handle(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) { let vec2 = fighter.Vector2__create(stick_x, stick_y); let normalize = fighter.Vector2__normalize(vec2.clone()); let angle = sv_math::vec2_angle(0.0, 1.0, normalize["x"].get_f32(), normalize["y"].get_f32()); @@ -314,7 +313,7 @@ unsafe extern "C" fn edge_special_hi_set_dir_handle(fighter: &mut L2CFighterComm EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("edge_octaslash_direction"), visible); } -unsafe extern "C" fn edge_special_hi_ground_touch_down(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_ground_touch_down(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) -> L2CValue { let vec2 = fighter.Vector2__create(stick_x.clone(), stick_y.clone()); if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { let normal_x = GroundModule::get_touch_normal_x(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); @@ -337,7 +336,7 @@ unsafe extern "C" fn edge_special_hi_ground_touch_down(fighter: &mut L2CFighterC // FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH -pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH)(fighter); // Grounded Blade Rush shorten mechanic @@ -362,7 +361,7 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // // FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_END // #[status_script(agent = "edge", status = FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_END, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// unsafe fn edge_special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// unsafe fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { // let rush_degree = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE); // WorkModule::set_float(fighter.module_accessor, rush_degree, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_ROT_DEGREE); // let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); @@ -370,8 +369,8 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); // let speed = sv_kinetic_energy::get_speed(fighter.lua_state_agent); // let vec2 = fighter.Vector2__create(speed.x.into(), speed.y.into()); -// let rush_end_speed_mul = edge_special_hi_param_float_helper(fighter, hash40("rush_end_speed_mul").into(), charged_rush.into()).get_f32(); -// let rush_end_brake_x = edge_special_hi_param_float_helper(fighter, hash40("rush_end_brake_x").into(), charged_rush.into()).get_f32(); +// let rush_end_speed_mul = special_hi_param_float_helper(fighter, hash40("rush_end_speed_mul").into(), charged_rush.into()).get_f32(); +// let rush_end_brake_x = special_hi_param_float_helper(fighter, hash40("rush_end_brake_x").into(), charged_rush.into()).get_f32(); // let speed_x = vec2["x"].get_f32() * rush_end_speed_mul; // sv_kinetic_energy!( // set_speed, @@ -390,7 +389,7 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // fighter.clear_lua_stack(); // lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); // let speed_y = sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); -// let rush_end_gravity_accel = edge_special_hi_param_float_helper(fighter, hash40("rush_end_gravity_accel").into(), charged_rush.into()).get_f32(); +// let rush_end_gravity_accel = special_hi_param_float_helper(fighter, hash40("rush_end_gravity_accel").into(), charged_rush.into()).get_f32(); // let speed_y = speed_y * rush_end_speed_mul; // sv_kinetic_energy!( // set_speed, @@ -420,18 +419,18 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // false, // false // ); -// fighter.sub_shift_status_main(L2CValue::Ptr(edge_special_hi_end_main_loop as *const () as _)) +// fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) // } -// unsafe extern "C" fn edge_special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // if fighter.sub_transition_group_check_air_cliff().get_bool() { // return 1.into(); // } // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { // if !MotionModule::is_end(fighter.module_accessor) { // let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); -// let rotate_back_begin_frame = edge_special_hi_param_int_helper(fighter, hash40("rotate_back_begin_frame").into(), charged_rush.into()).get_i32(); -// let rotate_back_end_frame = edge_special_hi_param_int_helper(fighter, hash40("rotate_back_end_frame").into(), charged_rush.into()).get_i32(); +// let rotate_back_begin_frame = special_hi_param_int_helper(fighter, hash40("rotate_back_begin_frame").into(), charged_rush.into()).get_i32(); +// let rotate_back_end_frame = special_hi_param_int_helper(fighter, hash40("rotate_back_end_frame").into(), charged_rush.into()).get_i32(); // let frame = fighter.global_table[CURRENT_FRAME].get_f32(); // if rotate_back_begin_frame as f32 <= frame { // let mut diff = rotate_back_end_frame - rotate_back_begin_frame; @@ -446,8 +445,8 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // } // if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL) { // WorkModule::off_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); -// let control_accel_x_mul = edge_special_hi_param_float_helper(fighter, hash40("control_accel_x_mul").into(), charged_rush.into()).get_f32(); -// let control_speed_x_max_mul = edge_special_hi_param_float_helper(fighter, hash40("control_speed_x_max_mul").into(), charged_rush.into()).get_f32(); +// let control_accel_x_mul = special_hi_param_float_helper(fighter, hash40("control_accel_x_mul").into(), charged_rush.into()).get_f32(); +// let control_speed_x_max_mul = special_hi_param_float_helper(fighter, hash40("control_speed_x_max_mul").into(), charged_rush.into()).get_f32(); // sv_kinetic_energy!( // reset_energy, // fighter, @@ -490,11 +489,9 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // 0.into() // } -pub fn install() { - smashline::Agent::new("edge") - //.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_pre) - //.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_main) - .status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_rush_main) - //.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_end) - .install(); +pub fn install(agent: &mut Agent) { + //.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre) + //.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) + agent.status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, special_hi_rush_main); + //.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI_RUSH, special_hi_end) } \ No newline at end of file diff --git a/fighters/edge/src/status/special_n.rs b/fighters/edge/src/status/special_n.rs index a966ead199..bbcd2cb93a 100644 --- a/fighters/edge/src/status/special_n.rs +++ b/fighters/edge/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("special_n_start").into(), Hash40::new("special_air_n_start").into(), false.into()); @@ -101,8 +100,6 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par } } -pub fn install() { - smashline::Agent::new("edge") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/eflame/src/acmd/aerials.rs b/fighters/eflame/src/acmd/aerials.rs index 59e5b510b9..4097c85c0f 100644 --- a/fighters/eflame/src/acmd/aerials.rs +++ b/fighters/eflame/src/acmd/aerials.rs @@ -1,19 +1,18 @@ - use super::*; -unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -22,28 +21,28 @@ unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 58, 67, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 58, 67, 0, 75, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 73, 51, 0, 107, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 58, 67, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 58, 67, 0, 75, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 73, 51, 0, 107, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 73, 50, 0, 102, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 73, 50, 0, 102, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -52,26 +51,25 @@ unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 75.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 eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -80,23 +78,23 @@ unsafe extern "C" fn eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 50, 71, 0, 71, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.5, 2.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 3.0, 2.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 2.5, 2.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 50, 71, 0, 71, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.5, 2.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 3.0, 2.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 2.5, 2.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -105,31 +103,29 @@ unsafe extern "C" fn eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 69.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 eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -138,19 +134,19 @@ unsafe extern "C" fn eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 2.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 2.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -159,33 +155,32 @@ unsafe extern "C" fn eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 71.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 eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -194,26 +189,26 @@ unsafe extern "C" fn eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, -1.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, -2.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, -3.0, 16.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, -1.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, -2.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, -3.0, 16.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -221,32 +216,31 @@ unsafe extern "C" fn eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } frame(lua_state, 79.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 eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -255,35 +249,35 @@ unsafe extern "C" fn eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -292,19 +286,20 @@ unsafe extern "C" fn eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attackairn", eflame_attack_air_n_game) - .acmd("game_attackairf", eflame_attack_air_f_game) - .acmd("game_attackairb", eflame_attack_air_b_game) - .acmd("game_attackairhi", eflame_attack_air_hi_game) - .acmd("game_attackairlw", eflame_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/eflame/src/acmd/ground.rs b/fighters/eflame/src/acmd/ground.rs index 5f577af706..fcf002ab13 100644 --- a/fighters/eflame/src/acmd/ground.rs +++ b/fighters/eflame/src/acmd/ground.rs @@ -1,28 +1,28 @@ use super::*; -unsafe extern "C" fn eflame_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -31,27 +31,27 @@ unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -60,26 +60,26 @@ unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn eflame_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -88,19 +88,19 @@ unsafe extern "C" fn eflame_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.5, 361, 68, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.5, 361, 68, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.5, 361, 68, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.5, 361, 68, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -108,13 +108,11 @@ unsafe extern "C" fn eflame_attack_dash_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attack11", eflame_attack_11_game) - .acmd("game_attack12", eflame_attack_12_game) - .acmd("game_attackdash", eflame_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/eflame/src/acmd/mod.rs b/fighters/eflame/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/eflame/src/acmd/mod.rs +++ b/fighters/eflame/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/eflame/src/acmd/other.rs b/fighters/eflame/src/acmd/other.rs index 5e364ee5a8..7761d4387c 100644 --- a/fighters/eflame/src/acmd/other.rs +++ b/fighters/eflame/src/acmd/other.rs @@ -1,1602 +1,95 @@ - 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_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(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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_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_eflame_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_eflame_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, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_eflame_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_eflame_step_left_l")); } } -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 esword_game_flyflickl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.3); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.3); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.45); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.45); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_rotate(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 1, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 6, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 0, 25.0, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *WEAPON_EFLAME_ESWORD_STATUS_SPECIAL_S_FLAG_FINISH); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 0.5); - } -} +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); -pub fn install() { - smashline::Agent::new("eflame_esword") - .acmd("game_flyflickl", esword_game_flyflickl) - .acmd("game_flyflickr", esword_game_flyflickr) - .acmd("game_flyl", esword_game_flyl) - .acmd("game_flyr", esword_game_flyr) - .acmd("game_reflectedl", esword_game_reflectedl) - .acmd("game_reflectedr", esword_game_reflectedr) - .acmd("game_rotate", esword_game_rotate) - .install(); - smashline::Agent::new("eflame") - .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_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/eflame/src/acmd/smashes.rs b/fighters/eflame/src/acmd/smashes.rs index 2cb60a1e71..f9267c7877 100644 --- a/fighters/eflame/src/acmd/smashes.rs +++ b/fighters/eflame/src/acmd/smashes.rs @@ -1,11 +1,10 @@ - use super::*; -unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); @@ -15,20 +14,17 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { } WorkModule::set_int64(boma, hash40("attack_s4_hold") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); - + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 4.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 4.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -36,12 +32,12 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { AttackModule::set_optional_hit_effect(boma, 4, Hash40::new("eflame_attack_s4s_explosion")); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -49,12 +45,12 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { AttackModule::set_optional_hit_effect(boma, 4, Hash40::new("eflame_attack_s4s_explosion")); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 2.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 5.0, 0.0, 4.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 4.5, 0.0, 4.0, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 2.0, 25.0, Some(0.0), Some(6.0), Some(28.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 2.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 5.0, 0.0, 4.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 4.5, 0.0, 4.0, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 2.0, 25.0, Some(0.0), Some(6.0), Some(28.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -63,11 +59,11 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_ATTACK_FLAG_S4_GROUND_CHECK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -75,11 +71,8 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attacks4", eflame_attack_s4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); } diff --git a/fighters/eflame/src/acmd/specials.rs b/fighters/eflame/src/acmd/specials.rs index 85f31e75e6..27acb3251b 100644 --- a/fighters/eflame/src/acmd/specials.rs +++ b/fighters/eflame/src/acmd/specials.rs @@ -1,162 +1,120 @@ use super::*; -unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 85, 100, 64, 16, 2.5, 0.0, 18.0, 5.0, Some(0.0), Some(2.5), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 95, 100, 64, 16, 4.0, 0.0, 15.0, 11.0, Some(0.0), Some(4.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 64, 16, 4.0, 0.0, 14.0, 15.0, Some(0.0), Some(4.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 85, 100, 64, 16, 2.5, 0.0, 18.0, 5.0, Some(0.0), Some(2.5), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 95, 100, 64, 16, 4.0, 0.0, 15.0, 11.0, Some(0.0), Some(4.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 64, 16, 4.0, 0.0, 14.0, 15.0, Some(0.0), Some(4.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 100, 53, 20, 2.5, 0.0, 21.5, 5.0, Some(0.0), Some(15.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 15.0, Some(0.0), Some(14.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 100, 53, 20, 2.5, 0.0, 21.5, 5.0, Some(0.0), Some(15.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 15.0, Some(0.0), Some(14.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_START_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 100, 50, 20, 2.5, 0.0, 23.0, 5.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 11.0, Some(0.0), Some(20.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 15.0, Some(0.0), Some(20.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 100, 50, 20, 2.5, 0.0, 23.0, 5.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 11.0, Some(0.0), Some(20.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 15.0, Some(0.0), Some(20.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 27.0); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int64(boma, hash40("special_air_hi_jump") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } frame(lua_state, 31.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: 0.0, y: -7.0, z: 0.0}); WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_END_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 280, 100, 25, 0, 6.0, 0.0, 3.0, 9.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 280, 100, 25, 0, 6.0, 0.0, 3.0, 9.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_ENABLE_GROUND); } } -unsafe extern "C" fn game_specialairhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int64(boma, hash40("special_air_hi_fall") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn eflame_firepillar_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn eflame_firepillar_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhijump", game_specialairhijump); + agent.acmd("game_specialairhifall", game_specialairhifall); -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_specialairhijump", game_specialairhijump) - .acmd("game_specialairhifall", game_specialairhifall) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .install(); - smashline::Agent::new("eflame_firepillar") - .acmd("game_specialhi", eflame_firepillar_special_hi_game) - .acmd("effect_specialhi", eflame_firepillar_special_hi_effect) - .install(); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/eflame/src/acmd/throws.rs b/fighters/eflame/src/acmd/throws.rs index 9313d3e678..7be248aa61 100644 --- a/fighters/eflame/src/acmd/throws.rs +++ b/fighters/eflame/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern fn eflame_catch_game(agent: &mut L2CAgentBase) { +unsafe extern fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -24,7 +24,7 @@ unsafe extern fn eflame_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn eflame_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -64,57 +64,56 @@ unsafe extern "C" fn eflame_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 115, 0, 85, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 115, 0, 85, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 3.33, 3.33, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 66.0); - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_catch", eflame_catch_game) - .acmd("game_catchdash", eflame_catch_dash_game) - .acmd("game_catchturn", eflame_catch_turn_game) - .acmd("game_throwlw", eflame_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/eflame/src/acmd/tilts.rs b/fighters/eflame/src/acmd/tilts.rs index c1f7404331..e75451ee2b 100644 --- a/fighters/eflame/src/acmd/tilts.rs +++ b/fighters/eflame/src/acmd/tilts.rs @@ -1,19 +1,18 @@ - use super::*; -unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -22,19 +21,19 @@ unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -42,22 +41,21 @@ unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -66,19 +64,19 @@ unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 2.5, 14.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 2.5, 14.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -86,19 +84,18 @@ unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -unsafe extern "C" fn eflame_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -107,54 +104,53 @@ unsafe extern "C" fn eflame_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 82, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 82, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Hitboxes 5-7 are copies of 2, 3, and 4 - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 0, Hash40::new("top"), 8.0, 78, 50, 0, 84, 4.0, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.5, 0.0, 3.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.0, 0.0, 2.0, 17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 8.0, 78, 50, 0, 84, 4.0, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.5, 0.0, 3.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.0, 0.0, 2.0, 17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attacks3", eflame_attack_s3_s_game) - .acmd("game_attackhi3", eflame_attack_hi3_game) - .acmd("game_attacklw3", eflame_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/eflame/src/esword/acmd.rs b/fighters/eflame/src/esword/acmd.rs new file mode 100644 index 0000000000..c12e9e8131 --- /dev/null +++ b/fighters/eflame/src/esword/acmd.rs @@ -0,0 +1,1434 @@ +use super::*; + +unsafe extern "C" fn game_flyflickl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.3); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyflickr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.3); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.45); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.45); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_reflectedl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_reflectedr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_rotate(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.2); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 1, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 6, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 0, 25.0, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 33.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 40.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *WEAPON_EFLAME_ESWORD_STATUS_SPECIAL_S_FLAG_FINISH); + } + frame(lua_state, 55.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 60.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 0.5); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flyflickl", game_flyflickl); + agent.acmd("game_flyflickr", game_flyflickr); + + agent.acmd("game_flyl", game_flyl); + agent.acmd("game_flyr", game_flyr); + + agent.acmd("game_reflectedl", game_reflectedl); + agent.acmd("game_reflectedr", game_reflectedr); + + agent.acmd("game_rotate", game_rotate); +} diff --git a/fighters/eflame/src/esword/mod.rs b/fighters/eflame/src/esword/mod.rs new file mode 100644 index 0000000000..6eae5659b4 --- /dev/null +++ b/fighters/eflame/src/esword/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("eflame_esword"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/eflame/src/firepillar/acmd.rs b/fighters/eflame/src/firepillar/acmd.rs new file mode 100644 index 0000000000..920da3e650 --- /dev/null +++ b/fighters/eflame/src/firepillar/acmd.rs @@ -0,0 +1,43 @@ +use super::*; + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); +} diff --git a/fighters/eflame/src/firepillar/mod.rs b/fighters/eflame/src/firepillar/mod.rs new file mode 100644 index 0000000000..6865c1f77b --- /dev/null +++ b/fighters/eflame/src/firepillar/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("eflame_firepillar"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/eflame/src/lib.rs b/fighters/eflame/src/lib.rs index ca59b11153..15022ce802 100644 --- a/fighters/eflame/src/lib.rs +++ b/fighters/eflame/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod esword; +mod firepillar; use smash::{ lib::{ @@ -37,11 +42,18 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("eflame"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + esword::install(); + firepillar::install(); + unsafe { // Disables the sword catch animation unless you are completely idle. skyline::patching::Patch::in_text(0xa0caf4).data(0x7100001F); diff --git a/fighters/eflame/src/opff.rs b/fighters/eflame/src/opff.rs index a5959103de..133a6cdbe2 100644 --- a/fighters/eflame/src/opff.rs +++ b/fighters/eflame/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn hit_cancel_blade_switch(boma: &mut BattleObjectModuleAccessor, cat1: i32, status_kind: i32, situation_kind: i32, motion_kind: u64) { if [*FIGHTER_STATUS_KIND_ATTACK_S3, *FIGHTER_STATUS_KIND_ATTACK_HI3, *FIGHTER_STATUS_KIND_ATTACK_LW3, *FIGHTER_STATUS_KIND_ATTACK_AIR, *FIGHTER_STATUS_KIND_ATTACK_DASH, *FIGHTER_STATUS_KIND_ATTACK_S4, *FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ @@ -64,8 +63,6 @@ pub unsafe fn eflame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("eflame") - .on_line(Main, eflame_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, eflame_frame_wrapper); } diff --git a/fighters/eflame/src/status.rs b/fighters/eflame/src/status/mod.rs similarity index 84% rename from fighters/eflame/src/status.rs rename to fighters/eflame/src/status/mod.rs index 6c9b613fc4..1007288235 100644 --- a/fighters/eflame/src/status.rs +++ b/fighters/eflame/src/status/mod.rs @@ -27,7 +27,7 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L VarModule::off_flag(fighter.battle_object, vars::eflame::instance::DISABLE_SPECIAL_HI); //Re-enable Mythra UpB - Set_Mythra_Up_Special_Cancel(fighter,false); + set_mythra_up_special_cancel(fighter,false); } if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { @@ -62,8 +62,7 @@ unsafe extern "C" fn reset_mythra_up_special_freefall(fighter: &mut L2CFighterCo } } -unsafe extern "C" fn Set_Mythra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) -{ +unsafe extern "C" fn set_mythra_up_special_cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) { //This first conditional tree is used if the player selects Pyra first if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ let object = crate::util::get_battle_object_from_id(object_id); @@ -99,18 +98,12 @@ unsafe extern "C" fn Set_Mythra_Up_Special_Cancel(fighter: &mut L2CFighterCommon } } -extern "C" fn eflame_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_EFLAME { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - } - } +extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("eflame") - .on_start(eflame_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); } diff --git a/fighters/elight/src/acmd/aerials.rs b/fighters/elight/src/acmd/aerials.rs index 83656f118f..372d11099e 100644 --- a/fighters/elight/src/acmd/aerials.rs +++ b/fighters/elight/src/acmd/aerials.rs @@ -1,56 +1,55 @@ - use super::*; -unsafe extern "C" fn elight_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 120, 50, 80, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 6.0, -4.0, 5.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 120, 50, 80, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 6.0, -4.0, 5.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 5.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 12.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 10.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 5.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 12.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 10.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -59,28 +58,25 @@ unsafe extern "C" fn elight_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } frame(lua_state, 72.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 game_landingairn(fighter: &mut L2CAgentBase) {} - -unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -89,15 +85,15 @@ unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 50, 65, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.5, 2.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 50, 65, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.5, 2.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -105,29 +101,28 @@ unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn elight_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -136,55 +131,54 @@ unsafe extern "C" fn elight_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 18.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 79.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 elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -193,30 +187,30 @@ unsafe extern "C" fn elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, -1.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, -2.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, -3.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, -1.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, -2.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, -3.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -225,36 +219,36 @@ unsafe extern "C" fn elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 75.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 elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -263,15 +257,15 @@ unsafe extern "C" fn elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 11.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 11.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -279,30 +273,33 @@ unsafe extern "C" fn elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 72.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("elight") - .acmd("game_attackairn", elight_attack_air_n_game) - .acmd("game_landingairn", game_landingairn) - .acmd("game_attackairf", elight_attack_air_f_game) - .acmd("game_attackairb", elight_attack_air_b_game) - .acmd("game_attackairhi", elight_attack_air_hi_game) - .acmd("game_attackairlw", elight_attack_air_lw_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", stub); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/elight/src/acmd/ground.rs b/fighters/elight/src/acmd/ground.rs index 0d0de7c7b5..18e5727cec 100644 --- a/fighters/elight/src/acmd/ground.rs +++ b/fighters/elight/src/acmd/ground.rs @@ -1,33 +1,33 @@ use super::*; -unsafe extern "C" fn elight_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -36,31 +36,31 @@ unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -69,31 +69,31 @@ unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn elight_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -102,38 +102,36 @@ unsafe extern "C" fn elight_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } - } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attack11", elight_attack_11_game) - .acmd("game_attack12", elight_attack_12_game) - .acmd("game_attackdash", elight_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/elight/src/acmd/mod.rs b/fighters/elight/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/elight/src/acmd/mod.rs +++ b/fighters/elight/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/elight/src/acmd/other.rs b/fighters/elight/src/acmd/other.rs index 4b1030e658..076681a8f4 100644 --- a/fighters/elight/src/acmd/other.rs +++ b/fighters/elight/src/acmd/other.rs @@ -1,212 +1,137 @@ - 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_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_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(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_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_rnd_futtobi01"), Hash40::new("seq_elight_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_elight_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_elight_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, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_elight_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_elight_step_left_l")); } } -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 just_shield_off_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ColorBlendModule::set_disable_camera_depth_influence(boma, true); - COL_PRI(fighter, 250); - FLASH(fighter, 0, 0.1, 0.6, 0.8); - fighter.clear_lua_stack(); - lua_args!(fighter, -1, 0, 0); - sv_animcmd::FLASH_SET_DIRECTION(fighter.lua_state_agent); - EFFECT(fighter, Hash40::new("elight_foresight2"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_foresight_lensflare"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("elight_foresight_body"), Hash40::new("hip"), 2, 0, 0, 0, 0, 90, 1, true); + COL_PRI(agent, 250); + FLASH(agent, 0, 0.1, 0.6, 0.8); + agent.clear_lua_stack(); + lua_args!(agent, -1, 0, 0); + sv_animcmd::FLASH_SET_DIRECTION(lua_state); + EFFECT(agent, Hash40::new("elight_foresight2"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_foresight_lensflare"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_foresight_body"), Hash40::new("hip"), 2, 0, 0, 0, 0, 90, 1, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 6, 0, 0.1, 0.6, 0); + if is_excute(agent) { + FLASH_FRM(agent, 6, 0, 0.1, 0.6, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); ColorBlendModule::set_disable_camera_depth_influence(boma, false); } } -unsafe extern "C" fn just_shield_off_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rand = sv_math::rand(hash40("fighter"), 10); if rand < 3 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_elight_rnd_foresight")); + PLAY_SEQUENCE(agent, Hash40::new("seq_elight_rnd_foresight")); } - PLAY_SE(fighter, Hash40::new("se_elight_escapeforesight01")); + PLAY_SE(agent, Hash40::new("se_elight_escapeforesight01")); } } -pub fn install() { - smashline::Agent::new("elight") - .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_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_justshieldoff", just_shield_off_effect) - .acmd("sound_justshieldoff", just_shield_off_sound) - .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_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("effect_justshieldoff", effect_justshieldoff); + agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/elight/src/acmd/smashes.rs b/fighters/elight/src/acmd/smashes.rs index 1b468c35ee..9d9fc88b2a 100644 --- a/fighters/elight/src/acmd/smashes.rs +++ b/fighters/elight/src/acmd/smashes.rs @@ -1,11 +1,10 @@ - use super::*; -unsafe extern "C" fn elight_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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 ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); @@ -14,48 +13,46 @@ unsafe extern "C" fn elight_attack_s4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); WorkModule::set_int64(boma, hash40("attack_s4_hold") as i64, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 14.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 14.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -63,72 +60,70 @@ unsafe extern "C" fn elight_attack_s4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 0.8); - + FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn elight_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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 ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); WorkModule::set_int64(boma, hash40("attack_lw4_hold") as i64, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.5, 180, 100, 30, 0, 3.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 4.5, 180, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 4.5, 180, 100, 25, 0, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.5, 180, 100, 30, 0, 3.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("legl"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 4.5, 180, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 4.5, 180, 100, 25, 0, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("legl"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -136,12 +131,10 @@ unsafe extern "C" fn elight_attack_lw4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attacks4", elight_attack_s4_game) - .acmd("game_attacklw4", elight_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index 54f94aed88..bddd56a88a 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1,20 +1,21 @@ - use super::*; -unsafe fn manage_sword_motion(fighter: &mut L2CAgentBase, motion: Hash40) { +unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let exists = { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); - app::sv_animcmd::IS_EXIST_ARTICLE(fighter.lua_state_agent) + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); + app::sv_animcmd::IS_EXIST_ARTICLE(lua_state) }; if !exists { return; } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial( - fighter.module_accessor, + boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, motion, @@ -29,17 +30,16 @@ unsafe fn manage_sword_motion(fighter: &mut L2CAgentBase, motion: Hash40) { ); } - if MotionModule::is_changing(fighter.module_accessor) && is_excute(fighter) { - fighter.on_flag(*FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); + if MotionModule::is_changing(boma) && is_excute(agent) { + agent.on_flag(*FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } -unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -47,138 +47,138 @@ unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 12.0, 8.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 6.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 6.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 12.0, 8.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 6.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 6.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 10.0, 8.0, Some(0.0), Some(10.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 4.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 4.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 10.0, 8.0, Some(0.0), Some(10.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 4.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 4.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 11.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 10.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 11.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 10.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 11.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 6.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 6.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 11.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 6.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 6.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 3.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 15.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 18.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 3.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 15.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 18.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 15.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 15.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 38.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 46.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -186,14 +186,14 @@ unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { } } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -201,189 +201,189 @@ unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 12.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 100, 100, 20, 15, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 50, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 11.0, 5.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 100, 100, 20, 15, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 50, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 11.0, 5.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 100, 100, 20, 15, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 50, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 100, 100, 20, 15, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 50, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 6, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 6, 2.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); } frame(lua_state, 37.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 47.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 52.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -395,11 +395,11 @@ unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { // for SOME reason, full charge aerial neutral b would crash if i did the above script as a multiscript install // so we need to reimplement the aerial version too /shrug -unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -407,177 +407,177 @@ unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 12.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 13.0, 8.0, Some(0.0), Some(13.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 13.0, 8.0, Some(0.0), Some(13.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 52.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -585,714 +585,625 @@ unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { } } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn effect_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn game_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - manage_sword_motion(fighter, Hash40::new("to_open")); - - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.75); - - frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - - frame(lua_state, 24.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); - } - - frame(lua_state, 25.0); - manage_sword_motion(fighter, Hash40::new("to_close")); -} - -unsafe extern "C" fn game_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 1.0); - - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); - } - - manage_sword_motion(fighter, Hash40::new("to_open")); - - frame(lua_state, 23.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); - } - - frame(lua_state, 24.0); - - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); - } - - frame(lua_state, 25.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); - } - - frame(lua_state, 26.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); - } - - frame(lua_state, 27.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); - } - - frame(lua_state, 29.0); - manage_sword_motion(fighter, Hash40::new("to_close")); -} - -unsafe extern "C" fn effect_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT(fighter, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } -} - -unsafe extern "C" fn effect_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } - - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT(fighter, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } -} - -unsafe extern "C" fn sound_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_elight_special_h01_rand")); - } - - frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_elight_special_h02_01_shot")); - } -} - -unsafe extern "C" fn sound_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_elight_special_h02_rand")); - } - - frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_elight_special_h03_shot")); - } -} - -unsafe extern "C" fn expression_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - } - - frame(lua_state, 24.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); - } -} - -unsafe extern "C" fn expression_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - } - - frame(lua_state, 27.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); - } -} - -unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); - let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); - if PostureModule::lr(fighter.module_accessor) > 0.0 { - angle *= -1.0; - } - angle = 80.0 - angle.to_degrees() / 2.0; - if angle < 0.0 { - angle += 360.0; - } - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); - } - - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); - } - - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::clear(fighter.module_accessor, 2, false); - AttackModule::clear(fighter.module_accessor, 3, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); - } - - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - - frame(lua_state, 10.0); - - manage_sword_motion(fighter, Hash40::new("to_close")); - - frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.5); - - frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn effect_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_light"), false, false); - } -} - -unsafe extern "C" fn game_specialsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } } -unsafe extern "C" fn effect_specialsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn effect_specialairsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn game_specials (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(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) { MotionModule::set_rate(boma, 1.7); - JostleModule::set_status(fighter.module_accessor, false); - VarModule::off_flag(fighter.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + JostleModule::set_status(boma, false); + VarModule::off_flag(agent.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 30, 100, 40, 35, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 35, 100, 40, 25, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::set_int(fighter.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); - if ArticleModule::get_num(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); + if is_excute(agent) { + WorkModule::set_int(boma, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); + if ArticleModule::get_num(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); + ArticleModule::set_rate(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); } - VisibilityModule::set_whole(fighter.module_accessor, false); + VisibilityModule::set_whole(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (22.0-18.0)/1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); } - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); } } -unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(fighter.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } frame(lua_state, 36.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn effect_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(fighter.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } } -unsafe extern "C" fn expression_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_79_slashlarge"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashlarge"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_79_slashsmall"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashsmall"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn sound_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rand = sv_math::rand(hash40("fighter"), 6) as i32; let rand1 = sv_math::rand(hash40("fighter"), 2) as i32; if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R) { if rand1 == 0 { //if you hold taunt, do foresight voicelines - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_escapeforesight01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight01")); } else if rand1 == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_escapeforesight02")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight02")); } } else { //else just run the normal voice pool if rand == 0 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_special_s01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_s01")); } else if rand == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack04")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack04")); } else if rand == 2 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack05")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack05")); } else if rand == 3 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack06")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack06")); } else if rand == 4 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack09")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack09")); } else if rand == 5 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_special_l05")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_l05")); } } } frame(lua_state, 2.0); - if is_excute(fighter) { //slash noise - PLAY_SE(fighter, Hash40::new("se_elight_special_s02_end")); + if is_excute(agent) { //slash noise + PLAY_SE(agent, Hash40::new("se_elight_special_s02_end")); } } -unsafe extern "C" fn effect_specialsend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } } -unsafe extern "C" fn effect_specialairsend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } -unsafe extern "C" fn game_specials5(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - VisibilityModule::set_whole(fighter.module_accessor, false); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + } + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn effect_specials5(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -1); - EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + manage_sword_motion(agent, Hash40::new("to_open")); + + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 0.75); + + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1.0); + + frame(lua_state, 24.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, -24, -43, 0.4, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_elight_sword4"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 19.5, 0.0, -0.08, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + + frame(lua_state, 25.0); + manage_sword_motion(agent, Hash40::new("to_close")); +} + +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); } - frame(lua_state, 4.0); - if is_excute(fighter) { - //EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - //EFFECT(fighter, Hash40::new("elight_photon_start"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_appeal_spark"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_slash5"), Hash40::new("top"), 0, 0, -3, 0, 0, -2, 0.9, false); - LAST_EFFECT_SET_RATE(fighter, 1.7); - EFFECT(fighter, Hash40::new("elight_photon_slash5_light"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + + manage_sword_motion(agent, Hash40::new("to_open")); + + frame(lua_state, 23.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("elight_photon_slash5"), -1); - AFTER_IMAGE_OFF(fighter, 3); + + frame(lua_state, 24.0); + + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + + frame(lua_state, 25.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 9.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); + + frame(lua_state, 26.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } + + frame(lua_state, 27.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + } + + frame(lua_state, 29.0); + manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); +unsafe extern "C" fn effect_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 23.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } +} + +unsafe extern "C" fn sound_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_elight_special_h01_rand")); + } + frame(lua_state, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_elight_special_h02_01_shot")); + } +} + +unsafe extern "C" fn sound_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_elight_special_h02_rand")); + } + frame(lua_state, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_elight_special_h03_shot")); + } +} + +unsafe extern "C" fn expression_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, 0x50000000); + } +} +unsafe extern "C" fn expression_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); + } +} + +unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); + let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); + if PostureModule::lr(boma) > 0.0 { + angle *= -1.0; + } + angle = 80.0 - angle.to_degrees() / 2.0; + if angle < 0.0 { + angle += 360.0; + } + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 10.0); + manage_sword_motion(agent, Hash40::new("to_close")); + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("elight_bunshin") - .acmd("game_specialairs5", game_specials5) - .acmd("game_specials5", game_specials5) - .acmd("effect_specialairs5", effect_specials5) - .acmd("effect_specials5", effect_specials5) - .install(); - smashline::Agent::new("elight") - .acmd("game_specialn", game_specialn) - .acmd("game_specialairn", game_specialn) - .acmd("game_specialn2", game_specialn2) - .acmd("game_specialairn2", game_specialairn2) - .acmd("effect_specialhistart", effect_specialhistart) - .acmd("game_specialairhi1", game_specialairhi1) - .acmd("game_specialairhi2", game_specialairhi2) - .acmd("effect_specialairhi1", effect_specialairhi1) - .acmd("effect_specialairhi2", effect_specialairhi2) - .acmd("sound_specialairhi1", sound_specialairhi1) - .acmd("sound_specialairhi2", sound_specialairhi2) - .acmd("expression_specialairhi1", expression_specialairhi1) - .acmd("expression_specialairhi2", expression_specialairhi2) - .acmd("game_specialairhijump", game_specialairhijump) - .acmd("effect_specialairhijump", effect_specialairhijump) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specialsstart", game_specialsstart) - .acmd("effect_specialsstart", effect_specialsstart) - .acmd("effect_specialairsstart", effect_specialairsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("effect_specials", effect_specials) - .acmd("effect_specialairs", effect_specialairs) - .acmd("expression_specials", expression_specials) - .acmd("expression_specialairs", expression_specials) - .acmd("sound_specials", sound_specials) - .acmd("sound_specialairs", sound_specials) - .acmd("effect_specialsend", effect_specialsend) - .acmd("effect_specialairsend", effect_specialairsend) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .install(); +unsafe extern "C" fn effect_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_light"), false, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialairn2); + + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsstart", game_specialairsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialairsend); + + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi1", effect_specialairhi1); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("sound_specialairhi1", sound_specialairhi1); + agent.acmd("sound_specialairhi2", sound_specialairhi2); + agent.acmd("expression_specialairhi1", expression_specialairhi1); + agent.acmd("expression_specialairhi2", expression_specialairhi2); + agent.acmd("game_specialairhijump", game_specialairhijump); + agent.acmd("effect_specialairhijump", effect_specialairhijump); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/elight/src/acmd/throws.rs b/fighters/elight/src/acmd/throws.rs index 2dc06afbc5..abad618df0 100644 --- a/fighters/elight/src/acmd/throws.rs +++ b/fighters/elight/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn elight_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -21,7 +20,7 @@ unsafe extern "C" fn elight_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn elight_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,7 +44,7 @@ unsafe extern "C" fn elight_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn elight_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -69,18 +68,18 @@ unsafe extern "C" fn elight_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 70, 90, 0, 75, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 70, 90, 0, 75, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } @@ -89,23 +88,23 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } @@ -113,14 +112,12 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_catch", elight_catch_game) - .acmd("game_catchdash", elight_catch_dash_game) - .acmd("game_catchturn", elight_catch_turn_game) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/elight/src/acmd/tilts.rs b/fighters/elight/src/acmd/tilts.rs index 1ec83226f9..98d69419c0 100644 --- a/fighters/elight/src/acmd/tilts.rs +++ b/fighters/elight/src/acmd/tilts.rs @@ -1,50 +1,49 @@ - use super::*; -unsafe extern "C" fn elight_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(9.6-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(9.6-9.0)); } frame(lua_state, 9.6); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(10.0-9.6)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(10.0-9.6)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -53,25 +52,24 @@ unsafe extern "C" fn elight_attack_s3_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -80,29 +78,29 @@ unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-8.0)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(10.0-8.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(10.0-8.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -111,18 +109,17 @@ unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 38.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -131,17 +128,17 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(6.25-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(6.25-6.0)); } frame(lua_state, 6.25); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(7.0-6.25)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(7.0-6.25)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); /* // Hitboxes 5-7 are copies of 2, 3, and 4 ATTACK(fighter, 5, 0, Hash40::new("sword2"), 4.0, 77, 65, 0, 80, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -150,34 +147,34 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { */ } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* ATTACK(fighter, 5, 0, Hash40::new("top"), 4.0, 77, 65, 0, 80, 3.0, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(8.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 93, 75, 0, 75, 2.5, 0.0, 2.0, 13.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); ATTACK(fighter, 7, 0, Hash40::new("top"), 3.0, 93, 75, 0, 75, 2.0, 0.0, 2.0, 16.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); */ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { /* AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); */ - FT_MOTION_RATE(fighter, 1.0/(9.5-9.0)); + FT_MOTION_RATE(agent, 1.0/(9.5-9.0)); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0/(10.0-9.5)); + FT_MOTION_RATE(agent, 1.0/(10.0-9.5)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -186,20 +183,19 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attacks3", elight_attack_s3_s_game) - .acmd("game_attackhi3", elight_attack_hi3_game) - .acmd("game_attacklw3", elight_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/elight/src/bunshin/acmd.rs b/fighters/elight/src/bunshin/acmd.rs new file mode 100644 index 0000000000..c61259cccb --- /dev/null +++ b/fighters/elight/src/bunshin/acmd.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn game_specialairs5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn effect_specialairs5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -1); + EFFECT(agent, Hash40::new("elight_photon_appear"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, -24, -43, 0.4, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword4"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 19.5, 0.0, -0.08, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + } + frame(lua_state, 4.0); + if is_excute(agent) { + //EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + //EFFECT(fighter, Hash40::new("elight_photon_start"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_appeal_spark"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_slash5"), Hash40::new("top"), 0, 0, -3, 0, 0, -2, 0.9, false); + LAST_EFFECT_SET_RATE(agent, 1.7); + EFFECT(agent, Hash40::new("elight_photon_slash5_light"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("elight_photon_slash5"), -1); + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + //EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairs5", game_specialairs5); + agent.acmd("game_specials5", game_specialairs5); + agent.acmd("effect_specialairs5", effect_specialairs5); + agent.acmd("effect_specials5", effect_specialairs5); +} diff --git a/fighters/elight/src/bunshin/mod.rs b/fighters/elight/src/bunshin/mod.rs new file mode 100644 index 0000000000..a64a9d7115 --- /dev/null +++ b/fighters/elight/src/bunshin/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("elight_bunshin"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/elight/src/lib.rs b/fighters/elight/src/lib.rs index 2c30b5e383..396ed8eb04 100644 --- a/fighters/elight/src/lib.rs +++ b/fighters/elight/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bunshin; use skyline::nro::NroInfo; use smash::{ @@ -38,11 +42,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("elight"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bunshin::install(); // Disables Foresight skyline::patching::Patch::in_text(0xa28e78).nop(); diff --git a/fighters/elight/src/opff.rs b/fighters/elight/src/opff.rs index 0a628328c6..815a1dafe0 100644 --- a/fighters/elight/src/opff.rs +++ b/fighters/elight/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn hit_cancel_blade_switch(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if (fighter.is_status_one_of(&[ @@ -89,8 +88,6 @@ pub unsafe extern "C" fn elight_frame_wrapper(fighter: &mut smash::lua2cpp::L2CF side_special_landing_lag(fighter); } -pub fn install() { - smashline::Agent::new("elight") - .on_line(Main, elight_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, elight_frame_wrapper); } diff --git a/fighters/elight/src/status.rs b/fighters/elight/src/status/mod.rs similarity index 79% rename from fighters/elight/src/status.rs rename to fighters/elight/src/status/mod.rs index c417e9e933..851d82ee05 100644 --- a/fighters/elight/src/status.rs +++ b/fighters/elight/src/status/mod.rs @@ -1,113 +1,108 @@ -use super::*; - -mod special_hi_attack; -mod special_hi_jump; -mod special_hi_finish; -mod special_hi_finish2; -mod special_hi; - -/// Prevents side b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -/// Prevents up b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI) { - false.into() - } else { - true.into() - } -} - -/// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FALL]; - - if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)) - || fighter.is_status_one_of(damage_statuses) || fighter.is_status(*FIGHTER_STATUS_KIND_LANDING){ - //Re-enable Mythra UpB - VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI); - //Re-enable Mythra SideB - VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S); - - //Re-enable Pyra UpB - Set_Pyra_Up_Special_Cancel(fighter,false); - } - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::elight::instance::UP_SPECIAL_FREEFALL); - } - return true.into(); -} - -unsafe extern "C" fn Set_Pyra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) -{ - //This first conditional tree is used if the player selects Pyra first - if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ - let object = crate::util::get_battle_object_from_id(object_id); - if !object.is_null() { - let object = unsafe { &mut *object }; - let kind = object.kind as i32; - if kind == *FIGHTER_KIND_EFLAME { - if cancel_state { - VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - else{ - VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - return; - } - } - } - //This is used if the player selects Mythra first - if let Some(object_id) = Some(fighter.battle_object_id - 0x10000){ - let object = crate::util::get_battle_object_from_id(object_id); - if !object.is_null() { - let object = unsafe { &mut *object }; - let kind = object.kind as i32; - if kind == *FIGHTER_KIND_EFLAME { - if cancel_state { - VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - else{ - VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - } - } - } -} - -extern "C" fn elight_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ELIGHT { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -pub fn install() { - special_hi_attack::install(); - special_hi_jump::install(); - special_hi_finish::install(); - special_hi_finish2::install(); - special_hi::install(); - smashline::Agent::new("elight") - .on_start(elight_init) - .install(); +use super::*; + +mod special_hi_attack; +mod special_hi_jump; +mod special_hi_finish; +mod special_hi_finish2; +mod special_hi; + +/// Prevents side b from being used again in air when it has been disabled by up-b fall +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +/// Prevents up b from being used again in air when it has been disabled by up-b fall +unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI) { + false.into() + } else { + true.into() + } +} + +/// Re-enables the ability to use aerial specials when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FALL]; + + if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)) + || fighter.is_status_one_of(damage_statuses) || fighter.is_status(*FIGHTER_STATUS_KIND_LANDING){ + //Re-enable Mythra UpB + VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI); + //Re-enable Mythra SideB + VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S); + + //Re-enable Pyra UpB + Set_Pyra_Up_Special_Cancel(fighter,false); + } + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::elight::instance::UP_SPECIAL_FREEFALL); + } + return true.into(); +} + +unsafe extern "C" fn Set_Pyra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) +{ + //This first conditional tree is used if the player selects Pyra first + if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ + let object = crate::util::get_battle_object_from_id(object_id); + if !object.is_null() { + let object = unsafe { &mut *object }; + let kind = object.kind as i32; + if kind == *FIGHTER_KIND_EFLAME { + if cancel_state { + VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + else{ + VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + return; + } + } + } + //This is used if the player selects Mythra first + if let Some(object_id) = Some(fighter.battle_object_id - 0x10000){ + let object = crate::util::get_battle_object_from_id(object_id); + if !object.is_null() { + let object = unsafe { &mut *object }; + let kind = object.kind as i32; + if kind == *FIGHTER_KIND_EFLAME { + if cancel_state { + VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + else{ + VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + } + } + } +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi_attack::install(agent); + special_hi_jump::install(agent); + special_hi_finish::install(agent); + special_hi_finish2::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi.rs b/fighters/elight/src/status/special_hi.rs index edb536acd4..fa3443d8c6 100644 --- a/fighters/elight/src/status/special_hi.rs +++ b/fighters/elight/src/status/special_hi.rs @@ -24,6 +24,8 @@ pub unsafe fn special_hi_common_check_spreadbullet(fighter: &mut L2CFighterCommo } } +// FIGHTER_STATUS_KIND_SPECIAL_HI + unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -102,11 +104,9 @@ unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); } diff --git a/fighters/elight/src/status/special_hi_attack.rs b/fighters/elight/src/status/special_hi_attack.rs index 04f571a648..9d03928077 100644 --- a/fighters/elight/src/status/special_hi_attack.rs +++ b/fighters/elight/src/status/special_hi_attack.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1 + unsafe extern "C" fn special_hi_attack1_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -30,6 +32,8 @@ unsafe extern "C" fn special_hi_attack1_pre(fighter: &mut L2CFighterCommon) -> L 0.into() } +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2 + unsafe extern "C" fn special_hi_attack2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -98,13 +102,11 @@ unsafe extern "C" fn special_hi_attack2_end(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_pre) - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_main) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_end) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_pre); + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_main); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_end); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_finish.rs b/fighters/elight/src/status/special_hi_finish.rs index 13a9d242ff..172fb6f3a0 100644 --- a/fighters/elight/src/status/special_hi_finish.rs +++ b/fighters/elight/src/status/special_hi_finish.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH + unsafe extern "C" fn special_hi_finish_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -157,10 +159,8 @@ unsafe extern "C" fn special_hi_finish_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_finish2.rs b/fighters/elight/src/status/special_hi_finish2.rs index 654cec1bdb..09cfaa6712 100644 --- a/fighters/elight/src/status/special_hi_finish2.rs +++ b/fighters/elight/src/status/special_hi_finish2.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::elight::SPECIAL_HI_FINISH2 + unsafe extern "C" fn special_hi_finish2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -77,10 +79,8 @@ unsafe extern "C" fn special_hi_finish2_end(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_pre) - .status(Main, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_main) - .status(End, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_pre); + agent.status(Main, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_main); + agent.status(End, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_jump.rs b/fighters/elight/src/status/special_hi_jump.rs index db12daf630..a38fffdc7e 100644 --- a/fighters/elight/src/status/special_hi_jump.rs +++ b/fighters/elight/src/status/special_hi_jump.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP + unsafe extern "C" fn special_hi_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -154,11 +156,9 @@ unsafe extern "C" fn special_hi_jump_exec(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end) - .status(Exec, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end); + agent.status(Exec, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec); } \ No newline at end of file diff --git a/fighters/falco/src/acmd/aerials.rs b/fighters/falco/src/acmd/aerials.rs index f6c5d37105..d1f026bc88 100644 --- a/fighters/falco/src/acmd/aerials.rs +++ b/fighters/falco/src/acmd/aerials.rs @@ -1,394 +1,388 @@ - use super::*; -unsafe extern "C" fn falco_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 12.0, 361, 100, 0, 10, 3.7, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 3.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legl"), 12.0, 361, 100, 0, 10, 3.7, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 3.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(31.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 361, 90, 0, 15, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(31.0-8.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 361, 90, 0, 15, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(43.0-31.0)); + FT_MOTION_RATE(agent, 18.0/(43.0-31.0)); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 43.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn falco_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackhard_l01")); } } -unsafe extern "C" fn falco_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, -8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, -8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn falco_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.700) + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.700) } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000) + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000) } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 3.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 3.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.599); + FT_MOTION_RATE(agent, 0.599); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 3.0, 0.0, 10.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 5.0, 0.0, 10.0, 6.0, Some(0.0), Some(11.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 50, 130, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 4.0, 50, 130, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 3.0, 0.0, 10.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 5.0, 0.0, 10.0, 6.0, Some(0.0), Some(11.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 50, 130, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 4.0, 50, 130, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //FT_MOTION_RATE(fighter, 16.0/(43.0-22.0)); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn falco_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } - } -unsafe extern "C" fn falco_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { } +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } -unsafe extern "C" fn falco_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -1, 4, -2, -30, -4, -144, 0.6, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -1, 4, -2, -30, -4, -144, 0.6, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 6, 3, -20, -10, -144, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 6, 3, -20, -10, -144, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 8, 3, -33, -20, -144, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 8, 3, -33, -20, -144, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 2); } - } -unsafe extern "C" fn falco_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, 0 as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, 0 as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0 as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("arml"), app::AttackDirectionAxis(*ATTACK_DIRECTION_X), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackhard_l01")); } - } -unsafe extern "C" fn falco_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 14.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 100, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legr"), 14.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 100, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(27.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(27.0-8.0)); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 15.0/(38.0-30.0)); + FT_MOTION_RATE(agent, 15.0/(38.0-30.0)); } frame(lua_state, 38.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn falco_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 9.0, -3.5, 23, 120, 200, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 9.0, -3.5, 23, 120, 200, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 10.5, -10.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 10.5, -10.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } - } -unsafe extern "C" fn falco_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.857); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.857); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.620); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.620); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.5, 70, 110, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.2, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.5, 70, 110, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.2, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe fn falco_attack_air_hi_effect(fighter: &mut L2CAgentBase){ - let lua_state: u64 = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase){ + let lua_state: u64 = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter ,Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -70, 90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 4.0) + if is_excute(agent) { + EFFECT_FOLLOW(agent ,Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -70, 90, 1, true); + LAST_EFFECT_SET_RATE(agent, 4.0) } frame(lua_state,11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -140, 90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 4.0) + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -140, 90, 1, true); + LAST_EFFECT_SET_RATE(agent, 4.0) } } -unsafe extern "C" fn falco_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.444); + FT_MOTION_RATE(agent, 0.444); frame(lua_state, 6.5); // effectively f4 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); // f5 - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 10.0); // f6 - MotionModule::set_rate(fighter.boma(), 0.684); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + MotionModule::set_rate(agent.boma(), 0.684); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.42); // f10 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); // f25 - FT_MOTION_RATE(fighter, 27.0/(55.0-23.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 27.0/(55.0-23.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); // f32 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attackairn", falco_attack_air_n_game) - .acmd("sound_attackairn", falco_attack_air_n_sound) - .acmd("effect_attackairn", falco_attack_air_n_effect) - .acmd("expression_attackairn", falco_attack_air_n_expression) - .acmd("game_attackairf", falco_attack_air_f_game) - .acmd("sound_attackairf", falco_attack_air_f_sound) - .acmd("game_landingairf", falco_landing_air_f_game) - .acmd("effect_attackairf", falco_attack_air_f_effect) - .acmd("expression_attackairf", falco_attack_air_f_expression) - .acmd("sound_attackairb", falco_attack_air_b_sound) - .acmd("game_attackairb", falco_attack_air_b_game) - .acmd("effect_attackairb", falco_attack_air_b_effect) - .acmd("expression_attackairb", falco_attack_air_b_expression) - .acmd("game_attackairhi", falco_attack_air_hi_game) - .acmd("game_attackairlw", falco_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/falco/src/acmd/ground.rs b/fighters/falco/src/acmd/ground.rs index 5f76979b09..df317ce89a 100644 --- a/fighters/falco/src/acmd/ground.rs +++ b/fighters/falco/src/acmd/ground.rs @@ -1,102 +1,97 @@ - use super::*; -unsafe extern "C" fn falco_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn falco_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn falco_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("arml"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn falco_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attack11", falco_attack_11_game) - .acmd("game_attack12", falco_attack_12_game) - .acmd("expression_attack12", falco_attack_12_expression) - .acmd("game_attackdash", falco_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/falco/src/acmd/mod.rs b/fighters/falco/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/falco/src/acmd/mod.rs +++ b/fighters/falco/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index e218eb6289..2d4fe2c852 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -1,281 +1,160 @@ - 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_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_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(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_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_rnd_futtobi01"), Hash40::new("seq_falco_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_falco_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_falco_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_SE(fighter, Hash40::new("se_falco_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_step_left_m")); } } -unsafe extern "C" fn falco_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, 12.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 falco_blaster_bullet_fly_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"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - -} - -unsafe extern "C" fn escape_air_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); - } - -} - -unsafe extern "C" fn escape_air_slide_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("falco")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); - } - } -unsafe extern "C" fn escape_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_passivewalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_jump02")); + PLAY_SE(agent, Hash40::new("vc_falco_passive")); } - } -unsafe extern "C" fn wall_jump_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_jump02")); - PLAY_SE(fighter, Hash40::new("vc_falco_passive")); - } - -} - -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 sound_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_escapeair")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); } } -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 falco_illusion_move_air_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"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn sound_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("falco")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); } } -pub fn install() { - smashline::Agent::new("falco_illusion") - .acmd("game_moveair", falco_illusion_move_air_game) - .install(); - smashline::Agent::new("falco") - .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", falco_turn_dash_game) - .acmd("sound_escapeair", escape_air_sound) - .acmd("sound_escapeairslide", escape_air_slide_sound) - .acmd("sound_escapen", escape_n_sound) - .acmd("sound_passivewalljump", wall_jump_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("falco_blaster_bullet") - .acmd("game_fly", falco_blaster_bullet_fly_game) - .install(); +unsafe extern "C" fn sound_escapen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_escapeair")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); + } +} + +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("sound_passivewalljump", sound_passivewalljump); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("sound_escapeair", sound_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_escapeairslide", sound_escapeairslide); + agent.acmd("sound_escapen", sound_escapen); } diff --git a/fighters/falco/src/acmd/smashes.rs b/fighters/falco/src/acmd/smashes.rs index d0b88bdf3c..c5d91f6961 100644 --- a/fighters/falco/src/acmd/smashes.rs +++ b/fighters/falco/src/acmd/smashes.rs @@ -1,112 +1,108 @@ - use super::*; -unsafe extern "C" fn falco_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.556); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.556); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 2.2, 0.0, 1.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 3.0, 4.0, 1.8, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 4.0, 8.0, 2.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 2.2, 0.0, 1.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 3.0, 4.0, 1.8, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 4.0, 8.0, 2.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 107, 0, 15, 6.0, 0.0, 5.0, 12.0, Some(0.0), Some(5.0), Some(6.0), 1.0, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 107, 0, 15, 6.0, 0.0, 5.0, 12.0, Some(0.0), Some(5.0), Some(6.0), 1.0, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn falco_attack_s4_s_expression(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_attacks4(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); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn falco_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 130, 15, 0, 50, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 110, 100, 100, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 4.0, 95, 100, 100, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 4.0, 127, 100, 100, 0, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("top"), 4.0, 127, 100, 100, 0, 5.5, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 130, 15, 0, 50, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 110, 100, 100, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 4.0, 95, 100, 100, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 4.0, 127, 100, 100, 0, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("top"), 4.0, 127, 100, 100, 0, 5.5, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 3.5, 7.0, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 3.5, 7.0, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 5.0, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legl"), 13.0, 80, 105, 0, 28, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 5.0, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legl"), 13.0, 80, 105, 0, 28, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attacks4", falco_attack_s4_s_game) - .acmd("expression_attacks4", falco_attack_s4_s_expression) - .acmd("game_attackhi4", falco_attack_hi4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index 1cde601631..833f4f7f0d 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -1,13 +1,12 @@ - use super::*; -unsafe extern "C" fn falco_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(14.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(14.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); @@ -15,37 +14,46 @@ unsafe extern "C" fn falco_special_n_start_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn falco_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_special_n02")); + } +} + +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //DamageModule::add_damage(boma, 1.0, 0); - FT_MOTION_RATE(fighter, 10.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 10.0/(4.0-1.0)); WorkModule::on_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("loop"), false, 0.0); } } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.25); + FT_MOTION_RATE(agent, 0.25); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); } } -unsafe extern "C" fn falco_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(5.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); @@ -53,17 +61,17 @@ unsafe extern "C" fn falco_special_air_n_start_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn falco_special_air_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //DamageModule::add_damage(boma, 1.0, 0); WorkModule::on_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); //DamageModule::add_damage(boma, 1.0, 0); ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ @@ -71,313 +79,274 @@ unsafe extern "C" fn falco_special_air_n_loop_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); if WorkModule::is_flag(boma,*FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP){ //laser loop motion rate(changing this allows for faster or slower sequential lasers from the first) - FT_MOTION_RATE(fighter,0.10); + FT_MOTION_RATE(agent,0.10); } } } -unsafe extern "C" fn falco_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { } +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } - unsafe extern "C" fn falco_special_hi_hold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + unsafe extern "C" fn game_specialhiholdair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 40, 0, 30, 7.0, 0.0, 6.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 40, 0, 30, 7.0, 0.0, 6.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); let target = Vector2f { x: 0.0, y: 5.0 }; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &target, 8, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } } -unsafe extern "C" fn falco_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 16.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 16.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn falco_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); ReflectorModule::set_status(boma, *FIGHTER_FALCO_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); ReflectorModule::set_status(boma, *FIGHTER_FALCO_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - 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("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); - EffectModule::preset_limit_num(fighter.module_accessor, 2); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); - //FLASH(fighter, 1, 1, 1, 0.627); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); + EffectModule::preset_limit_num(boma, 2); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); + //FLASH(agent, 1, 1, 1, 0.627); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } // frame(lua_state, 1.0); - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); // } // frame(lua_state, 32.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_loop"), false, false); - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_ref"), false, false); - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_flash"), true, false); - // EFFECT_FLW_POS(fighter, Hash40::new("sys_flash"), Hash40::new("reflector"), 1.4, -0.6, -0.5, 0, 0, 0, 0.5, true); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_loop"), false, false); + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_ref"), false, false); + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_flash"), true, false); + // EFFECT_FLW_POS(agent, Hash40::new("sys_flash"), Hash40::new("reflector"), 1.4, -0.6, -0.5, 0, 0, 0, 0.5, true); // } } -unsafe extern "C" fn falco_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn falco_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); } } -unsafe extern "C" fn falco_special_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); } } -unsafe extern "C" fn game_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairlwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn effect_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if !VarModule::is_flag(fighter.battle_object, vars::falco::status::SET_EFFECT) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2, 0, 0, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.2, 0, -0.5, 0, 0, 0, 1, true); - VarModule::on_flag(fighter.battle_object, vars::falco::status::SET_EFFECT); + if !VarModule::is_flag(agent.battle_object, vars::falco::status::SET_EFFECT) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2, 0, 0, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.2, 0, -0.5, 0, 0, 0, 1, true); + VarModule::on_flag(agent.battle_object, vars::falco::status::SET_EFFECT); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0.5, 1, 0.25); + if is_excute(agent) { + FLASH(agent, 0, 0.5, 1, 0.25); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); } -unsafe extern "C" fn sound_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //STOP_SE(fighter, Hash40::new("se_falco_special_l02")); - //PLAY_STATUS(fighter, Hash40::new("se_falco_special_l02")); + if is_excute(agent) { + //STOP_SE(agent, Hash40::new("se_falco_special_l02")); + //PLAY_STATUS(agent, Hash40::new("se_falco_special_l02")); } } -unsafe extern "C" fn expression_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_animcmd::wait_loop_sync_mot(fighter.lua_state_agent); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_animcmd::wait_loop_sync_mot(lua_state); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } -unsafe extern "C" fn game_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn effect_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sound_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn expression_speciallwend(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_speciallwend(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); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_off"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn falco_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_special_n02")); - } - -} - -unsafe extern "C" fn falco_special_air_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_special_n02")); - } - -} - -// #[acmd_script( agent = "falco", script = "sound_specialairhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_air_hi_sound(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; +// unsafe fn sound_specialairhi(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); -// if is_excute(fighter) { -// PLAY_SEQUENCE(fighter, Hash40::new("seq_falco_rnd_firebird")); -// PLAY_SE(fighter, Hash40::new("se_falco_special_h02")); +// if is_excute(agent) { +// PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); +// PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } - // } -// #[acmd_script( agent = "falco", script = "sound_specialhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_hi_sound(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; +// unsafe fn sound_specialhi(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); -// if is_excute(fighter) { -// PLAY_SEQUENCE(fighter, Hash40::new("seq_falco_rnd_firebird")); -// PLAY_SE(fighter, Hash40::new("se_falco_special_h02")); +// if is_excute(agent) { +// PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); +// PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } - // } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_specialnstart", falco_special_n_start_game) - .acmd("game_specialnloop", falco_special_n_loop_game) - .acmd("game_specialairnstart", falco_special_air_n_start_game) - .acmd("game_specialairnloop", falco_special_air_n_loop_game) - .acmd("game_specialairsend", falco_special_air_s_end_game) - .acmd("game_specialhiholdair", falco_special_hi_hold) - .acmd("game_specialhi", falco_special_hi_game) - .acmd("game_speciallw", falco_special_lw_game) - .acmd("game_specialairlw", falco_special_air_lw_game) - .acmd("effect_speciallw", falco_special_lw_effect) - .acmd("effect_specialairlw", falco_special_lw_effect) - .acmd("expression_speciallw", falco_special_lw_expression) - .acmd("expression_specialairlw", falco_special_lw_expression) - .acmd("sound_speciallw", falco_special_lw_sound) - .acmd("sound_specialairlw", falco_special_air_lw_sound) - .acmd("game_speciallwloop", game_speciallwloop) - .acmd("game_specialairlwloop", game_specialairlwloop) - .acmd("effect_speciallwloop", effect_speciallwloop) - .acmd("effect_specialairlwloop", effect_speciallwloop) - .acmd("sound_speciallwloop", sound_speciallwloop) - .acmd("sound_specialairlwloop", sound_speciallwloop) - .acmd("expression_speciallwloop", expression_speciallwloop) - .acmd("expression_specialairlwloop", expression_speciallwloop) - .acmd("game_speciallwend", game_speciallwend) - .acmd("game_specialairlwend", game_speciallwend) - .acmd("effect_speciallwend", effect_speciallwend) - .acmd("effect_specialairlwend", effect_speciallwend) - .acmd("sound_speciallwend", sound_speciallwend) - .acmd("sound_specialairlwend", sound_speciallwend) - .acmd("expression_speciallwend", expression_speciallwend) - .acmd("expression_specialairlwend", expression_speciallwend) - .acmd("sound_specialnstart", falco_special_n_start_sound) - .acmd("sound_specialairnstart", falco_special_air_n_start_sound) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnstart", game_specialairnstart); + agent.acmd("game_specialairnloop", game_specialairnloop); + + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhiholdair", game_specialhiholdair); + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_specialairlw); + agent.acmd("game_speciallwloop", game_speciallwloop); + agent.acmd("game_specialairlwloop", game_specialairlwloop); + agent.acmd("effect_speciallwloop", effect_speciallwloop); + agent.acmd("effect_specialairlwloop", effect_speciallwloop); + agent.acmd("sound_speciallwloop", sound_speciallwloop); + agent.acmd("sound_specialairlwloop", sound_speciallwloop); + agent.acmd("expression_speciallwloop", expression_speciallwloop); + agent.acmd("expression_specialairlwloop", expression_speciallwloop); + agent.acmd("game_speciallwend", stub); + agent.acmd("game_specialairlwend", stub); + agent.acmd("effect_speciallwend", stub); + agent.acmd("effect_specialairlwend", stub); + agent.acmd("sound_speciallwend", stub); + agent.acmd("sound_specialairlwend", stub); + agent.acmd("expression_speciallwend", expression_speciallwend); + agent.acmd("expression_specialairlwend", expression_speciallwend); + agent.acmd("sound_specialnstart", sound_specialnstart); + agent.acmd("sound_specialairnstart", sound_specialnstart); } diff --git a/fighters/falco/src/acmd/throws.rs b/fighters/falco/src/acmd/throws.rs index 52a62c5b5a..db3e4dde07 100644 --- a/fighters/falco/src/acmd/throws.rs +++ b/fighters/falco/src/acmd/throws.rs @@ -1,95 +1,70 @@ - use super::*; -unsafe extern "C" fn falco_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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("trans"), 4.1, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 falco_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("trans"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 falco_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, -4.0, Some(0.0), Some(7.2), Some(-14.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, -4.0, Some(0.0), Some(7.2), Some(-14.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 falco_blaster_bullet_flythrowhi_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn falco_blaster_bullet_flythrowb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -pub fn install() { - smashline::Agent::new("falco_blaster_bullet") - .acmd("game_flythrowhi", falco_blaster_bullet_flythrowhi_game) - .acmd("game_flythrowb", falco_blaster_bullet_flythrowb_game) - .install(); - smashline::Agent::new("falco") - .acmd("game_catch", falco_catch_game) - .acmd("game_catchdash", falco_catch_dash_game) - .acmd("game_catchturn", falco_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/falco/src/acmd/tilts.rs b/fighters/falco/src/acmd/tilts.rs index db58cbc631..bd064356d5 100644 --- a/fighters/falco/src/acmd/tilts.rs +++ b/fighters/falco/src/acmd/tilts.rs @@ -1,145 +1,142 @@ - use super::*; -unsafe extern "C" fn falco_attack_hi3_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.400) - } - frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000) - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 135, 100, 100, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - } +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.5, 95, 100, 50, 0, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.5, 95, 100, 50, 0, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.5, 367, 100, 40, 0, 6.0, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 75, 215, 0, 20, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 7.0, 6.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } - frame(lua_state,18.0); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 1.200) + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - -} +} -unsafe extern "C" fn falco_attack_s3hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_s3lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent){ + FT_MOTION_RATE(agent,1.400) + } + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000) + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 135, 100, 100, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.5, 95, 100, 50, 0, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.5, 95, 100, 50, 0, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.5, 367, 100, 40, 0, 6.0, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } -} + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 75, 215, 0, 20, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 7.0, 6.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 17.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + AttackModule::clear_all(boma); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + } + frame(lua_state,18.0); + if is_excute(agent){ + FT_MOTION_RATE(agent, 1.200) + } +} -unsafe extern "C" fn falco_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 11.0, 75, 140, 0, 25, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 10.5, 75, 140, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 10.0, 75, 140, 0, 25, 2.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 11.0, 75, 140, 0, 25, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 10.5, 75, 140, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 10.0, 75, 140, 0, 25, 2.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 12.0/(28.0-20.0)); + FT_MOTION_RATE(agent, 12.0/(28.0-20.0)); frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("falco_arc"), Hash40::new("top"), 0, 3, 4.3, 0, -20, 188, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("falco_arc"), Hash40::new("top"), 0, 3, 4.3, 0, -20, 188, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attackhi3", falco_attack_hi3_game) - .acmd("game_attacks3hi", falco_attack_s3hi_game) - .acmd("game_attacks3", falco_attack_s3_game) - .acmd("game_attacks3lw", falco_attack_s3lw_game) - .acmd("game_attacklw3", falco_attack_lw3_game) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/falco/src/blaster_bullet/acmd.rs b/fighters/falco/src/blaster_bullet/acmd.rs new file mode 100644 index 0000000000..d4f4b9d96a --- /dev/null +++ b/fighters/falco/src/blaster_bullet/acmd.rs @@ -0,0 +1,50 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + + agent.acmd("game_flythrowhi", game_flythrowhi); + + agent.acmd("game_flythrowb", game_flythrowb); +} diff --git a/fighters/falco/src/blaster_bullet/mod.rs b/fighters/falco/src/blaster_bullet/mod.rs new file mode 100644 index 0000000000..86dba5b5e2 --- /dev/null +++ b/fighters/falco/src/blaster_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("falco_blaster_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/falco/src/illusion/acmd.rs b/fighters/falco/src/illusion/acmd.rs new file mode 100644 index 0000000000..9fc59cd0b6 --- /dev/null +++ b/fighters/falco/src/illusion/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_moveair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_moveair", game_moveair); +} diff --git a/fighters/falco/src/illusion/mod.rs b/fighters/falco/src/illusion/mod.rs new file mode 100644 index 0000000000..77c9df33ac --- /dev/null +++ b/fighters/falco/src/illusion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("falco_illusion"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/falco/src/lib.rs b/fighters/falco/src/lib.rs index 8e2ddcc726..51ab638a94 100644 --- a/fighters/falco/src/lib.rs +++ b/fighters/falco/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod blaster_bullet; +mod illusion; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("falco"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + blaster_bullet::install(); + illusion::install(); } diff --git a/fighters/falco/src/opff.rs b/fighters/falco/src/opff.rs index 4ed5eaf7ff..e040b5ee31 100644 --- a/fighters/falco/src/opff.rs +++ b/fighters/falco/src/opff.rs @@ -89,8 +89,6 @@ pub unsafe fn falco_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("falco") - .on_line(Main, falco_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, falco_frame_wrapper); } diff --git a/fighters/falco/src/status.rs b/fighters/falco/src/status/mod.rs similarity index 56% rename from fighters/falco/src/status.rs rename to fighters/falco/src/status/mod.rs index 9905e869cf..ca34a95e77 100644 --- a/fighters/falco/src/status.rs +++ b/fighters/falco/src/status/mod.rs @@ -14,17 +14,14 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn falco_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_FALCO { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); - smashline::Agent::new("falco").on_start(falco_init).install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); } diff --git a/fighters/falco/src/status/special_hi.rs b/fighters/falco/src/status/special_hi.rs index dc6b65dedd..4245c49ef2 100644 --- a/fighters/falco/src/status/special_hi.rs +++ b/fighters/falco/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI @@ -49,18 +48,8 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("falco") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - Main, - *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .status( - End, - *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status( Main, *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); + agent.status(End, *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); } diff --git a/fighters/falco/src/status/special_lw.rs b/fighters/falco/src/status/special_lw.rs index 6f0c49287c..908ddbef4c 100644 --- a/fighters/falco/src/status/special_lw.rs +++ b/fighters/falco/src/status/special_lw.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -31,8 +32,6 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -// FIGHTER_STATUS_KIND_SPECIAL_LW - unsafe extern "C" fn special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { // Returning here allows for running shine @@ -449,21 +448,20 @@ unsafe extern "C" fn special_lw_end_exec(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("falco") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_exec) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status(Pre, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_pre) - .status(Init, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_init) - .status(Main, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_main) - .status(Exec, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_exec) - .status(End, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_end) - .status(Pre, statuses::falco::SPECIAL_LW_END, special_lw_end_pre) - .status(Main, statuses::falco::SPECIAL_LW_END, special_lw_end_main) - .status(Exec, statuses::falco::SPECIAL_LW_END, special_lw_end_exec) - .status(End, statuses::falco::SPECIAL_LW_END, special_lw_end_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_exec); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + + agent.status(Pre, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_pre); + agent.status(Init, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_init); + agent.status(Main, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_main); + agent.status(Exec, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_exec); + agent.status(End, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_end); + agent.status(Pre, statuses::falco::SPECIAL_LW_END, special_lw_end_pre); + agent.status(Main, statuses::falco::SPECIAL_LW_END, special_lw_end_main); + agent.status(Exec, statuses::falco::SPECIAL_LW_END, special_lw_end_exec); + agent.status(End, statuses::falco::SPECIAL_LW_END, special_lw_end_end); } diff --git a/fighters/falco/src/status/special_s.rs b/fighters/falco/src/status/special_s.rs index 910fbc4b18..08e4a4dfec 100644 --- a/fighters/falco/src/status/special_s.rs +++ b/fighters/falco/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_FALCO_ILLUSION_STATUS_WORK_ID_FLAG_CONTINUE); @@ -560,9 +561,7 @@ pub unsafe extern "C" fn special_s_air_control(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("falco") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec); +} \ No newline at end of file diff --git a/fighters/fox/src/acmd/aerials.rs b/fighters/fox/src/acmd/aerials.rs index f7a2b83675..8e81aff4e3 100644 --- a/fighters/fox/src/acmd/aerials.rs +++ b/fighters/fox/src/acmd/aerials.rs @@ -1,384 +1,379 @@ use super::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.850); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.850); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed1 = Vector3f{ x: 0.0, y: 0.3, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed2 = Vector3f{ x: 0.0, y: 1.1, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed2); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed3 = Vector3f{ x: 0.0, y: 0.9, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed3); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed4 = Vector3f{ x: 0.0, y: 0.4, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed4); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.5, 5.1, -0.8, 1.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.5, 5.1, -0.8, 1.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_FOX_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 0, 15, 220, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 0, 115, 220, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 0, 15, 220, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 0, 115, 220, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.7, 2, 8, 25, 195, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.7, 2, 8, 125, 195, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.7, 2, 8, 25, 195, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.7, 2, 8, 125, 195, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 5, 20, 205, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, 5, 120, 205, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 5, 20, 205, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, 5, 120, 205, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 13, 25, 205, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 13, 115, 205, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.3); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 13, 25, 205, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 13, 115, 205, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 23, 7, 200, 1.2, true); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, -23, 180, 180, 1.1, true); - //LAST_EFFECT_SET_ALPHA(fighter, 0.6); - //LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 23, 7, 200, 1.2, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, -23, 180, 180, 1.1, true); + //LAST_EFFECT_SET_ALPHA(agent, 0.6); + //LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } -unsafe extern "C" fn game_landingairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_FOX_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK) { AttackModule::clear_all(boma); } } - } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2.0, 8.0, -3.5, 23, 120, 220, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2.0, 8.0, -3.5, 23, 120, 220, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 6.5, -12.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true, 0.65); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 6.5, -12.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true, 0.65); + LAST_EFFECT_SET_RATE(agent, 1.3); } - } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_fox_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_fox_swing_m")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_fox_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_fox_swing_m")); } - } -unsafe extern "C" fn expression_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 85, 125, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 85, 125, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_landingairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("effect_attackairf", effect_attackairf) - .acmd("game_landingairf", game_landingairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_landingairlw", game_landingairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_landingairf", game_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/fox/src/acmd/ground.rs b/fighters/fox/src/acmd/ground.rs index bfd2085786..e592e274c0 100644 --- a/fighters/fox/src/acmd/ground.rs +++ b/fighters/fox/src/acmd/ground.rs @@ -1,76 +1,72 @@ - use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 70, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 70, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 70, 95, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 70, 95, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 70, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 70, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/fox/src/acmd/mod.rs b/fighters/fox/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/fox/src/acmd/mod.rs +++ b/fighters/fox/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index d44f988acb..eb3fed17dc 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -1,203 +1,123 @@ - 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_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_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(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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_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_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_fox_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_fox_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_fox_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_fox_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_fox_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_fox_step_right_m")); } } -unsafe extern "C" fn 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, 12.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("fox") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/fox/src/acmd/smashes.rs b/fighters/fox/src/acmd/smashes.rs index 2e1fd409d3..ab311f0606 100644 --- a/fighters/fox/src/acmd/smashes.rs +++ b/fighters/fox/src/acmd/smashes.rs @@ -1,149 +1,145 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 103, 0, 28, 3.7, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 15.0, 361, 103, 0, 28, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 15.0, 361, 103, 0, 28, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 103, 0, 28, 3.7, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 15.0, 361, 103, 0, 28, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 15.0, 361, 103, 0, 28, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 103, 0, 30, 3.5, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 103, 0, 30, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 361, 103, 0, 30, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 103, 0, 30, 3.5, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 103, 0, 30, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 361, 103, 0, 30, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 4.6, 3.0, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 80, 111, 0, 30, 3.8, 0.0, 5.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 4.6, 3.0, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 80, 111, 0, 30, 3.8, 0.0, 5.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.8, 2.9, 1.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.8, 2.9, 1.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.7); - + FT_MOTION_RATE(agent, 0.7); } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("fox_smash_arc"), Hash40::new("top"), 0, 12.2, 1.2, 0, 60, 90, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("fox_smash_arc"), Hash40::new("top"), 0, 12.2, 1.2, 0, 60, 90, 0.9, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn expression_attackhi4(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_attackhi4(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); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("toer"), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/fox/src/acmd/specials.rs b/fighters/fox/src/acmd/specials.rs index 5a4f84b157..f7f027adc3 100644 --- a/fighters/fox/src/acmd/specials.rs +++ b/fighters/fox/src/acmd/specials.rs @@ -1,177 +1,150 @@ - use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 20.0/25.0); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 20.0/25.0); } -unsafe extern "C" fn game_specialairsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - -} - -unsafe extern "C" fn game_specialhihold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 20.0); - for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - } - } -unsafe extern "C" fn game_specialhiholdair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhihold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 16.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); } frame(lua_state, 20.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 16.0, 60, 60, 0, 70, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 16.0, 60, 60, 0, 70, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 60, 50, 0, 85, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 60, 50, 0, 85, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn sound_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let rng = app::sv_math::rand(smash::hash40("fighter"), 2); let sound = if rng == 0 { "vc_fox_special_h01" } else { "vc_fox_attack06" }; - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new(sound)); - PLAY_SE(fighter, Hash40::new("se_fox_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new(sound)); + PLAY_SE(agent, Hash40::new("se_fox_special_h02")); } } -unsafe extern "C" fn game_speciallwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 360, 100, 80, 0, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 24, 24, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 360, 100, 80, 0, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 24, 24, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame_revised(boma, 0, -3.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("sys_hit_elec")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("sys_hit_elec")); ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.54); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.54); } frame(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairlwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("fox_ref_loop"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("fox_ref_ref"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 0.5, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn sound_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); + } +} + +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 10, 32, 0, 62, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 24, 45, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 10, 32, 0, 62, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 24, 45, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("sys_hit_elec")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("sys_hit_elec")); ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.54); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.54); } frame(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specialairlwstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("fox_ref_loop"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("fox_ref_ref"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 0.5, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); -unsafe extern "C" fn sound_speciallwstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); - } -} + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhihold", game_specialhihold); + agent.acmd("game_specialhiholdair", game_specialhihold); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specialairsend", game_specialairsend) - .acmd("game_specialhihold", game_specialhihold) - .acmd("game_specialhiholdair", game_specialhiholdair) - .acmd("game_specialhi", game_specialhi) - .acmd("sound_specialhi", sound_specialhi) - .acmd("game_speciallwstart", game_speciallwstart) - .acmd("game_specialairlwstart", game_specialairlwstart) - .acmd("effect_speciallwstart", effect_specialairlwstart) - .acmd("effect_specialairlwstart", effect_specialairlwstart) - .acmd("sound_speciallwstart", sound_speciallwstart) - .acmd("sound_specialairlwstart", sound_speciallwstart) - .install(); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("sound_speciallwstart", sound_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("sound_specialairlwstart", sound_speciallwstart); } diff --git a/fighters/fox/src/acmd/throws.rs b/fighters/fox/src/acmd/throws.rs index 30a8c8bc5e..b98ad5e56a 100644 --- a/fighters/fox/src/acmd/throws.rs +++ b/fighters/fox/src/acmd/throws.rs @@ -1,184 +1,179 @@ - use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 56, 85, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 56, 85, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 8, 6); + CHECK_FINISH_CAMERA(agent, 8, 6); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.3); //FighterCutInManager::set_throw_finish_offset(boma, 3, 1, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("close"), false, 0.0); } - FT_MOTION_RATE(fighter, 16.0/(50.0-24.0)); + FT_MOTION_RATE(agent, 16.0/(50.0-24.0)); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(5.0-1.0)); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 90, 110, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(5.0-1.0)); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 90, 110, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 20); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.6); //FighterCutInManager::set_throw_finish_offset(boma, 0, 4, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("close"), false, 0.0); } - FT_MOTION_RATE(fighter, 7.0/(31.0-27.0)); + FT_MOTION_RATE(agent, 7.0/(31.0-27.0)); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/fox/src/acmd/tilts.rs b/fighters/fox/src/acmd/tilts.rs index f92432c803..ab9c4da3f0 100644 --- a/fighters/fox/src/acmd/tilts.rs +++ b/fighters/fox/src/acmd/tilts.rs @@ -1,162 +1,156 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn expression_attacks3(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_L); +unsafe extern "C" fn expression_attacks3(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_L); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(2.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(2.5-1.0)); } frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.0-2.5)); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 7.0, 80, 130, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 130, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 84, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 110, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.0-2.5)); + ATTACK(agent, 3, 0, Hash40::new("legr"), 7.0, 80, 130, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 130, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 84, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 110, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(28.0-7.0)); + FT_MOTION_RATE(agent, 18.0/(28.0-7.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn expression_attackhi3(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_L); +unsafe extern "C" fn expression_attackhi3(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_L); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 10.0, 70, 120, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 10.0, 80, 120, 0, 25, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 10.0, 90, 120, 0, 25, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 10.0, 70, 120, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 10.0, 80, 120, 0, 25, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 10.0, 90, 120, 0, 25, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); //AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); //AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); //AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 19.0/(27.0-10.0)); + FT_MOTION_RATE(agent, 19.0/(27.0-10.0)); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("expression_attacks3hi", expression_attacks3) - .acmd("expression_attacks3", expression_attacks3) - .acmd("expression_attacks3lw", expression_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("expression_attackhi3", expression_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/fox/src/lib.rs b/fighters/fox/src/lib.rs index 8e2ddcc726..bfb731b631 100644 --- a/fighters/fox/src/lib.rs +++ b/fighters/fox/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("fox"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/fox/src/opff.rs b/fighters/fox/src/opff.rs index 185c805460..5d817bdf69 100644 --- a/fighters/fox/src/opff.rs +++ b/fighters/fox/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { @@ -26,12 +25,10 @@ unsafe fn shine_jump_cancel(fighter: &mut L2CFighterCommon) { // Utaunt cancel into Fire Fox unsafe fn utaunt_cancel_fire_fox(boma: &mut BattleObjectModuleAccessor, motion_kind: u64, frame: f32) { - if motion_kind == hash40("appeal_hi_r") || motion_kind == hash40("appeal_hi_l") { - if frame > 41.0 && frame < 44.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH, false); - } - } + if motion_kind == (hash40("appeal_hi_r") | hash40("appeal_hi_l")) + && frame > 41.0 && frame < 44.0 + && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH, false); } } @@ -42,6 +39,13 @@ unsafe fn firefox_startup_ledgegrab(fighter: &mut L2CFighterCommon) { } } +unsafe fn frame_data(boma: &mut BattleObjectModuleAccessor, motion_kind: u64, frame: f32) { + if motion_kind == hash40("throw_hi") + && frame >= 10.0 { + MotionModule::set_rate(boma, 1.8); + } +} + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -49,9 +53,7 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, - - ]) + *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND ]) && fighter.is_situation(*SITUATION_KIND_AIR) { fighter.sub_air_check_dive(); if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { @@ -75,23 +77,12 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { } pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); shine_jump_cancel(fighter); utaunt_cancel_fire_fox(boma, motion_kind, frame); firefox_startup_ledgegrab(fighter); + frame_data(boma, motion_kind, frame); fastfall_specials(fighter); - - // Frame Data - frame_data(boma, status_kind, motion_kind, frame); -} - -unsafe fn frame_data(boma: &mut BattleObjectModuleAccessor, status_kind: i32, motion_kind: u64, frame: f32) { - if motion_kind == hash40("throw_hi") { - if frame >= 10.0 { - MotionModule::set_rate(boma, 1.8); - } - } } pub extern "C" fn fox_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -107,8 +98,6 @@ pub unsafe fn fox_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("fox") - .on_line(Main, fox_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, fox_frame_wrapper); } diff --git a/fighters/fox/src/status.rs b/fighters/fox/src/status.rs deleted file mode 100644 index ee9a974345..0000000000 --- a/fighters/fox/src/status.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -mod special_s; -mod special_hi; -mod special_lw; - -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); -} diff --git a/fighters/fox/src/status/mod.rs b/fighters/fox/src/status/mod.rs new file mode 100644 index 0000000000..301a8a285b --- /dev/null +++ b/fighters/fox/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_hi.rs b/fighters/fox/src/status/special_hi.rs index 805e1b3fb5..912a168480 100644 --- a/fighters/fox/src/status/special_hi.rs +++ b/fighters/fox/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI @@ -49,18 +48,8 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("fox") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - Main, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .status( - End, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); + agent.status(End, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_lw.rs b/fighters/fox/src/status/special_lw.rs index ce393837f3..09c5dbbed5 100644 --- a/fighters/fox/src/status/special_lw.rs +++ b/fighters/fox/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_LW @@ -117,15 +116,9 @@ pub unsafe extern "C" fn special_lw_loop_end(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("fox") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status( - End, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, - special_lw_loop_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(End, *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, special_lw_loop_end); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_s.rs b/fighters/fox/src/status/special_s.rs index 6ff1679722..db9db2b9be 100644 --- a/fighters/fox/src/status/special_s.rs +++ b/fighters/fox/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_FOX_ILLUSION_STATUS_WORK_ID_FLAG_CONTINUE); @@ -560,9 +561,7 @@ pub unsafe extern "C" fn special_s_air_control(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("fox") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/acmd/aerials.rs b/fighters/gamewatch/src/acmd/aerials.rs index 74df7018c2..e8197fc324 100644 --- a/fighters/gamewatch/src/acmd/aerials.rs +++ b/fighters/gamewatch/src/acmd/aerials.rs @@ -1,349 +1,327 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_TROPICALFISH, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_n"), false, 0.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 19.4, 4.4, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 18.6, -2.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 19.4, 4.4, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 18.6, -2.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 225, 100, 35, 0, 4.5, 0.0, 20.799999, 10.8, Some(0.0), Some(21.0), Some(9.6), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 215, 100, 35, 0, 4.5, 0.0, 17.9, -8.8, Some(0.0), Some(18.299999), Some(-7.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 225, 100, 35, 0, 4.5, 0.0, 20.799999, 10.8, Some(0.0), Some(21.0), Some(9.6), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 215, 100, 35, 0, 4.5, 0.0, 17.9, -8.8, Some(0.0), Some(18.299999), Some(-7.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 160, 100, 35, 0, 4.75, 0.0, 12.4, 13.3, Some(0.0), Some(13.6), Some(13.1), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 155, 100, 35, 0, 4.75, 0.0, 11.0, -9.9, Some(0.0), Some(12.0), Some(-9.7), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 160, 100, 35, 0, 4.75, 0.0, 12.4, 13.3, Some(0.0), Some(13.6), Some(13.1), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 155, 100, 35, 0, 4.75, 0.0, 11.0, -9.9, Some(0.0), Some(12.0), Some(-9.7), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 2.0, 0.0, 11.0, 3.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 8.5, 0.0, 9.0, 1.8, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, 12.8, Some(0.0), Some(1.5), Some(12.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, -9.0, Some(0.0), Some(1.5), Some(-9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 2.0, 0.0, 11.0, 3.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 8.5, 0.0, 9.0, 1.8, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, 12.8, Some(0.0), Some(1.5), Some(12.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, -9.0, Some(0.0), Some(1.5), Some(-9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gamewatch_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_f"), false, -1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 6.0, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 5.2, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 6.0, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 5.2, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn gamewatch_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn gamewatch_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gamewatch_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_TURTLE, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_b"), false, 1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.2, 0.0, 3.5, -14.3, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 1.8, -8.0, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.2, 0.0, 3.5, -14.3, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 1.8, -8.0, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 6.0, 0.0, 3.5, -14.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 4.5, 0.0, 1.8, -8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 6.0, 0.0, 3.5, -14.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 4.5, 0.0, 1.8, -8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn gamewatch_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("landing_air_b"), false, 1.0); } - } -unsafe extern "C" fn gamewatch_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_BREATH, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 6.0, 2.0, 20.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 5.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 6.0, 2.0, 20.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 5.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 42.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 42.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_BREATH, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn gamewatch_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_wave08_mi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_wave08_mi")); } } -unsafe extern "C" fn gamewatch_breath_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn gamewatch_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("head") as i64, hash40("head_sparky") as i64); VisibilityModule::set_int64(boma, hash40("hand") as i64, hash40("hand_hold_lr") as i64); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gamewatch_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.0, 0.0, -2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.0, 0.0, -2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gamewatch_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn gamewatch_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("head").hash as i64, Hash40::new("head_close").hash as i64); VisibilityModule::set_int64(boma, Hash40::new("hand").hash as i64, Hash40::new("hand_hold_lr").hash as i64); VisibilityModule::set_int64(boma, Hash40::new("lhand").hash as i64, Hash40::new("lhand_key").hash as i64); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *DAMAGE_NO_REACTION_MODE_NORMAL, *WEAPON_INKLING_ROLLER_INSTANCE_WORK_ID_FLOAT_B); + slope!(agent, *DAMAGE_NO_REACTION_MODE_NORMAL, *WEAPON_INKLING_ROLLER_INSTANCE_WORK_ID_FLOAT_B); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, 0 as u32); } - } -pub fn install() { - smashline::Agent::new("gamewatch_breath") - .acmd("game_attackairhi", gamewatch_breath_attack_air_hi_game) - .install(); - smashline::Agent::new("gamewatch") - .acmd("game_attackairn", gamewatch_attack_air_n_game) - .acmd("game_attackairf", gamewatch_attack_air_f_game) - .acmd("game_landingairf", gamewatch_landing_air_f_game) - .acmd("expression_attackairf", gamewatch_attack_air_f_expression) - .acmd("game_attackairb", gamewatch_attack_air_b_game) - .acmd("game_landingairb", gamewatch_landing_air_b_game) - .acmd("game_attackairhi", gamewatch_attack_air_hi_game) - .acmd("sound_attackairhi", gamewatch_attack_air_hi_sound) - .acmd("expression_attackairhi", gamewatch_attack_air_hi_expression) - .acmd("game_attackairlw", gamewatch_attack_air_lw_game) - .acmd("game_landingairlw", gamewatch_landing_air_lw_game) - .acmd( - "expression_landingairlw", - gamewatch_landing_air_lw_expression, - ) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/gamewatch/src/acmd/ground.rs b/fighters/gamewatch/src/acmd/ground.rs index 11700a7ed1..9f2b1a68c1 100644 --- a/fighters/gamewatch/src/acmd/ground.rs +++ b/fighters/gamewatch/src/acmd/ground.rs @@ -1,83 +1,80 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_SPRAY, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_11"), false, -1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 3.8, 0.0, 5.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 4.3, 0.0, 5.2, 13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 3.8, 0.0, 5.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 4.3, 0.0, 5.2, 13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn gamewatch_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_100_end"), false, -1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 6.0, 0.0, 9.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 4.0, 0.0, 1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 6.0, 0.0, 9.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 4.0, 0.0, 1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.6); - if is_excute(fighter) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.6); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 4.0); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 70, 0, 50, 6.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 70, 0, 50, 6.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 120, 60, 0, 65, 5.5, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 120, 60, 0, 65, 5.5, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attack11", gamewatch_attack_11_game) - .acmd("game_attack100end", gamewatch_attack_100_end_game) - .acmd("game_attackdash", gamewatch_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gamewatch/src/acmd/mod.rs b/fighters/gamewatch/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/gamewatch/src/acmd/mod.rs +++ b/fighters/gamewatch/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/acmd/other.rs b/fighters/gamewatch/src/acmd/other.rs index 312906ac34..745ce5f868 100644 --- a/fighters/gamewatch/src/acmd/other.rs +++ b/fighters/gamewatch/src/acmd/other.rs @@ -1,128 +1,124 @@ - use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_gamewatch_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gamewatch_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, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_step_right_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_step_left_m")); } } -unsafe extern "C" fn 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, 12.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 sound_appealhil(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_special_s01")); +unsafe extern "C" fn sound_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_special_s01")); } } -unsafe extern "C" fn sound_appealhir(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_special_s01")); +unsafe extern "C" fn sound_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_special_s01")); } } -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 game_down(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_down(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); frame(lua_state, end_frame); - if is_excute(fighter) { - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0); + if is_excute(agent) { + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0); } - } -unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appealhil", sound_appealhil) - .acmd("sound_appealhir", sound_appealhir) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_downforwardd", game_down) - .acmd("game_downforwardu", game_down) - .acmd("game_downbackd", game_down) - .acmd("game_downbacku", game_down) - .acmd("game_passivestandf", game_passive) - .acmd("game_passivestandb", game_passive) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("sound_appealhil", sound_appealhil); + agent.acmd("sound_appealhir", sound_appealhir); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("game_downforwardd", game_down); + agent.acmd("game_downforwardu", game_down); + + agent.acmd("game_downbackd", game_down); + agent.acmd("game_downbacku", game_down); + + agent.acmd("game_passivestandf", game_passive); + agent.acmd("game_passivestandb", game_passive); } diff --git a/fighters/gamewatch/src/acmd/smashes.rs b/fighters/gamewatch/src/acmd/smashes.rs index 389f24715b..2cbbec8953 100644 --- a/fighters/gamewatch/src/acmd/smashes.rs +++ b/fighters/gamewatch/src/acmd/smashes.rs @@ -1,90 +1,87 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 5.3, 0.0, 7.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 5.3, 0.0, 7.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 4.3, 0.0, 7.8, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 4.3, 0.0, 7.8, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 43.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 32.0, 43.0, 21.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 21.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, Some(0.0), Some(8.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, Some(0.0), Some(8.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 13.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 20, 80, 0, 30, 4.5, 0.0, 3.6, -5.0, Some(0.0), Some(3.6), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, -14.2, Some(0.0), Some(3.6), Some(-12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, 14.2, Some(0.0), Some(3.6), Some(12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 20, 80, 0, 30, 4.5, 0.0, 3.6, -5.0, Some(0.0), Some(3.6), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, -14.2, Some(0.0), Some(3.6), Some(-12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, 14.2, Some(0.0), Some(3.6), Some(12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 36.0, 24.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 36.0, 24.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attacks4", gamewatch_attack_s4_game) - .acmd("game_attackhi4", gamewatch_attack_hi4_game) - .acmd("game_attackhi4r", gamewatch_attack_hi4_game) - .acmd("game_attacklw4", gamewatch_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4r", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gamewatch/src/acmd/specials.rs b/fighters/gamewatch/src/acmd/specials.rs index 94319a2b26..abab9d2ead 100644 --- a/fighters/gamewatch/src/acmd/specials.rs +++ b/fighters/gamewatch/src/acmd/specials.rs @@ -1,437 +1,369 @@ use super::*; -unsafe extern "C" fn gamewatch_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 9.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_SHOOT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 4.2, 0.0, 8.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 3.2, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 4.2, 0.0, 8.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 3.2, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute (fighter) { + if is_excute (agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_COUNT_ENABLE); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_RAPID_CHECK); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_LOOP_CHECK); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_COUNT_CHECK); } } -unsafe extern "C" fn gamewatch_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 9.0, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_WORK_FLOAT_DAMAGE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s5_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 60, 0, 15, 6.0, 0.0, 10.6, 8.9, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 70, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 60, 0, 15, 6.0, 0.0, 10.6, 8.9, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 70, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if(is_excute(fighter)) { + if(is_excute(agent)) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s6_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials6(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s7_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials7(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - FT_ADD_DAMAGE(fighter, -9.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + FT_ADD_DAMAGE(agent, -9.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_s8_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s9_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials9(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gamewatch_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 5.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 23, 0, 134, 5.0, 0.0, 5.5, 6.0, Some(0.0), Some(5.5), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 23, 0, 134, 5.0, 0.0, 5.5, 6.0, Some(0.0), Some(5.5), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 6.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("waist"), 6.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_DECIDE_DIRECTION); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); } frame(lua_state, 14.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 4.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("waist"), 4.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 33.0); - FT_MOTION_RATE_RANGE(fighter, 33.0, 43.0, 12.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 33.0, 43.0, 12.0); + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gamewatch_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_attach_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_bounce"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("head") as i64, hash40("head_close") as i64); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn gamewatch_special_hi_open_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, Hash40::new("special_hi_open"), false, -1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 104, 0, 20, 11.22, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 104, 0, 20, 11.22, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - FT_MOTION_RATE_RANGE(fighter, 30.0, 45.0, 10.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 10.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gamewatch_special_hi_open_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhiopen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_wave10_hi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_wave10_hi")); } frame(lua_state, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_gamewatch_wave10_hi")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_gamewatch_wave10_hi")); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = SoundModule::play_se(boma, Hash40::new("se_gamewatch_wave03_mi"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 1.25, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_gamewatch_wave03_mi")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_gamewatch_wave03_mi")); } } -unsafe extern "C" fn gamewatch_special_hi_open_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhiopen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn gamewatch_parachute_special_hi_open_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("para3") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("para4") as i64, hash40("on") as i64); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); -unsafe extern "C" fn gamewatch_rescue_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 11.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } -} - -unsafe extern "C" fn gamewatch_rescue_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 9.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } -} - -pub fn install() { - smashline::Agent::new("gamewatch_rescue") - .acmd("game_specialhi", gamewatch_rescue_special_hi_game) - .acmd("game_specialairhi", gamewatch_rescue_special_air_hi_game) - .install(); - smashline::Agent::new("gamewatch") - .acmd("game_specialn", gamewatch_special_n_game) - .acmd("game_specialairn", gamewatch_special_n_game) - .acmd("game_specials1", gamewatch_special_s1_game) - .acmd("game_specialairs1", gamewatch_special_s1_game) - .acmd("game_specials2", gamewatch_special_s2_game) - .acmd("game_specialairs2", gamewatch_special_s2_game) - .acmd("game_specials3", gamewatch_special_s3_game) - .acmd("game_specialairs3", gamewatch_special_s3_game) - .acmd("game_specials4", gamewatch_special_s4_game) - .acmd("game_specialairs4", gamewatch_special_s4_game) - .acmd("game_specials5", gamewatch_special_s5_game) - .acmd("game_specialairs5", gamewatch_special_s5_game) - .acmd("game_specials6", gamewatch_special_s6_game) - .acmd("game_specialairs6", gamewatch_special_s6_game) - .acmd("game_specials7", gamewatch_special_s7_game) - .acmd("game_specialairs7", gamewatch_special_s7_game) - .acmd("game_specials8", gamewatch_special_s8_game) - .acmd("game_specialairs8", gamewatch_special_s8_game) - .acmd("game_specials9", gamewatch_special_s9_game) - .acmd("game_specialairs9", gamewatch_special_s9_game) - .acmd("game_specialhi", gamewatch_special_hi_game) - .acmd("game_specialairhi", gamewatch_special_hi_game) - .acmd("expression_specialhi", gamewatch_special_hi_expression) - .acmd("expression_specialairhi", gamewatch_special_hi_expression) - .acmd("game_specialhiopen", gamewatch_special_hi_open_game) - .acmd("sound_specialhiopen", gamewatch_special_hi_open_sound) - .acmd( - "expression_specialhiopen", - gamewatch_special_hi_open_expression, - ) - .install(); - smashline::Agent::new("gamewatch_parachute") - .acmd( - "game_specialhiopen", - gamewatch_parachute_special_hi_open_game, - ) - .install(); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + agent.acmd("game_specials3", game_specials3); + agent.acmd("game_specialairs3", game_specials3); + agent.acmd("game_specials4", game_specials4); + agent.acmd("game_specialairs4", game_specials4); + agent.acmd("game_specials5", game_specials5); + agent.acmd("game_specialairs5", game_specials5); + agent.acmd("game_specials6", game_specials6); + agent.acmd("game_specialairs6", game_specials6); + agent.acmd("game_specials7", game_specials7); + agent.acmd("game_specialairs7", game_specials7); + agent.acmd("game_specials8", game_specials8); + agent.acmd("game_specialairs8", game_specials8); + agent.acmd("game_specials9", game_specials9); + agent.acmd("game_specialairs9", game_specials9); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("expression_specialairhi", expression_specialhi); + agent.acmd("game_specialhiopen", game_specialhiopen); + agent.acmd("sound_specialhiopen", sound_specialhiopen); + agent.acmd("expression_specialhiopen", expression_specialhiopen); } diff --git a/fighters/gamewatch/src/acmd/throws.rs b/fighters/gamewatch/src/acmd/throws.rs index 7ea9489c89..373d40af97 100644 --- a/fighters/gamewatch/src/acmd/throws.rs +++ b/fighters/gamewatch/src/acmd/throws.rs @@ -1,258 +1,251 @@ use super::*; -unsafe extern "C" fn gamewatch_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.22); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.22); + 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 gamewatch_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.06); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.06); + 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 gamewatch_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-15.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-15.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.037); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.037); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, 50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 6); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 12, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 12, 3); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 110, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 110, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 15); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 15); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 36.0); - if(is_excute(fighter)) { - FT_MOTION_RATE(fighter, 2.000); - } - + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 34.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: -9.912}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_catch", gamewatch_catch_game) - .acmd("game_catchdash", gamewatch_catch_dash_game) - .acmd("game_catchturn", gamewatch_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gamewatch/src/acmd/tilts.rs b/fighters/gamewatch/src/acmd/tilts.rs index e8d0ca1f8a..253cd37277 100644 --- a/fighters/gamewatch/src/acmd/tilts.rs +++ b/fighters/gamewatch/src/acmd/tilts.rs @@ -1,118 +1,115 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_CHAIR, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_s3"), false, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 35, 99, 0, 35, 4.0, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 103, 0, 35, 3.5, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 35, 99, 0, 35, 4.0, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 103, 0, 35, 3.5, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 3.3, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 2.8, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 3.3, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 2.8, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn gamewatch_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 16.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, 8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, 6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 10.0, 16.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, 8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, 6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 20.0, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE_RANGE(agent, 16.0, 20.0, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 21.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, -8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, -6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 20.0, 21.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, -8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, -6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_default_int64(boma, Hash40::new("lhand").hash as i64); } - } -unsafe extern "C" fn gamewatch_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_MANHOLE, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_lw3"), false, 1.0); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 11.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 11.0, 4.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, (11.0 - 6.0)/4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 90, 109, 0, 46, 3.5, 0.0, 4.2, 6.7, Some(0.0), Some(2.1), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 90, 109, 0, 46, 3.5, 0.0, 4.2, 6.7, Some(0.0), Some(2.1), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 16.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 11.0, 16.0, 4.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, (16.0 - 11.0)/4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 90, 100, 0, 36, 3.0, 0.0, 2.0, 8.7, Some(0.0), Some(4.3), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 90, 100, 0, 36, 3.0, 0.0, 2.0, 8.7, Some(0.0), Some(4.3), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attacks3", gamewatch_attack_s3_s_game) - .acmd("game_attackhi3", gamewatch_attack_hi3_game) - .acmd("game_attacklw3", gamewatch_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gamewatch/src/breath/acmd.rs b/fighters/gamewatch/src/breath/acmd.rs new file mode 100644 index 0000000000..144a6e40ce --- /dev/null +++ b/fighters/gamewatch/src/breath/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairhi", game_attackairhi); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/breath/mod.rs b/fighters/gamewatch/src/breath/mod.rs new file mode 100644 index 0000000000..e2c254c997 --- /dev/null +++ b/fighters/gamewatch/src/breath/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("gamewatch_breath"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/lib.rs b/fighters/gamewatch/src/lib.rs index 8e2ddcc726..0aa9743393 100644 --- a/fighters/gamewatch/src/lib.rs +++ b/fighters/gamewatch/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod breath; +mod parachute; +mod rescue; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("gamewatch"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + breath::install(); + parachute::install(); + rescue::install(); } diff --git a/fighters/gamewatch/src/opff.rs b/fighters/gamewatch/src/opff.rs index 56b602f466..a2fe8d4493 100644 --- a/fighters/gamewatch/src/opff.rs +++ b/fighters/gamewatch/src/opff.rs @@ -127,34 +127,6 @@ pub unsafe fn gamewatch_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -unsafe extern "C" fn box_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_GAMEWATCH_BOMB { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let gnw = utils::util::get_battle_object_from_id(owner_id); - let gnw_boma = &mut *(*gnw).module_accessor; - if gnw_boma.is_motion(Hash40::new("attack_air_f")) { - let gnw_fighter = utils::util::get_fighter_common_from_accessor(gnw_boma); - if let Some(info) = FrameInfo::update_and_get(gnw_fighter) { - if info.frame < 10.0 { - ModelModule::set_scale(weapon.module_accessor, 0.75); - } - else { - ModelModule::set_scale(weapon.module_accessor, 1.1); - } - } - } - } -} - -pub fn install() { - smashline::Agent::new("gamewatch") - .on_line(Main, gamewatch_frame_wrapper) - .install(); - - smashline::Agent::new("gamewatch_box") - .on_line(Main, box_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gamewatch_frame_wrapper); } diff --git a/fighters/gamewatch/src/parachute/acmd.rs b/fighters/gamewatch/src/parachute/acmd.rs new file mode 100644 index 0000000000..e8a0e047af --- /dev/null +++ b/fighters/gamewatch/src/parachute/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("para3") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("para4") as i64, hash40("on") as i64); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhiopen", game_specialhiopen); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/parachute/mod.rs b/fighters/gamewatch/src/parachute/mod.rs new file mode 100644 index 0000000000..9d3148af12 --- /dev/null +++ b/fighters/gamewatch/src/parachute/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("gamewatch_parachute"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/acmd.rs b/fighters/gamewatch/src/rescue/acmd.rs new file mode 100644 index 0000000000..378747a1de --- /dev/null +++ b/fighters/gamewatch/src/rescue/acmd.rs @@ -0,0 +1,44 @@ +use super::*; + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 11.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 9.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/mod.rs b/fighters/gamewatch/src/rescue/mod.rs new file mode 100644 index 0000000000..d04b13dac2 --- /dev/null +++ b/fighters/gamewatch/src/rescue/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("gamewatch_rescue"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/status.rs b/fighters/gamewatch/src/status/mod.rs similarity index 63% rename from fighters/gamewatch/src/status.rs rename to fighters/gamewatch/src/status/mod.rs index ae46aab00c..e8fa3b3eae 100644 --- a/fighters/gamewatch/src/status.rs +++ b/fighters/gamewatch/src/status/mod.rs @@ -45,23 +45,18 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn gamewatch_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_GAMEWATCH { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("gamewatch") - .on_start(gamewatch_init) - .install(); - special_hi::install(); - special_hi_open::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi::install(agent); + special_hi_open::install(agent); } diff --git a/fighters/gamewatch/src/status/special_hi.rs b/fighters/gamewatch/src/status/special_hi.rs index f44115b4c2..a56d18402e 100644 --- a/fighters/gamewatch/src/status/special_hi.rs +++ b/fighters/gamewatch/src/status/special_hi.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn gamewatch_special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_HI + +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false @@ -15,10 +16,10 @@ unsafe extern "C" fn gamewatch_special_hi_main(fighter: &mut L2CFighterCommon) - fighter.set_situation(SITUATION_KIND_AIR.into()); GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } - fighter.sub_shift_status_main(L2CValue::Ptr(gamewatch_special_hi_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe fn gamewatch_special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_transition_group_check_air_cliff(); if MotionModule::is_end(fighter.module_accessor) { let control = ControlModule::get_attack_air_kind(fighter.module_accessor); @@ -47,22 +48,12 @@ unsafe fn gamewatch_special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -unsafe extern "C" fn gamewatch_special_hi_exit(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_exit(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL); 0.into() } -pub fn install() { - smashline::Agent::new("gamewatch") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_HI, - gamewatch_special_hi_main, - ) - .status( - Exit, - *FIGHTER_STATUS_KIND_SPECIAL_HI, - gamewatch_special_hi_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status( Exit, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exit); } diff --git a/fighters/gamewatch/src/status/special_hi_open.rs b/fighters/gamewatch/src/status/special_hi_open.rs index 148459c8ab..d6b7a5d9dc 100644 --- a/fighters/gamewatch/src/status/special_hi_open.rs +++ b/fighters/gamewatch/src/status/special_hi_open.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::gamewatch::SPECIAL_HI_OPEN unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -63,10 +64,8 @@ unsafe extern "C" fn special_hi_open_exit(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("gamewatch") - .status(Pre, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_pre) - .status(Main, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_main) - .status(End, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_exit) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_pre); + agent.status(Main, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_main); + agent.status(End, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_exit); } diff --git a/fighters/ganon/src/acmd/aerials.rs b/fighters/ganon/src/acmd/aerials.rs index 31a0b2727f..98d2e36c51 100644 --- a/fighters/ganon/src/acmd/aerials.rs +++ b/fighters/ganon/src/acmd/aerials.rs @@ -1,264 +1,261 @@ - use super::*; -unsafe extern "C" fn ganon_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 65, 46, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 367, 50, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 65, 46, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 367, 50, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 6.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 5.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 361, 106, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 6.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 5.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 361, 106, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 5.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 5.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ganon_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11, 17, 0, 0, 0, 1.5, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11, 17, 0, 0, 0, 1.5, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 7.0, 0, -2.5, 0, 0, 0, 1.75, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 7.0, 0, -2.5, 0, 0, 0, 1.75, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } } -unsafe extern "C" fn ganon_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 18.0, 361, 97, 0, 20, 5.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 361, 97, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 18.0, 361, 97, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 18.0, 361, 97, 0, 20, 5.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 361, 97, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 18.0, 361, 97, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ganon_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_engokua_flash"), Hash40::new("haver"), -1, 0, 0.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_engokua_flash"), Hash40::new("haver"), -1, 0, 0.5, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua_flash"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua_flash"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 12, 6, 180, -180, 100, 1.2, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 12, 6, 180, -180, 100, 1.2, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn ganon_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.5, 361, 93, 0, 40, 5.0, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.5, 361, 93, 0, 40, 5.0, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.5, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.5, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ganon_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2.5, 14.7, -4.3, 35, 140, 50, 1.3, false); - // EFFECT_FOLLOW(fighter, Hash40::new("ganon_engokua"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2.5, 14.7, -4.3, 35, 140, 50, 1.3, false); + // EFFECT_FOLLOW(agent, Hash40::new("ganon_engokua"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, -17, 0, 0, 0, 1.5, true, 0.9); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, -17, 0, 0, 0, 1.5, true, 0.9); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); } // frame(lua_state, 13.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua"), false, true); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua"), false, true); // } } -unsafe extern "C" fn ganon_landing_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua"), false, true); +unsafe extern "C" fn effect_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua"), false, true); } } -unsafe extern "C" fn ganon_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 4.0/(7.5 - 3.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(7.5 - 3.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 13.0/(21.0 - 7.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 361, 100, 0, 35, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 35, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 13.0/(21.0 - 7.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 361, 100, 0, 35, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 35, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 30, 85, 0, 30, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 30, 85, 0, 30, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 30, 85, 0, 30, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 30, 85, 0, 30, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 0, 80, 0, 20, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 0, 80, 0, 20, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 0, 80, 0, 20, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 0, 80, 0, 20, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 14.0/(31.0 - 19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 14.0/(31.0 - 19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.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 ganon_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { //FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 4.5, 12.5, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 270, 100, 0, 50, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 100, 0, 50, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 270, 100, 0, 50, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 100, 0, 50, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 19.0, 270, 52, 0, 20, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 361, 100, 0, 20, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 19.0, 270, 52, 0, 20, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 361, 100, 0, 20, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 4.5, 12.5, 11); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attackairn", ganon_attack_air_n_game) - .acmd("effect_attackairn", ganon_attack_air_n_effect) - .acmd("game_attackairf", ganon_attack_air_f_game) - .acmd("effect_attackairf", ganon_attack_air_f_effect) - .acmd("game_attackairb", ganon_attack_air_b_game) - .acmd("effect_attackairb", ganon_attack_air_b_effect) - .acmd("effect_landingairb", ganon_landing_air_b_effect) - .acmd("game_attackairhi", ganon_attack_air_hi_game) - .acmd("expression_attackairhi", ganon_attack_air_hi_expression) - .acmd("game_attackairlw", ganon_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("effect_landingairb", effect_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ganon/src/acmd/ground.rs b/fighters/ganon/src/acmd/ground.rs index efb137d5db..20689fae69 100644 --- a/fighters/ganon/src/acmd/ground.rs +++ b/fighters/ganon/src/acmd/ground.rs @@ -1,88 +1,85 @@ - use super::*; -unsafe extern "C" fn ganon_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0 / 4.0); + FT_MOTION_RATE(agent, 3.0 / 4.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 5.0, 0.0, 12.0, 7.0, Some(0.0), Some(15.0), Some(7.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 3.5, 0.0, 12.0, 11.0, Some(0.0), Some(15.0), Some(11.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 2.0, 0.0, 12.0, 14.0, Some(0.0), Some(15.0), Some(14.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 5.0, 0.0, 12.0, 7.0, Some(0.0), Some(15.0), Some(7.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 3.5, 0.0, 12.0, 11.0, Some(0.0), Some(15.0), Some(11.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 2.0, 0.0, 12.0, 14.0, Some(0.0), Some(15.0), Some(14.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 18, 4, 0, 25, 40, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 18, 4, 0, 25, 40, 1.0, true); } } -unsafe extern "C" fn ganon_attack_11_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_swing_s")); } } -unsafe extern "C" fn ganon_attack_11_expression(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_attack11(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); } frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.89); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.89); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 70, 85, 0, 50, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 70, 85, 0, 50, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 60, 0, 47, 4.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 60, 0, 47, 4.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.3); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attack11", ganon_attack_11_game) - .acmd("effect_attack11", ganon_attack_11_effect) - .acmd("sound_attack11", ganon_attack_11_sound) - .acmd("expression_attack11", ganon_attack_11_expression) - .acmd("game_attackdash", ganon_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("sound_attack11", sound_attack11); + agent.acmd("expression_attack11", expression_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ganon/src/acmd/mod.rs b/fighters/ganon/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/ganon/src/acmd/mod.rs +++ b/fighters/ganon/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index 8d50451558..37a153705d 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -1,252 +1,174 @@ - 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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_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(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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_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_ganon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ganon_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, 16.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ganon_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ganon_step_right_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ganon_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ganon_step_left_m")); } } -unsafe extern "C" fn ganon_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, 16.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 ganon_appeal_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 65.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } -unsafe extern "C" fn ganon_appeal_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 65.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } -unsafe extern "C" fn ganon_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } -unsafe extern "C" fn ganon_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } -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("ganon") - .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", ganon_turn_dash_game) - .acmd("game_appealhir", ganon_appeal_hi_r_game) - .acmd("game_appealhil", ganon_appeal_hi_l_game) - .acmd("game_appeallwr", ganon_appeal_lw_r_game) - .acmd("game_appeallwl", ganon_appeal_lw_l_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_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_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhil); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ganon/src/acmd/smashes.rs b/fighters/ganon/src/acmd/smashes.rs index 0db7426165..b503daf510 100644 --- a/fighters/ganon/src/acmd/smashes.rs +++ b/fighters/ganon/src/acmd/smashes.rs @@ -1,140 +1,136 @@ - use super::*; -unsafe extern "C" fn ganon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ganon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 22.0, 85, 85, 0, 40, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 22.0, 78, 85, 0, 40, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 19.0, 75, 93, 0, 40, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 22.0, 85, 85, 0, 40, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 22.0, 78, 85, 0, 40, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 19.0, 75, 93, 0, 40, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ganon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 160, 90, 90, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 175, 92, 95, 0, 3.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 147, 90, 90, 0, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 150, 92, 95, 0, 4.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 160, 90, 90, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 175, 92, 95, 0, 3.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 147, 90, 90, 0, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 150, 92, 95, 0, 4.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 35, 88, 0, 61, 5.0, 0.0, 4.8, -21.0, Some(0.0), Some(4.8), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 35, 88, 0, 61, 5.0, 0.0, 4.8, -21.0, Some(0.0), Some(4.8), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attacks4", ganon_attack_s4_s_game) - .acmd("game_attackhi4", ganon_attack_hi4_game) - .acmd("game_attacklw4", ganon_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index 3e6683eedc..abc30dfacb 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -1,187 +1,186 @@ - use super::*; -unsafe extern "C" fn ganon_float_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ganon_float_start_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_start_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_start_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } } -unsafe extern "C" fn ganon_float_air_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0 / 10.0); +unsafe extern "C" fn game_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0 / 10.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + FT_MOTION_RATE(agent, 1.0); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); frame(lua_state, 14.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if is_excute(agent) { + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } -unsafe extern "C" fn ganon_float_air_start_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 2.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_air_start_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_air_start_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } } -unsafe extern "C" fn ganon_float_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); } frame(lua_state, 60.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn ganon_float_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_final_hand_triforce"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_entry_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); } } -unsafe extern "C" fn ganon_float_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 9.0, 1.0, Some(0.0), Some(9.0), Some(6.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 9.0, 1.0, Some(0.0), Some(9.0), Some(6.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 5.25, 0.0, 10.75, 7.25, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 5.25, 0.0, 10.75, 7.25, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, *COLLISION_SITUATION_MASK_GA); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_EXPLOSION_GRAVITY_ONOFF); } frame(lua_state, 32.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_special_air_s_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairscatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let lr = PostureModule::lr(boma); let stick_x = ControlModule::get_stick_x(boma) * lr; let speed_x = 0.5 * stick_x; @@ -189,178 +188,177 @@ unsafe extern "C" fn ganon_special_air_s_catch_game(fighter: &mut L2CAgentBase) WorkModule::set_float(boma, 2.0, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_GANON_EXPLOSION_FALL_SETTING_CATCH, *FIGHTER_GANON_STATUS_WORK_ID_INT_EXPLOSION_FALL_SETTING); } } -unsafe extern "C" fn ganon_special_air_s_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairsfall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let speed_x = WorkModule::get_float(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); - SET_SPEED_EX(fighter, speed_x, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, speed_x, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_GANON_EXPLOSION_FALL_SETTING_FALL, *FIGHTER_GANON_STATUS_WORK_ID_INT_EXPLOSION_FALL_SETTING); } } -unsafe extern "C" fn ganon_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 15.0, 361, 82, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 15.0, 361, 82, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ganon_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 6.0, 8.5, 9.5); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 6.0, 8.5, 10.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.5, 6.0, 0.0, 12.5, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 16.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.5, 6.0, 0.0, 12.5, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 16.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_GANON_KICK_WALL_CHECK); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 8.0, 8.0, 8.0, 4.0); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 30.0/(61.0 - 36.0)); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + FT_MOTION_RATE(agent, 30.0/(61.0 - 36.0)); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn ganon_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_GANON_KICK_WALL_CHECK); JostleModule::set_status(boma, false); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn ganon_special_air_lw_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.790); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.5, 0.0, 3.2, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.5, 0.0, 3.2, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 19.0); - if is_excute(fighter) { } + if is_excute(agent) { } } -unsafe extern "C" fn ganon_special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } - frame(fighter.lua_state_agent, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - frame(fighter.lua_state_agent, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.5, 0.0, 16.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.0, 0.0, 6.75, 7.75, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + frame(lua_state, 14.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.5, 0.0, 16.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.0, 0.0, 6.75, 7.75, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - CATCH(fighter, 0, Hash40::new("bust"), 5.25, 0.0, 0.0, 2.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + wait(lua_state, 1.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + CATCH(agent, 0, Hash40::new("bust"), 5.25, 0.0, 0.0, 2.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + frame(lua_state, 18.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - frame(fighter.lua_state_agent, 29.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - AttackModule::clear_all(fighter.module_accessor); + frame(lua_state, 29.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + AttackModule::clear_all(boma); } - frame(fighter.lua_state_agent, 34.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 9.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - //ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + frame(lua_state, 34.0); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 9.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 41.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -369,89 +367,97 @@ unsafe extern "C" fn ganon_special_hi(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("air_accel_x_mul"), 0); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let air_accel_x_mul = WorkModule::get_param_float(boma, hash40("air_accel_x_mul"), 0); let special_hi_speed_x_mul = WorkModule::get_param_float( - fighter.module_accessor, + boma, hash40("param_special_hi"), hash40("special_hi_speed_x_mul") ); sv_kinetic_energy!( controller_set_accel_x_mul, - fighter, + agent, air_accel_x_mul * special_hi_speed_x_mul ); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let special_hi_speed_max_x_mul = WorkModule::get_param_float( - fighter.module_accessor, + boma, hash40("param_special_hi"), hash40("special_hi_speed_max_x_mul") ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * special_hi_speed_max_x_mul, 0.0 ); } - frame(fighter.lua_state_agent, 46.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); } } -unsafe extern "C" fn ganon_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } - frame(fighter.lua_state_agent, 31.0); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 31.0); /* vanilla electric effects for _ in 0..4 { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("ganon_attack_elec"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("ganon_attack_elec"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - wait(fighter.lua_state_agent, 2.0); + wait(lua_state, 2.0); } - frame(fighter.lua_state_agent, 42.0); + frame(lua_state, 42.0); */ - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_raijin_hold"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_raijin_hold"), false, true); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_floatstart", ganon_float_start_game) - .acmd("effect_floatstart", ganon_float_start_eff) - .acmd("expression_floatstart", ganon_float_start_exp) - .acmd("sound_floatstart", ganon_float_start_snd) - .acmd("game_floatairstart", ganon_float_air_start_game) - .acmd("effect_floatairstart", ganon_float_air_start_eff) - .acmd("expression_floatairstart", ganon_float_air_start_exp) - .acmd("sound_floatairstart", ganon_float_air_start_snd) - .acmd("game_float", ganon_float_game) - .acmd("effect_float", ganon_float_eff) - .acmd("expression_float", ganon_float_exp) - .acmd("game_specialairsstart", ganon_special_air_s_start_game) - .acmd("game_specialairscatch", ganon_special_air_s_catch_game) - .acmd("game_specialairsfall", ganon_special_air_s_fall_game) - .acmd("game_specialairs", ganon_special_air_s_game) - .acmd("game_speciallw", ganon_special_lw_game) - .acmd("game_specialairlw", ganon_special_air_lw_game) - .acmd("game_specialairlwend", ganon_special_air_lw_end_game) - .acmd("game_specialhi", ganon_special_hi) - .acmd("game_specialairhi", ganon_special_hi) - .acmd("effect_specialhi", ganon_special_hi_effect) - .acmd("effect_specialairhi", ganon_special_hi_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_floatstart", game_floatstart); + agent.acmd("effect_floatstart", effect_floatstart); + agent.acmd("expression_floatstart", expression_floatstart); + agent.acmd("sound_floatstart", sound_floatstart); + + agent.acmd("game_floatairstart", game_floatairstart); + agent.acmd("effect_floatairstart", effect_floatairstart); + agent.acmd("expression_floatairstart", expression_floatairstart); + agent.acmd("sound_floatairstart", sound_floatairstart); + + agent.acmd("game_float", game_float); + agent.acmd("effect_float", effect_float); + agent.acmd("expression_float", expression_float); + + agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialairscatch", game_specialairscatch); + + agent.acmd("game_specialairsfall", game_specialairsfall); + + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_speciallw", game_speciallw); + + agent.acmd("game_specialairlw", game_specialairlw); + + agent.acmd("game_specialairlwend", game_specialairlwend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); } diff --git a/fighters/ganon/src/acmd/throws.rs b/fighters/ganon/src/acmd/throws.rs index e4d6dfcf4d..d79dc7eb46 100644 --- a/fighters/ganon/src/acmd/throws.rs +++ b/fighters/ganon/src/acmd/throws.rs @@ -1,90 +1,89 @@ use super::*; -unsafe extern "C" fn ganon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ganon_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ganon_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, -4.0, Some(0.0), Some(9.0), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, -4.0, Some(0.0), Some(9.0), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 43, 100, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 43, 100, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 100, 0, 30, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, -0.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 100, 0, 30, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, -0.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 17, 9); + CHECK_FINISH_CAMERA(agent, 17, 9); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } @@ -109,12 +108,12 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_catch", ganon_catch_game) - .acmd("game_catchdash", ganon_catch_dash_game) - .acmd("game_catchturn", ganon_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwlw", game_throwlw) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/ganon/src/acmd/tilts.rs b/fighters/ganon/src/acmd/tilts.rs index e0b6de7ad6..5ba8668593 100644 --- a/fighters/ganon/src/acmd/tilts.rs +++ b/fighters/ganon/src/acmd/tilts.rs @@ -1,400 +1,396 @@ - use super::*; -unsafe extern "C" fn ganon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0 - 1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0 - 1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0/(10.1 - 10.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 22, 81, 0, 32, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 22, 81, 0, 32, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 22, 81, 0, 32, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0/(10.1 - 10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 22, 81, 0, 32, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 22, 81, 0, 32, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 22, 81, 0, 32, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 10.1); - FT_MOTION_RATE(fighter, 1.0/(12.0 - 10.1)); + FT_MOTION_RATE(agent, 1.0/(12.0 - 10.1)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn ganon_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 22, 72, 0, 25, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 15.0, 22, 72, 0, 25, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 22, 72, 0, 25, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 22, 72, 0, 25, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 15.0, 22, 72, 0, 25, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 22, 72, 0, 25, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn ganon_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(8.0 - 1.0)); + FT_MOTION_RATE(agent, 4.0/(8.0 - 1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0/(10.1 - 10.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 22, 95, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 22, 95, 0, 35, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 22, 95, 0, 35, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0/(10.1 - 10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 22, 95, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 22, 95, 0, 35, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 22, 95, 0, 35, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 10.1); - FT_MOTION_RATE(fighter, 1.0/(12.0 - 10.1)); + FT_MOTION_RATE(agent, 1.0/(12.0 - 10.1)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn ganon_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5, -11, -35, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5, -11, -35, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 22.0, 13.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 22.0, 13.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); } } -unsafe extern "C" fn ganon_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 16.0, -10, 27, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 16.0, -10, 27, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2.0, 17.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2.0, 17.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); } } -unsafe extern "C" fn ganon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 14.0, 78, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 14.0, 78, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ganon_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(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) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } - EFFECT_FOLLOW(fighter, Hash40::new("ganon_sword_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ganon_sword_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } - FOOT_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, 0, 0, -80, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, 0, 0, -80, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_sword_flare"), false, false); } frame(lua_state, 41.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn ganon_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appeal_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appeal_l01")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ganon_attack06")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ganon_attack06")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_m")); } } -unsafe extern "C" fn ganon_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_TOP); } frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 3); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 8.0 / 10.0); + FT_MOTION_RATE(agent, 8.0 / 10.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 40, 10, 40, 3.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 40, 10, 40, 3.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } // frame(lua_state, 30.0); - // if is_excute(fighter) { - // WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + // if is_excute(agent) { + // WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // } } -unsafe extern "C" fn ganon_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ganon_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_ganon_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_l")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_ganon_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_l")); } } -unsafe extern "C" fn ganon_attack_lw3_expression(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_attacklw3(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); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -unsafe extern "C" fn ganon_attack_lw32_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 100, 0, 85, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 100, 0, 85, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_attack_lw32_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ganon_attack_lw32_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_ganon_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_l")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_ganon_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_l")); } } -unsafe extern "C" fn ganon_attack_lw32_expression(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_attacklw32(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); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attacks3", ganon_attack_s3_s_game) - .acmd("game_attacks3hi", ganon_attack_s3_hi_game) - .acmd("game_attacks3lw", ganon_attack_s3_lw_game) - .acmd("effect_attacks3hi", ganon_attack_s3_hi_effect) - .acmd("effect_attacks3lw", ganon_attack_s3_lw_effect) - .acmd("game_attackhi3", ganon_attack_hi3_game) - .acmd("effect_attackhi3", ganon_attack_hi3_effect) - .acmd("sound_attackhi3", ganon_attack_hi3_sound) - .acmd("expression_attackhi3", ganon_attack_hi3_expression) - .acmd("game_attacklw3", ganon_attack_lw3_game) - .acmd("effect_attacklw3", ganon_attack_lw3_effect) - .acmd("sound_attacklw3", ganon_attack_lw3_sound) - .acmd("expression_attacklw3", ganon_attack_lw3_expression) - .acmd("game_attacklw32", ganon_attack_lw32_game) - .acmd("effect_attacklw32", ganon_attack_lw32_effect) - .acmd("sound_attacklw32", ganon_attack_lw32_sound) - .acmd("expression_attacklw32", ganon_attack_lw32_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); + + agent.acmd("game_attacklw32", game_attacklw32); + agent.acmd("effect_attacklw32", effect_attacklw32); + agent.acmd("sound_attacklw32", sound_attacklw32); + agent.acmd("expression_attacklw32", expression_attacklw32); } diff --git a/fighters/ganon/src/lib.rs b/fighters/ganon/src/lib.rs index 7bb0378152..4f04447f5b 100644 --- a/fighters/ganon/src/lib.rs +++ b/fighters/ganon/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("ganon"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/ganon/src/opff.rs b/fighters/ganon/src/opff.rs index 1add933db3..95db94f2e0 100644 --- a/fighters/ganon/src/opff.rs +++ b/fighters/ganon/src/opff.rs @@ -79,8 +79,7 @@ pub unsafe fn ganon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ganon") - .on_line(Main, ganon_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ganon_frame_wrapper); } diff --git a/fighters/ganon/src/status/attack_lw3.rs b/fighters/ganon/src/status/attack_lw3.rs index 4c78af956b..1fac483fab 100644 --- a/fighters/ganon/src/status/attack_lw3.rs +++ b/fighters/ganon/src/status/attack_lw3.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_LW3 + unsafe extern "C" fn attack_lw3_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackLw3_common(); fighter.main_shift(attack_lw3_main_loop) @@ -78,9 +80,7 @@ unsafe extern "C" fn attack_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue fighter.status_end_AttackLw3() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_main) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_main); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_end); } diff --git a/fighters/ganon/src/status.rs b/fighters/ganon/src/status/mod.rs similarity index 63% rename from fighters/ganon/src/status.rs rename to fighters/ganon/src/status/mod.rs index b141ab904f..a5a57bb194 100644 --- a/fighters/ganon/src/status.rs +++ b/fighters/ganon/src/status/mod.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; mod attack_lw3; @@ -26,14 +27,10 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn ganon_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_GANON { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on agent init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { @@ -41,12 +38,13 @@ pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } -pub fn install() { - smashline::Agent::new("ganon").on_start(ganon_init).install(); - attack_lw3::install(); - special_n::install(); - special_n_float::install(); - special_lw::install(); - special_s::install(); - special_air_s_catch::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_lw3::install(agent); + special_n::install(agent); + special_n_float::install(agent); + special_lw::install(agent); + special_s::install(agent); + special_air_s_catch::install(agent); } diff --git a/fighters/ganon/src/status/special_air_s_catch.rs b/fighters/ganon/src/status/special_air_s_catch.rs index 89ef73d114..1663b0abc9 100644 --- a/fighters/ganon/src/status/special_air_s_catch.rs +++ b/fighters/ganon/src/status/special_air_s_catch.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH unsafe extern "C" fn special_air_s_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::set_rate(fighter.module_accessor, 0.0); @@ -51,12 +52,6 @@ unsafe extern "C" fn special_air_s_catch_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status( - Main, - *FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH, - special_air_s_catch_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH, special_air_s_catch_main); } diff --git a/fighters/ganon/src/status/special_lw.rs b/fighters/ganon/src/status/special_lw.rs index 5bc9ec05f1..205a148c4d 100644 --- a/fighters/ganon/src/status/special_lw.rs +++ b/fighters/ganon/src/status/special_lw.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -31,6 +32,8 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } +// FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END + unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); @@ -52,13 +55,8 @@ unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CV ret } -pub fn install() { - smashline::Agent::new("ganon") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status( - Main, - *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END, - special_lw_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + + agent.status(Main, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main); } diff --git a/fighters/ganon/src/status/special_n.rs b/fighters/ganon/src/status/special_n.rs index c35beca4d6..3d9133b0b2 100644 --- a/fighters/ganon/src/status/special_n.rs +++ b/fighters/ganon/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( @@ -159,20 +161,18 @@ unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_init(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_exec(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); } diff --git a/fighters/ganon/src/status/special_n_float.rs b/fighters/ganon/src/status/special_n_float.rs index 75dee844e5..9a48adc885 100644 --- a/fighters/ganon/src/status/special_n_float.rs +++ b/fighters/ganon/src/status/special_n_float.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::ganon::SPECIAL_N_FLOAT + unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -127,14 +129,12 @@ unsafe extern "C" fn special_n_float_main_loop(fighter: &mut L2CFighterCommon) - 0.into() } -unsafe extern "C" fn special_n_float_end(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - Agent::new("ganon") - .status(Pre, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_pre) - .status(Main, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_main) - .status(End, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_pre); + agent.status(Main, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_main); + agent.status(End, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_end); } diff --git a/fighters/ganon/src/status/special_s.rs b/fighters/ganon/src/status/special_s.rs index 3881fcab20..e66e23bdde 100644 --- a/fighters/ganon/src/status/special_s.rs +++ b/fighters/ganon/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { @@ -19,8 +20,6 @@ unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit); } diff --git a/fighters/gaogaen/src/acmd/aerials.rs b/fighters/gaogaen/src/acmd/aerials.rs index 751739e7d1..a618700148 100644 --- a/fighters/gaogaen/src/acmd/aerials.rs +++ b/fighters/gaogaen/src/acmd/aerials.rs @@ -1,189 +1,185 @@ - use super::*; -unsafe extern "C" fn gaogaen_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 106, 0, 25, 9.0, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 50, 106, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 12.0, 50, 106, 0, 25, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 106, 0, 25, 9.0, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 50, 106, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 12.0, 50, 106, 0, 25, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 55, 100, 0, 30, 6.5, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 9.0, 55, 100, 0, 30, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 100, 0, 30, 6.5, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 9.0, 55, 100, 0, 30, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gaogaen_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, -3.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 361, 101, 0, 30, 5.5, -11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, -3.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 361, 101, 0, 30, 5.5, -11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame (lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gaogaen_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 50, 100, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 11.0, 50, 100, 0, 40, 4.2, 2.1, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 45, 104, 0, 45, 5.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 50, 100, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 11.0, 50, 100, 0, 40, 4.2, 2.1, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 45, 104, 0, 45, 5.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gaogaen_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 65, 85, 0, 65, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 71, 85, 0, 65, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 65, 85, 0, 65, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 71, 85, 0, 65, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(12.75-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(12.75-12.0)); } frame(lua_state, 12.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.0-12.75)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.75)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.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 gaogaen_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gaogaen_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { JostleModule::set_status(boma, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 100, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 290, 67, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 100, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 290, 67, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 52, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 290, 34, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 52, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 290, 34, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 70, 0, 50, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 70, 0, 50, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attackairn", gaogaen_attack_air_n_game) - .acmd("game_attackairf", gaogaen_attack_air_f_game) - .acmd("game_attackairb", gaogaen_attack_air_b_game) - .acmd("game_attackairhi", gaogaen_attack_air_hi_game) - .acmd("expression_attackairhi", gaogaen_attack_air_hi_expression) - .acmd("game_attackairlw", gaogaen_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gaogaen/src/acmd/ground.rs b/fighters/gaogaen/src/acmd/ground.rs index c242ce1dc5..2e92169396 100644 --- a/fighters/gaogaen/src/acmd/ground.rs +++ b/fighters/gaogaen/src/acmd/ground.rs @@ -1,129 +1,127 @@ - use super::*; -unsafe extern "C" fn gaogaen_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 180, 10, 0, 25, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 180, 10, 0, 25, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn gaogaen_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 78, 35, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 3.0, 78, 35, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 78, 35, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 3.0, 78, 35, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn gaogaen_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 1, 0, Hash40::new("waist"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 4, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 5, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ELBOW); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -unsafe extern "C" fn gaogaen_attack_13_expression(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_attack13(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); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn gaogaen_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.91); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.91); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 50, 81, 0, 70, 6.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 50, 81, 0, 70, 6.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 85, 70, 0, 70, 5.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 85, 70, 0, 70, 5.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attack11", gaogaen_attack_11_game) - .acmd("game_attack12", gaogaen_attack_12_game) - .acmd("game_attack13", gaogaen_attack_13_game) - .acmd("expression_attack13", gaogaen_attack_13_expression) - .acmd("game_attackdash", gaogaen_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gaogaen/src/acmd/mod.rs b/fighters/gaogaen/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/gaogaen/src/acmd/mod.rs +++ b/fighters/gaogaen/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index 96bb186426..f8b747ced6 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -1,205 +1,127 @@ - use super::*; use smash::app::BattleObjectModuleAccessor; -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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_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(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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_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_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_gaogaen_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gaogaen_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, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_gaogaen_step_left_ll"), Hash40::new("se_gaogaen_step_right_ll")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_gaogaen_step_left_ll"), Hash40::new("se_gaogaen_step_right_ll")); } } -unsafe extern "C" fn 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("gaogaen") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gaogaen/src/acmd/smashes.rs b/fighters/gaogaen/src/acmd/smashes.rs index 0318e4824b..cadaa574d1 100644 --- a/fighters/gaogaen/src/acmd/smashes.rs +++ b/fighters/gaogaen/src/acmd/smashes.rs @@ -1,75 +1,73 @@ use super::*; -unsafe extern "C" fn gaogaen_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 16.0, 361, 84, 0, 65, 3.0, 0.0, 0.6, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 84, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 20.0, 361, 79, 0, 65, 6.0, 9.0, 1.8, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 16.0, 361, 84, 0, 65, 3.0, 0.0, 0.6, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 84, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 20.0, 361, 79, 0, 65, 6.0, 9.0, 1.8, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } - } -unsafe extern "C" fn gaogaen_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 17.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 17.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } - } -unsafe extern "C" fn gaogaen_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let top_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; ModelModule::joint_global_position(boma, Hash40::new("top"), top_pos, false); let hip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; @@ -82,43 +80,43 @@ unsafe extern "C" fn gaogaen_attack_lw4_game(fighter: &mut L2CAgentBase) { &Vector2f::zero(), ground, true).is_null() { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 5.4, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 5.4, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 2.4, 0.0, 2.0, 11.0, Some(0.0), Some(2.0), Some(-6.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 2.4, 0.0, 2.0, 11.0, Some(0.0), Some(2.0), Some(-6.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attacks4", gaogaen_attack_s4_s_game) - .acmd("game_attackhi4", gaogaen_attack_hi4_game) - .acmd("game_attacklw4", gaogaen_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gaogaen/src/acmd/specials.rs b/fighters/gaogaen/src/acmd/specials.rs index 42b3b225ca..2710547650 100644 --- a/fighters/gaogaen/src/acmd/specials.rs +++ b/fighters/gaogaen/src/acmd/specials.rs @@ -1,35 +1,35 @@ use super::*; -unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 3 } else { 0 }; - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.0, 7.0, 0.0, 10.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 45, 42 + kbg, 0, 85, 5.8, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 5.4, 0.0, 11.0, -4.0, Some(0.0), Some(11.0), Some(-4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 4.6, 0.0, 8.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 3 } else { 0 }; + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.0, 7.0, 0.0, 10.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 42 + kbg, 0, 85, 5.8, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 5.4, 0.0, 11.0, -4.0, Some(0.0), Some(11.0), Some(-4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 4.6, 0.0, 8.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - HIT_NODE(fighter, Hash40::new("body"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("body"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); } else { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_START_ROTATION); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -38,14 +38,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 11.0, -2.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 11.0, -2.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -54,14 +54,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 15.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -70,14 +70,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 23.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -86,15 +86,15 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 29.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -103,14 +103,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 37.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -119,14 +119,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 42.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -135,14 +135,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 50.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -151,30 +151,30 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 56.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_END_ROTATION); } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_REQUEST_GRAVITY_DEFAULT); } } -unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_START); VarModule::off_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB); VarModule::off_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB); @@ -182,11 +182,11 @@ unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::get_stick_y(boma) < -0.5 { VarModule::on_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB); VarModule::on_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB); @@ -197,168 +197,168 @@ unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); // Spawn the special windboxes if an alternate grab is detected if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG Grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 20, 100, 80, 0, 5.0, 0.0, 5.0, 2.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 20, 100, 80, 0, 5.0, 0.0, 5.0, 2.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } } // Otherwise produce the normal windbox else{ // Original Windbox - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // Regular grab windbox - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // Spawn the air grab/OTG grab box if we've detected we hit the windbox if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 4.0, 2.0, Some(0.0), Some(4.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 4.0, 2.0, Some(0.0), Some(4.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { // Clear windbox and spawn the grab AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(15.0), Some(6.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 0, Hash40::new("top"), 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(15.0), Some(6.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_A); } } // If the regular grab, then just clear the original windbox and spawn the grabbox else{ // Clear original windbox AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if !VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } GrabModule::set_rebound(boma, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_END); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } frame(lua_state, 74.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); } } -unsafe extern "C" fn gaogaen_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); for _ in 0..8{ - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } @@ -366,164 +366,164 @@ unsafe extern "C" fn gaogaen_special_s_start_effect(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn gaogaen_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_START); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 2.5, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(9.5), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 2.5, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(9.5), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 35.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_END); } frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } frame(lua_state, 74.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn gaogaen_special_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_THROW_ROPE); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 95.0); } -unsafe extern "C" fn gaogaen_special_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_catch"), Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_catch"), Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.9, true, *EF_FLIP_YZ); // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } frame(lua_state, 6.0); for _ in 0..12{ - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } wait(lua_state, 2.0); } frame(lua_state, 31.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); for _ in 0..8{ - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } @@ -531,258 +531,258 @@ unsafe extern "C" fn gaogaen_special_s_throw_effect(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn gaogaen_special_s_lariat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); +unsafe extern "C" fn game_specialslariat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); // OTG/Anti-air grab throw boxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 15, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 15, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 77, 100, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 77, 100, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } // Regular grab else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } AttackModule::set_force_reaction(boma, 0, true, true); WorkModule::set_float(boma, 9.0, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLOAT_LARIAT_HIT_FRAME); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab hitboxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 15.0, 15, 0, 0, 80, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 2, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 15.0, 15, 0, 0, 80, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 2, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 15.0, 105, 35, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 15.0, 105, 35, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } // Regular grab else{ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } //CHECK_FINISH_CAMERA(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) || VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - FT_MOTION_RATE_RANGE(fighter, 20.0, 50.0, 26.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 50.0, 26.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn gaogaen_special_air_s_lariat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairslariat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_force_reaction(boma, 0, true, true); WorkModule::set_float(boma, 9.0, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLOAT_LARIAT_HIT_FRAME); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); //CHECK_FINISH_CAMERA(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn gaogaen_special_s_shoulder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); +unsafe extern "C" fn game_specialsshoulder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 179, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 179, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 105, 280, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 105, 280, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } // Regular grab else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } AttackModule::set_force_reaction(boma, 0, true, true); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // OTG/Anti-air grab hitboxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } // Regular grab else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA_IF_NOT_HP_MODE(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 45.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn gaogaen_special_air_s_shoulder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsshoulder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_force_reaction(boma, 0, true, true); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA_IF_NOT_HP_MODE(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 45.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn gaogaen_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(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) { VarModule::on_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); //FT_MOTION_RATE(fighter, 6.0/(6.0-4.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_MOTION_RATE(fighter, 1.0); - SA_SET(fighter, *SITUATION_KIND_AIR); + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -790,182 +790,182 @@ unsafe extern "C" fn gaogaen_special_hi_start_game(fighter: &mut L2CAgentBase) { AttackModule::set_force_reaction(boma, 4, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.9); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.9); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(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) { VarModule::on_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - FT_MOTION_RATE(fighter, 4.0/(6.0-4.0)); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.9); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.9); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_special_air_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire2"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire2"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::SHOULD_CROSS_CHOP_DIVE_EARLY) { - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("bust"), 0.0, 0.0, 0.0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("bust"), 0.0, 0.0, 0.0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, -2, -111, -28, 77, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, 0, -48, 23, 71, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, -2, -111, -28, 77, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, 0, -48, 23, 71, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_chop_line_start"), Hash40::new("trans"), 0, 22, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_chop_line_start"), Hash40::new("trans"), 0, 22, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn gaogaen_special_air_hi_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhiturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 5.0/(3.0 - 1.0)); + FT_MOTION_RATE(agent, 5.0/(3.0 - 1.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 3.0); if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 6.0/(6.0 - 3.0)); + FT_MOTION_RATE(agent, 6.0/(6.0 - 3.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ VarModule::off_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); VarModule::on_flag(boma.object(), vars::common::instance::UP_SPECIAL_CANCEL); @@ -977,11 +977,11 @@ unsafe extern "C" fn gaogaen_special_air_hi_turn_game(fighter: &mut L2CAgentBase } } -unsafe extern "C" fn gaogaen_special_air_hi_turn_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhiturn(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 VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ // EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); // LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 1.5); @@ -1002,122 +1002,114 @@ unsafe extern "C" fn gaogaen_special_air_hi_turn_effect(fighter: &mut L2CAgentBa // } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 8, 5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 8, 5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_special_air_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 70, 100, 0, 50, 7.0, 0.0, 12.0, 1.0, Some(0.0), Some(7.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 100, 0, 50, 7.0, 0.0, 12.0, 1.0, Some(0.0), Some(7.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.423); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.423); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_HI_FLAG_DISABLE_OPPONENT_PASSIVE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 175, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 54, 48, 0, 135, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(3.0), Some(4.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 175, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 54, 48, 0, 135, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(3.0), Some(4.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 100, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 100, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 80, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 80, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 60, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 60, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 40, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 40, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } -unsafe extern "C" fn gaogaen_special_hi_bound_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhibound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.8, 361, 72, 0, 89, 8.0, 0.0, 4.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 361, 80, 0, 85, 9.0, 0.0, 5.5, 10.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.8, 361, 72, 0, 89, 8.0, 0.0, 4.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 361, 80, 0, 85, 9.0, 0.0, 5.5, 10.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.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 gaogaen_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.25); + FT_MOTION_RATE(agent, 0.25); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_LW_FLAG_STANCE_START); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_LW_FLAG_STANCE_END); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_specialn", gaogaen_special_n_game) - .acmd("game_specialairn", gaogaen_special_n_game) - .acmd("game_specialsstart", gaogaen_special_s_start_game) - .acmd("effect_specialsstart", gaogaen_special_s_start_effect) - .acmd("game_specialairsstart", gaogaen_special_air_s_start_game) - .acmd("game_specialsthrow", gaogaen_special_s_throw_game) - .acmd("game_specialairsthrow", gaogaen_special_s_throw_game) - .acmd("effect_specialsthrow", gaogaen_special_s_throw_effect) - .acmd("game_specialslariat", gaogaen_special_s_lariat_game) - .acmd("game_specialairslariat", gaogaen_special_air_s_lariat_game) - .acmd("game_specialsshoulder", gaogaen_special_s_shoulder_game) - .acmd( - "game_specialairsshoulder", - gaogaen_special_air_s_shoulder_game, - ) - .acmd("game_specialhistart", gaogaen_special_hi_start_game) - .acmd("game_specialairhistart", gaogaen_special_air_hi_start_game) - .acmd( - "effect_specialairhistart", - gaogaen_special_air_hi_start_effect, - ) - .acmd("game_specialairhiturn", gaogaen_special_air_hi_turn_game) - .acmd( - "effect_specialairhiturn", - gaogaen_special_air_hi_turn_effect, - ) - .acmd("game_specialairhifall", gaogaen_special_air_hi_fall_game) - .acmd("game_specialhibound", gaogaen_special_hi_bound_game) - .acmd("game_speciallwstart", gaogaen_special_lw_start_game) - .acmd("game_specialairlwstart", gaogaen_special_lw_start_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("game_specialairsthrow", game_specialsthrow); + agent.acmd("effect_specialsthrow", effect_specialsthrow); + agent.acmd("game_specialslariat", game_specialslariat); + agent.acmd("game_specialairslariat", game_specialairslariat); + agent.acmd("game_specialsshoulder", game_specialsshoulder); + agent.acmd("game_specialairsshoulder", game_specialairsshoulder); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("effect_specialairhistart",effect_specialairhistart); + agent.acmd("game_specialairhiturn", game_specialairhiturn); + agent.acmd("effect_specialairhiturn", effect_specialairhiturn); + agent.acmd("game_specialairhifall", game_specialairhifall); + agent.acmd("game_specialhibound", game_specialhibound); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); } \ No newline at end of file diff --git a/fighters/gaogaen/src/acmd/throws.rs b/fighters/gaogaen/src/acmd/throws.rs index 8610a3da71..7f5c1eaaad 100644 --- a/fighters/gaogaen/src/acmd/throws.rs +++ b/fighters/gaogaen/src/acmd/throws.rs @@ -1,584 +1,585 @@ use super::*; -unsafe extern "C" fn gaogaen_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = -1.0 * grab_y; if grab_y > 0.0 { z_mod = 3.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 11.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, 5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, 4, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, 5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, 4, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_catchdash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = 0.0; if grab_y > 0.0 { z_mod = 4.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catchdash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 9.0, 3.5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 8.5, 2.5, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 9.0, 3.5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 8.5, 2.5, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_catchturn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 13.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = 0.0; if grab_y > 0.0 { z_mod = 3.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 - z_mod, Some(0.0), Some(10.0), Some(-2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 - z_mod, Some(0.0), Some(10.0), Some(-2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 + z_mod, Some(0.0), Some(10.0), Some(-2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 + z_mod, Some(0.0), Some(10.0), Some(-2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catchturn_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, -7, rot_right, 135, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, -8, rot_left, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, -7, rot_right, 135, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, -8, rot_left, -45, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 64, 0, 82, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 64, 0, 82, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 4.0, 30, 63, 0, 100, 8.0, -3.0, 7.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 4.0, 30, 63, 0, 100, 8.0, -3.0, 7.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 6.0, 30, 62, 0, 100, 8.0, -4.5, 14.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 6.0, 30, 62, 0, 100, 8.0, -4.5, 14.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 8.0, 30, 61, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 8.0, 30, 61, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 10.0, 30, 60, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 10.0, 30, 60, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 16, 15); + CHECK_FINISH_CAMERA(agent, 16, 15); } frame(lua_state, 58.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn gaogaen_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwf(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 VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -3, 0, 180, -90, 0, 1.6, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -3, 0, 180, -90, 0, 1.6, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1, 0, 180, -90, 0, 1.8, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1, 0, 180, -90, 0, 1.8, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -2, 0, 180, 0, 0, 1.7, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -2, 0, 180, 0, 0, 1.7, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 0, 0, 180, 0, 0, 2, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 0, 0, 180, 0, 0, 2, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 43.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1.5, 0, 180, 0, 0, 2.3, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1.5, 0, 180, 0, 0, 2.3, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 59.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 13, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 360, true, 0.7); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 13, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 360, true, 0.7); + LAST_EFFECT_SET_RATE(agent, 0.6); } } -unsafe extern "C" fn gaogaen_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } // Kill throw if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 40, 490, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 40, 490, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Techchase throw else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 15.0/(16.0-11.0)); + FT_MOTION_RATE(agent, 15.0/(16.0-11.0)); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { // Kill throw if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } // Techchase throw else{ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -4, 5); + CHECK_FINISH_CAMERA(agent, -4, 5); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 2.439, y: -6.660, z: -5.0}, false, false); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {1.0} else {26.0/(52.0 - 15.0)}); - REVERSE_LR(fighter); + if is_excute(agent) { + FT_MOTION_RATE(agent, if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {1.0} else {26.0/(52.0 - 15.0)}); + REVERSE_LR(agent); } - } -unsafe extern "C" fn gaogaen_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwb(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 VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 27.0); frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), 10, 0, -5.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_b"), Hash40::new("top"), 10, 0, -5.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ // Incin Buster - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { // Normal throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 88, 79, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 88, 79, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 33.0/(22.0-10.0)); + FT_MOTION_RATE(agent, 33.0/(22.0-10.0)); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 14, 1); - CHECK_FINISH_CAMERA(fighter, 1, 20); + CHECK_FINISH_CAMERA(agent, 1, 20); let hitlag = if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {4.5} else {3.0}; let sound = if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {*COLLISION_SOUND_ATTR_HEAVY} else {*COLLISION_SOUND_ATTR_PUNCH}; - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 88, 70, 0, 65, 7.0, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(0.0), hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 88, 70, 0, 65, 7.0, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(0.0), hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, 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_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn gaogaen_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("waist"), 0.0, 0.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("waist"), 0.0, 0.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 32, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 32, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("gaogaen_throw_hi"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("gaogaen_throw_hi"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("gaogaen_revenge_start"), Hash40::new("top"), -2, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("gaogaen_revenge_start"), Hash40::new("top"), -2, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("vc_gaogaen_appeal_l01")); + PLAY_SE(agent, Hash40::new("vc_gaogaen_appeal_l01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_gaogaen_rnd_attack")); + PLAY_SEQUENCE(agent, Hash40::new("seq_gaogaen_rnd_attack")); } } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_kick_hit_m")); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_gaogaen_rnd_attackappeal01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_gaogaen_rnd_attackappeal01")); } } } -unsafe extern "C" fn gaogaen_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { + if is_excute(agent) { let bkb = if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { 50 } else { 70 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 47, 0, bkb, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 47, 0, bkb, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 12, 1); - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 12, 1); + CHECK_FINISH_CAMERA(agent, 8, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn gaogaen_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 24, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 24, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 21, 0, 90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 21, 0, 90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_catch", gaogaen_catch_game) - .acmd("effect_catch", gaogaen_catch_effect) - .acmd("game_catchturn", gaogaen_catchturn_game) - .acmd("effect_catchturn", gaogaen_catchturn_effect) - .acmd("game_catchdash", gaogaen_catchdash_game) - .acmd("effect_catchdash", gaogaen_catchdash_effect) - .acmd("game_throwf", gaogaen_throw_f_game) - .acmd("effect_throwf", gaogaen_throw_f_effect) - .acmd("game_throwb", gaogaen_throw_b_game) - .acmd("effect_throwb", gaogaen_throw_b_effect) - .acmd("game_throwhi", gaogaen_throw_hi_game) - .acmd("effect_throwhi", gaogaen_throw_hi_effect) - .acmd("sound_throwhi", gaogaen_throw_hi_sound) - .acmd("game_throwlw", gaogaen_throw_lw_game) - .acmd("effect_throwlw", gaogaen_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("effect_catch", effect_catch); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("effect_catchturn", effect_catchturn); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("effect_catchdash", effect_catchdash); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } diff --git a/fighters/gaogaen/src/acmd/tilts.rs b/fighters/gaogaen/src/acmd/tilts.rs index a933f9c2f5..f3b5667d9b 100644 --- a/fighters/gaogaen/src/acmd/tilts.rs +++ b/fighters/gaogaen/src/acmd/tilts.rs @@ -1,172 +1,167 @@ - use super::*; -unsafe extern "C" fn gaogaen_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gaogaen_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gaogaen_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gaogaen_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 4.5, 8.0, 7, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 4.5, 8.0, 7, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.1, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 86, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 86, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 86, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 86, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.2, 3.8); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 94, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 94, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 94, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 94, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.1, 3.8); } } -unsafe extern "C" fn gaogaen_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 89, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 93, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 97, 42, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 89, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 93, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 97, 42, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attacks3hi", gaogaen_attack_s3_hi_game) - .acmd("effect_attacks3hi", gaogaen_attack_s3_hi_effect) - .acmd("game_attacks3", gaogaen_attack_s3_s_game) - .acmd("effect_attacks3", gaogaen_attack_s3_s_effect) - .acmd("game_attacks3lw", gaogaen_attack_s3_lw_game) - .acmd("effect_attacks3lw", gaogaen_attack_s3_lw_effect) - .acmd("game_attackhi3", gaogaen_attack_hi3_game) - .acmd("game_attacklw3", gaogaen_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gaogaen/src/lib.rs b/fighters/gaogaen/src/lib.rs index 7bb0378152..5eabf0f167 100644 --- a/fighters/gaogaen/src/lib.rs +++ b/fighters/gaogaen/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("gaogaen"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/gaogaen/src/opff.rs b/fighters/gaogaen/src/opff.rs index d531e0cfa8..2384babe0a 100644 --- a/fighters/gaogaen/src/opff.rs +++ b/fighters/gaogaen/src/opff.rs @@ -263,8 +263,6 @@ pub fn gaogaen_opff(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModul } } -pub fn install() { - smashline::Agent::new("gaogaen") - .on_line(Main, gaogaen_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gaogaen_frame_wrapper); } diff --git a/fighters/gaogaen/src/status.rs b/fighters/gaogaen/src/status.rs deleted file mode 100644 index a8d303b562..0000000000 --- a/fighters/gaogaen/src/status.rs +++ /dev/null @@ -1,10 +0,0 @@ -use super::*; -use globals::*; - -mod attack_lw4; -mod special_n; - -pub fn install() { - attack_lw4::install(); - special_n::install(); -} diff --git a/fighters/gaogaen/src/status/attack_lw4.rs b/fighters/gaogaen/src/status/attack_lw4.rs index 81c3422fac..9f1179e85b 100644 --- a/fighters/gaogaen/src/status/attack_lw4.rs +++ b/fighters/gaogaen/src/status/attack_lw4.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_ATTACK_LW4 // +// FIGHTER_STATUS_KIND_ATTACK_LW4 pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); @@ -65,13 +64,8 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo } 0.into() } -pub fn install() { - smashline::Agent::new("gaogaen") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status( - MapCorrection, - *FIGHTER_STATUS_KIND_ATTACK_LW4, - attack_lw4_map_correction, - ) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } diff --git a/fighters/gaogaen/src/status/mod.rs b/fighters/gaogaen/src/status/mod.rs new file mode 100644 index 0000000000..5009cbf8cd --- /dev/null +++ b/fighters/gaogaen/src/status/mod.rs @@ -0,0 +1,11 @@ +use super::*; +use globals::*; +// status script import + +mod attack_lw4; +mod special_n; + +pub fn install(agent: &mut Agent) { + attack_lw4::install(agent); + special_n::install(agent); +} diff --git a/fighters/gaogaen/src/status/special_n.rs b/fighters/gaogaen/src/status/special_n.rs index 1368b124a0..7768ef09ae 100644 --- a/fighters/gaogaen/src/status/special_n.rs +++ b/fighters/gaogaen/src/status/special_n.rs @@ -1,9 +1,8 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_N -pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_N | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 @@ -39,7 +38,7 @@ pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) - } -pub unsafe extern "C" fn exec_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); @@ -92,9 +91,7 @@ pub unsafe extern "C" fn exec_special_n(fighter: &mut L2CFighterCommon) -> L2CVa // } // return 0.into() -pub fn install() { - smashline::Agent::new("gaogaen") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, gaogaen_special_n_pre) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, exec_special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); } diff --git a/fighters/gekkouga/src/acmd/aerials.rs b/fighters/gekkouga/src/acmd/aerials.rs index 4ea41c9d17..ff5752201d 100644 --- a/fighters/gekkouga/src/acmd/aerials.rs +++ b/fighters/gekkouga/src/acmd/aerials.rs @@ -1,246 +1,240 @@ - use super::*; -unsafe extern "C" fn gekkouga_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 65, 82, 0, 45, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 65, 82, 0, 45, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 69, 85, 0, 40, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 69, 85, 0, 40, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gekkouga_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact_air"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.57, true); - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact_air"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.57, true); + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } - } -unsafe extern "C" fn gekkouga_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 60, 80, 0, 50, 3.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 60, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 60, 80, 0, 50, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 4.25, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 3.5, 0.0, -11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 60, 80, 0, 50, 3.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 60, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 60, 80, 0, 50, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 4.25, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 3.5, 0.0, -11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gekkouga_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_sword"), Hash40::new("haver"), -0.0, 0, 0, 180, -90, 0, 1.075, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_sword"), Hash40::new("haver"), -0.0, 0, 0, 180, -90, 0, 1.075, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_gekkouga_sword1"), Hash40::new("tex_gekkouga_sword1"), 4, Hash40::new("haver"), 0, -1.7, 0, Hash40::new("haver"), -0.0, -13.0, 0, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 180, -90, 0, 1.1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1001); - fighter.pop_lua_stack(0); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_gekkouga_sword1"), Hash40::new("tex_gekkouga_sword1"), 4, Hash40::new("haver"), 0, -1.7, 0, Hash40::new("haver"), -0.0, -13.0, 0, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 180, -90, 0, 1.1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1001); + agent.pop_lua_stack(0); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_sword"), false, false); } - } -unsafe extern "C" fn gekkouga_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("footr"), 3.0, 367, 100, 0, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 35, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 35, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 3.0, 367, 100, 0, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 35, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 35, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("footr"), 3.0, 80, 100, 80, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 75, 100, 110, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 3.0, 65, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 3.0, 80, 100, 80, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 75, 100, 110, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 3.0, 65, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("footr"), 2.5, 365, 100, 0, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 40, 100, 105, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 2.5, 35, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 2.5, 365, 100, 0, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 40, 100, 105, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 2.5, 35, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("footr"), 2.5, 80, 100, 80, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 2.5, 75, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 2.5, 65, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 2.5, 80, 100, 80, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 2.5, 75, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 2.5, 65, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 6.0, 55, 90, 0, 60, 5.8, 0.0, -1.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 55, 90, 0, 60, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 6.0, 55, 90, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 55, 90, 0, 60, 5.8, 0.0, -1.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 55, 90, 0, 60, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 6.0, 55, 90, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gekkouga_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.3, 366, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn gekkouga_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 270, 95, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 270, 95, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 270, 85, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 270, 85, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 75, 0, 75, 5.2, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 75, 0, 75, 5.2, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attackairn", gekkouga_attack_air_n_game) - .acmd("effect_attackairn", gekkouga_attack_air_n_effect) - .acmd("game_attackairf", gekkouga_attack_air_f_game) - .acmd("effect_attackairf", gekkouga_attack_air_f_effect) - .acmd("game_attackairb", gekkouga_attack_air_b_game) - .acmd("game_attackairhi", gekkouga_attack_air_hi_game) - .acmd("game_attackairlw", gekkouga_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gekkouga/src/acmd/ground.rs b/fighters/gekkouga/src/acmd/ground.rs index 44e5165283..df22dd5faa 100644 --- a/fighters/gekkouga/src/acmd/ground.rs +++ b/fighters/gekkouga/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -21,7 +20,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -48,10 +46,9 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn gekkouga_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -68,45 +65,42 @@ unsafe extern "C" fn gekkouga_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gekkouga_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 4.5, 0, -30, 190, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.3); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 4.5, 0, -30, 190, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.3); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 12.5, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 12.5, 0, 0, 0, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_water_impact"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_water_impact"), false, false); } - } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", gekkouga_attack_dash_game) - .acmd("effect_attackdash", gekkouga_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/gekkouga/src/acmd/mod.rs b/fighters/gekkouga/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/gekkouga/src/acmd/mod.rs +++ b/fighters/gekkouga/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/acmd/other.rs b/fighters/gekkouga/src/acmd/other.rs index f6806d1a8e..e939a1ef51 100644 --- a/fighters/gekkouga/src/acmd/other.rs +++ b/fighters/gekkouga/src/acmd/other.rs @@ -1,237 +1,144 @@ - 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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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(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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_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_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn gekkouga_jump_aerial_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_GEKKOUGA_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_BOUND){ let bounce_speed_mul = Vector3f { x: 1.0, y: 0.75, z: 1.0 }; KineticModule::mul_speed(boma, &bounce_speed_mul, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_GEKKOUGA_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_BOUND); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_gekkouga_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gekkouga_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, 13.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_gekkouga_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_gekkouga_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_gekkouga_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_gekkouga_step_left_l")); } } -unsafe extern "C" fn 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 gekkouga_shuriken_shot_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"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } -} - -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("gekkouga_shuriken") - .acmd("game_shot", gekkouga_shuriken_shot_game) - .install(); - smashline::Agent::new("gekkouga") - .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("game_jumpaerialback", gekkouga_jump_aerial_b_game) - .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) - .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("game_jumpaerialback", game_jumpaerialback); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gekkouga/src/acmd/smashes.rs b/fighters/gekkouga/src/acmd/smashes.rs index a0effaefcf..1135bde3f1 100644 --- a/fighters/gekkouga/src/acmd/smashes.rs +++ b/fighters/gekkouga/src/acmd/smashes.rs @@ -1,102 +1,98 @@ - use super::*; -unsafe extern "C" fn gekkouga_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0, 361, 105, 0, 35, 3.0, 0.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0, 361, 105, 0, 35, 3.0, 0.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gekkouga_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 90, 0, 30, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 90, 0, 30, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //Ground-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 10, 0, 40, 5.0, 0.0, 17.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 366, 10, 0, 40, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 10, 0, 40, 5.0, 0.0, 17.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 366, 10, 0, 40, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 90, 108, 0, 30, 6.5, 0.0, 27.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 90, 108, 0, 30, 6.5, 0.0, 27.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 10.0, 40, 113, 0, 30, 4.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(-12.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 10.0, 40, 113, 0, 30, 4.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(-12.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gekkouga_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, 13.0, Some(-2.0), Some(3.0), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, -13.0, Some(-2.0), Some(3.0), Some(-13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, 13.0, Some(-2.0), Some(3.0), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, -13.0, Some(-2.0), Some(3.0), Some(-13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attacks4", gekkouga_attack_s4_s_game) - .acmd("game_attackhi4", gekkouga_attack_hi4_game) - .acmd("game_attacklw4", gekkouga_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gekkouga/src/acmd/specials.rs b/fighters/gekkouga/src/acmd/specials.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/gekkouga/src/acmd/specials.rs +++ b/fighters/gekkouga/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/gekkouga/src/acmd/throws.rs b/fighters/gekkouga/src/acmd/throws.rs index 5425aeaa70..c468101f05 100644 --- a/fighters/gekkouga/src/acmd/throws.rs +++ b/fighters/gekkouga/src/acmd/throws.rs @@ -1,137 +1,135 @@ use super::*; -unsafe extern "C" fn gekkouga_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 gekkouga_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 gekkouga_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-24.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-24.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 gekkouga_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 67, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 67, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 5.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 5.0, 0.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_throw_f_expression(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_throwf(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); } frame(lua_state, 15.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gekkouga_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 73, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 73, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 7, 1); - CHECK_FINISH_CAMERA(fighter, 5, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 7, 1); + CHECK_FINISH_CAMERA(agent, 5, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_catch", gekkouga_catch_game) - .acmd("game_catchdash", gekkouga_catch_dash_game) - .acmd("game_catchturn", gekkouga_catch_turn_game) - .acmd("game_throwf", gekkouga_throw_f_game) - .acmd("expression_throwf", gekkouga_throw_f_expression) - .acmd("game_throwlw", gekkouga_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("expression_throwf", expression_throwf); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gekkouga/src/acmd/tilts.rs b/fighters/gekkouga/src/acmd/tilts.rs index 94335931eb..d71ac02600 100644 --- a/fighters/gekkouga/src/acmd/tilts.rs +++ b/fighters/gekkouga/src/acmd/tilts.rs @@ -1,228 +1,217 @@ - use super::*; -unsafe extern "C" fn gekkouga_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn gekkouga_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn gekkouga_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.5, 8, 30, -60, -10, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.5, 8, 30, -60, -10, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 3.5, 15.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 3.5, 15.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn gekkouga_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tongue5"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("s_tongue7"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("s_tongue9"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tongue5"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("s_tongue7"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("s_tongue9"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn gekkouga_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gekkouga_attack_hi"), Hash40::new("gekkouga_attack_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_XY); - EFFECT_FLW_POS(fighter, Hash40::new("gekkouga_splash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gekkouga_attack_hi"), Hash40::new("gekkouga_attack_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_XY); + EFFECT_FLW_POS(agent, Hash40::new("gekkouga_splash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.9, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_COLOR(fighter, 2, 2, 2); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.75, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 1.4, 1.4, 1.4); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.55, true, *EF_FLIP_YZ, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.8, 0.8); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.3, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.9, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_COLOR(agent, 2, 2, 2); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.75, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_COLOR(agent, 1.4, 1.4, 1.4); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.55, true, *EF_FLIP_YZ, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.8, 0.8); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.3, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_attack_arc"), true, true); } - } -unsafe extern "C" fn gekkouga_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gekkouga_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 80, 0, 62, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 77, 80, 0, 62, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 85, 59, 0, 66, 5.0, 6.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 80, 0, 62, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 77, 80, 0, 62, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 85, 59, 0, 66, 5.0, 6.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } - } -unsafe extern "C" fn gekkouga_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 2.5, 2, -7.0, 0, 0, 0, 1.4, true, *EF_FLIP_YZ); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 2.5, 2, -7.0, 0, 0, 0, 1.4, true, *EF_FLIP_YZ); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 15.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 15.0, 0, 0, 0, 1.0, true); } - } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attacks3hi", gekkouga_attack_s3_hi_game) - .acmd("effect_attacks3hi", gekkouga_attack_s3_hi_effect) - .acmd("game_attacks3", gekkouga_attack_s3_s_game) - .acmd("effect_attacks3", gekkouga_attack_s3_s_effect) - .acmd("game_attacks3lw", gekkouga_attack_s3_lw_game) - .acmd("effect_attacks3lw", gekkouga_attack_s3_lw_effect) - .acmd("game_attackhi3", gekkouga_attack_hi3_game) - .acmd("effect_attackhi3", gekkouga_attack_hi3_effect) - .acmd("expression_attackhi3", gekkouga_attack_hi3_expression) - .acmd("game_attacklw3", gekkouga_attack_lw3_game) - .acmd("effect_attacklw3", gekkouga_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/gekkouga/src/lib.rs b/fighters/gekkouga/src/lib.rs index 7bcc1676ad..f98e1c4e46 100644 --- a/fighters/gekkouga/src/lib.rs +++ b/fighters/gekkouga/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod shuriken; use smash::{ lib::{ @@ -37,8 +41,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); -} + let agent = &mut Agent::new("gekkouga"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + shuriken::install(); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/opff.rs b/fighters/gekkouga/src/opff.rs index 814c3d5b69..50f938d179 100644 --- a/fighters/gekkouga/src/opff.rs +++ b/fighters/gekkouga/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_N_MAX_SHOT { if frame > 12.0 { @@ -105,8 +104,7 @@ pub unsafe fn gekkouga_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .on_line(Main, gekkouga_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gekkouga_frame_wrapper); } diff --git a/fighters/gekkouga/src/shuriken/acmd.rs b/fighters/gekkouga/src/shuriken/acmd.rs new file mode 100644 index 0000000000..ab78edc146 --- /dev/null +++ b/fighters/gekkouga/src/shuriken/acmd.rs @@ -0,0 +1,15 @@ +use super::*; + +unsafe extern "C" fn game_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shot", game_shot); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/shuriken/mod.rs b/fighters/gekkouga/src/shuriken/mod.rs new file mode 100644 index 0000000000..11ac88fa03 --- /dev/null +++ b/fighters/gekkouga/src/shuriken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("gekkouga_shuriken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/nana/Cargo.toml b/fighters/iceclimber/Cargo.toml similarity index 96% rename from fighters/nana/Cargo.toml rename to fighters/iceclimber/Cargo.toml index 43d13d0f95..94e5dc3681 100644 --- a/fighters/nana/Cargo.toml +++ b/fighters/iceclimber/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nana" +name = "iceclimber" version = "0.1.0" edition = "2018" diff --git a/fighters/iceclimber/src/acmd/aerials.rs b/fighters/iceclimber/src/acmd/aerials.rs new file mode 100644 index 0000000000..1cfc48f66c --- /dev/null +++ b/fighters/iceclimber/src/acmd/aerials.rs @@ -0,0 +1,216 @@ +use super::*; + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.3); + } +} + +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0 / (10.0 - 1.0)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0 / (33.0 - 10.0)); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 33.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0 / (36.0 - 33.0)); + AttackModule::clear_all(boma); + } + frame(lua_state, 36.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("havel"), -0.75, 7.0, 0, 0, 0, 0, 1.2, true); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + // skipping the frames where they bring hammer way above their head + FT_MOTION_RATE(agent, 1.0/(11.0 - 3.0)); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0 / (54.0 - 11.0)); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 54.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 22.0/(63.0 - 54.0)); + } + frame(lua_state, 60.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 63.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); + } +} + +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 18.0); + if is_excute(agent){ + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairn_nana", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairf_nana", game_attackairf); + agent.acmd("effect_attackairf_nana", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairb_nana", game_attackairb); + agent.acmd("effect_attackairb_nana", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairhi_nana", game_attackairhi); + agent.acmd("effect_attackairhi_nana", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + + agent.acmd("game_attackairlw_nana", game_attackairlw); + agent.acmd("effect_attackairlw_nana", effect_attackairlw); + + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); + + agent.acmd("effect_landingairlw_nana", effect_landingairlw); + agent.acmd("expression_landingairlw_nana", expression_landingairlw); +} diff --git a/fighters/iceclimber/src/acmd/ground.rs b/fighters/iceclimber/src/acmd/ground.rs new file mode 100644 index 0000000000..ec5f486160 --- /dev/null +++ b/fighters/iceclimber/src/acmd/ground.rs @@ -0,0 +1,83 @@ +use super::*; + +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 2.5, 0.0, 5.0, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 3.0, 0.0, 5.0, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 180, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 12.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); + } +} + +unsafe extern "C" fn game_attack11_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 2.5, 3.0, 5.0, 7.0, Some(-3.0), Some(5.0), Some(7.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 3.0, 3.0, 5.0, 10.0, Some(-3.0), Some(5.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 180, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 361, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 12.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); + } +} + +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 24.0/(41.0 - 15.0)); + } + frame(lua_state, 41.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack11_nana", game_attack11_nana); + + agent.acmd("game_attackdash", game_attackdash); + + agent.acmd("game_attackdash_nana", game_attackdash); +} diff --git a/fighters/iceclimber/src/acmd/mod.rs b/fighters/iceclimber/src/acmd/mod.rs new file mode 100644 index 0000000000..d8a22387b4 --- /dev/null +++ b/fighters/iceclimber/src/acmd/mod.rs @@ -0,0 +1,19 @@ +use super::*; + +mod ground; +mod tilts; +mod smashes; +mod aerials; +mod specials; +mod throws; +mod other; + +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs new file mode 100644 index 0000000000..27a879a2f6 --- /dev/null +++ b/fighters/iceclimber/src/acmd/other.rs @@ -0,0 +1,171 @@ +use super::*; + +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(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(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} + } + } + frame(lua_state, 1.1); + 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(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} + } +} + +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(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + } + } + frame(lua_state, 1.1); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + } +} + +unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + 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(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} + } + } + frame(lua_state, 1.1); + 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(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} + } +} + +unsafe extern "C" fn sound_damageflyroll_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + } + } + frame(lua_state, 1.1); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + } +} + +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } +} + +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(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_popo_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(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); + } +} + +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(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } +} + +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(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + frame(lua_state, escape_air_cancel_frame); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +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(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); + } + frame(lua_state, 39.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +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_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damagefly); + + agent.acmd("sound_damageflyhi_nana", sound_damagefly_nana); + agent.acmd("sound_damageflylw_nana", sound_damagefly_nana); + agent.acmd("sound_damageflyn_nana", sound_damagefly_nana); + agent.acmd("sound_damageflyroll_nana", sound_damageflyroll_nana); + agent.acmd("sound_damageflytop_nana", sound_damagefly_nana); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); +} diff --git a/fighters/iceclimber/src/acmd/smashes.rs b/fighters/iceclimber/src/acmd/smashes.rs new file mode 100644 index 0000000000..a1cbf4bb4c --- /dev/null +++ b/fighters/iceclimber/src/acmd/smashes.rs @@ -0,0 +1,205 @@ +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + FT_MOTION_RATE(agent, 2.0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 10.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn expression_attacks4(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_R); + } + frame(lua_state, 5.0); + app::sv_animcmd::execute(lua_state, 5.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + } + frame(lua_state, 30.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 8); + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.3); + } +} + +unsafe extern "C" fn expression_attacklw4(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_L); + } + frame(lua_state, 6.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 8.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } + frame(lua_state, 44.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4_nana", game_attacks4); + agent.acmd("effect_attacks4_nana", effect_attacks4); + agent.acmd("expression_attacks4_nana", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attackhi4_nana", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); + + agent.acmd("game_attacklw4_nana", game_attacklw4); + agent.acmd("effect_attacklw4_nana", effect_attacklw4); + agent.acmd("expression_attacklw4_nana", expression_attacklw4); +} diff --git a/fighters/iceclimber/src/acmd/specials.rs b/fighters/iceclimber/src/acmd/specials.rs new file mode 100644 index 0000000000..33e8afba47 --- /dev/null +++ b/fighters/iceclimber/src/acmd/specials.rs @@ -0,0 +1,91 @@ +use super::*; + +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); + } +} + +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + + agent.acmd("game_specialn_nana", game_specialn_nana); + + agent.acmd("game_specialairn", game_specialairn); + + agent.acmd("game_specialairn_nana", game_specialairn_nana); +} diff --git a/fighters/iceclimber/src/acmd/throws.rs b/fighters/iceclimber/src/acmd/throws.rs new file mode 100644 index 0000000000..a3c78fd21a --- /dev/null +++ b/fighters/iceclimber/src/acmd/throws.rs @@ -0,0 +1,508 @@ +use super::*; + +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.2); + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + } + game_CaptureCutCommon(agent); + wait(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.176); + 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 sound_catch_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } +} + +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.285); + frame(lua_state, 7.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + } + game_CaptureCutCommon(agent); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.21); + 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 sound_catchdash_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_popo_landing01")); + } +} + +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.125); + frame(lua_state, 8.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.3), *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 sound_catchturn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } +} + +unsafe extern "C" fn game_catchattack_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.8, 0.0, 7.2, 7.4, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_catchattack_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 11, -1.5, 10, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } +} + +unsafe extern "C" fn expression_catchattack_nana(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_L); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); + } +} + +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // scale attack startup based on opponent weight + let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); + FT_MOTION_RATE(agent, ((weight/100.00) * 32.0) / 36.0); + } + frame(lua_state, 36.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + CHECK_FINISH_CAMERA(agent, 10, 4); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 17.0/(49.0 - 37.0)); + } +} + +unsafe extern "C" fn effect_throwlw_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 28.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4.5, 5.4, 8, -90, 0, 0, 0.9, true); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 9, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn sound_throwlw_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack04")); + } + frame(lua_state, 25.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_03")); + } + frame(lua_state, 28.0); + if is_excute(agent) { + PLAY_DOWN_SE(agent, Hash40::new("se_common_down_s_01")); + PLAY_SE(agent, Hash40::new("se_common_kick_hit_m")); + } +} + +unsafe extern "C" fn expression_throwlw_nana(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_L); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 4, false, 0x50000000 /* default value */); + } + frame(lua_state, 26.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 29.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 48.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, 16, 9); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_throwf_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 22.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 8, 1, 163.714, 220.144, -140.09, 1.35, true, *EF_FLIP_YZ); + } + frame(lua_state, 29.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwf_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + PLAY_SE(agent, Hash40::new("vc_nana_attack01")); + } + frame(lua_state, 21.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_popo_swing_l")); + } +} + +unsafe extern "C" fn expression_throwf_nana(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_L); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 24.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } +} + +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE(agent, 28.0/20.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, 2, 19); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_throwhi_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 24.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 25.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), -1.5, 10, -3, 180, -90, -270, 1.3, true, *EF_FLIP_YZ); + } + frame(lua_state, 33.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwhi_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 22.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack03")); + PLAY_SE(agent, Hash40::new("se_popo_swing_ll")); + } +} + +unsafe extern "C" fn expression_throwhi_nana(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_L); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 22.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + } + frame(lua_state, 25.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 41.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } +} + +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 9.0); + if is_excute(agent) { + REVERSE_LR(agent); + } + frame(lua_state, 17.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 10); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + } +} + +unsafe extern "C" fn effect_throwb_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), -5, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 16.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn sound_throwb_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack02")); + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + } +} + +unsafe extern "C" fn expression_throwb_nana(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_INTP, *SLOPE_STATUS_TOP, 14); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 31.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 10); + } + frame(lua_state, 44.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + + agent.acmd("game_catch_nana", game_catch); + agent.acmd("sound_catch_nana", sound_catch_nana); + + agent.acmd("game_catchdash", game_catchdash); + + agent.acmd("game_catchdash_nana", game_catchdash); + agent.acmd("sound_catchdash_nana", sound_catchdash_nana); + + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchturn_nana", game_catchturn); + agent.acmd("sound_catchturn_nana", sound_catchturn_nana); + + agent.acmd("game_catchattack_nana", game_catchattack_nana); + agent.acmd("effect_catchattack_nana", effect_catchattack_nana); + agent.acmd("expression_catchattack_nana", expression_catchattack_nana); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwlw_nana", game_throwlw); + agent.acmd("effect_throwlw_nana", effect_throwlw_nana); + agent.acmd("sound_throwlw_nana", sound_throwlw_nana); + agent.acmd("expression_throwlw_nana", expression_throwlw_nana); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwf_nana", game_throwf); + agent.acmd("effect_throwf_nana", effect_throwf_nana); + agent.acmd("sound_throwf_nana", sound_throwf_nana); + agent.acmd("expression_throwf_nana", expression_throwf_nana); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwhi_nana", game_throwhi); + agent.acmd("effect_throwhi_nana", effect_throwhi_nana); + agent.acmd("sound_throwhi_nana", sound_throwhi_nana); + agent.acmd("expression_throwhi_nana", expression_throwhi_nana); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwb_nana", game_throwb); + agent.acmd("effect_throwb_nana", effect_throwb_nana); + agent.acmd("sound_throwb_nana", sound_throwb_nana); + agent.acmd("expression_throwb_nana", expression_throwb_nana); +} diff --git a/fighters/iceclimber/src/acmd/tilts.rs b/fighters/iceclimber/src/acmd/tilts.rs new file mode 100644 index 0000000000..af190d3127 --- /dev/null +++ b/fighters/iceclimber/src/acmd/tilts.rs @@ -0,0 +1,126 @@ +use super::*; + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 16.0 / (32.0 - 9.0)); + } + frame(lua_state, 32.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + for _ in 0..3 { + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); + } + wait(lua_state, 5.0); + } + frame(lua_state, 32.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); + } +} + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.714); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3); + + agent.acmd("game_attacks3hi_nana", game_attacks3); + + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attacks3_nana", game_attacks3); + + agent.acmd("game_attackslw", game_attacks3lw); + + agent.acmd("game_attackslw_nana", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attackhi3_nana", game_attackhi3); + agent.acmd("effect_attackhi3_nana", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + + agent.acmd("game_attacklw3_nana", game_attacklw3); +} diff --git a/fighters/iceclimber/src/blizzard/acmd.rs b/fighters/iceclimber/src/blizzard/acmd.rs new file mode 100644 index 0000000000..d6d6755612 --- /dev/null +++ b/fighters/iceclimber/src/blizzard/acmd.rs @@ -0,0 +1,25 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/iceclimber/src/blizzard/mod.rs b/fighters/iceclimber/src/blizzard/mod.rs new file mode 100644 index 0000000000..8ac26fb25e --- /dev/null +++ b/fighters/iceclimber/src/blizzard/mod.rs @@ -0,0 +1,14 @@ +use super::*; + +mod acmd; + +pub fn install() { + let popo = &mut Agent::new("popo_blizzard"); + let nana = &mut Agent::new("nana_blizzard"); + + acmd::install(popo); + acmd::install(nana); + + popo.install(); + nana.install(); +} \ No newline at end of file diff --git a/fighters/popo/src/lib.rs b/fighters/iceclimber/src/lib.rs similarity index 55% rename from fighters/popo/src/lib.rs rename to fighters/iceclimber/src/lib.rs index 7bb0378152..c3159b7f5d 100644 --- a/fighters/popo/src/lib.rs +++ b/fighters/iceclimber/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod blizzard; use smash::{ lib::{ @@ -37,9 +41,24 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let popo = &mut Agent::new("popo"); + let nana = &mut Agent::new("nana"); + + acmd::install(popo); + acmd::install(nana); + + status::install(popo); + status::install(nana); + status::install_nana(nana); + + opff::install_popo(popo); + opff::install_nana(nana); + + popo.install(); + nana.install(); + + blizzard::install(); } diff --git a/fighters/popo/src/opff.rs b/fighters/iceclimber/src/opff.rs similarity index 93% rename from fighters/popo/src/opff.rs rename to fighters/iceclimber/src/opff.rs index f494584b05..c48b377db6 100644 --- a/fighters/popo/src/opff.rs +++ b/fighters/iceclimber/src/opff.rs @@ -192,10 +192,6 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { } } -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - // nothing lol -} - #[no_mangle] pub unsafe extern "Rust" fn ice_climbers_common(fighter: &mut L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { @@ -217,18 +213,30 @@ pub unsafe fn ice_climbers_moveset(fighter: &mut L2CFighterCommon, boma: &mut Ba pub extern "C" fn popo_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { common::opff::fighter_common_opff(fighter); - popo_frame(fighter); ice_climbers_common(fighter); } } -pub unsafe fn popo_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +// Ice Climbers Cheer Cancel (Techy) +unsafe fn cheer_cancel(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_POPO_STATUS_KIND_THROW_NANA) { + MotionModule::set_frame(fighter.module_accessor, MotionModule::end_frame(fighter.module_accessor), true); + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_WAIT, true); + } +} + +pub extern "C" fn nana_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + unsafe { + common::opff::fighter_common_opff(fighter); + ice_climbers_common(fighter); + cheer_cancel(fighter); } } -pub fn install() { - smashline::Agent::new("popo") - .on_line(Main, popo_frame_wrapper) - .install(); + +pub fn install_popo(agent: &mut Agent) { + agent.on_line(Main, popo_frame_wrapper); +} + +pub fn install_nana(agent: &mut Agent) { + agent.on_line(Main, nana_frame_wrapper); } diff --git a/fighters/nana/src/status.rs b/fighters/iceclimber/src/status/mod.rs similarity index 59% rename from fighters/nana/src/status.rs rename to fighters/iceclimber/src/status/mod.rs index d2014a74b9..0ed88c854d 100644 --- a/fighters/nana/src/status.rs +++ b/fighters/iceclimber/src/status/mod.rs @@ -1,16 +1,31 @@ use super::*; use globals::*; -utils::import!(popo::{ics_dash}); // status script import - + +unsafe extern "C" fn ics_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[OBJECT_ID] == FIGHTER_KIND_NANA { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_POPO_INSTANCE_WORK_ID_FLAG_ENABLE_TRANSITION_FORBID) { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } + } + fighter.status_Dash_Main(); + 0.into() +} // FIGHTER_STATUS_KIND_DASH // pub unsafe extern "C" fn dash(fighter: &mut L2CFighterCommon) -> L2CValue { - popo::ics_dash(fighter) + fighter.status_Dash_Sub(); + fighter.sub_shift_status_main(L2CValue::Ptr(ics_dash_main as *const () as _)) } -pub unsafe extern "C" fn throw(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP // + +pub unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +pub unsafe extern "C" fn throw_nana(fighter: &mut L2CFighterCommon) -> L2CValue { // TODO: this check has issues. // - if we grab on a platform far off stage (like smashville) this check fails @@ -48,14 +63,14 @@ pub unsafe extern "C" fn throw(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.boma(), Hash40::new(throw_name), 0.0, 1.0, false, 0.0, false, false); // shift into the L2CFighterCommon's throw impl (instead of nana's default, modified impl) - return fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Throw_Main as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Throw_Main as *const () as _)) } -unsafe extern "C" fn catchwait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(catchwait_main_loop as *const () as _)) +unsafe extern "C" fn catchwait_nana_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(catchwait_nana_main_loop as *const () as _)) } -unsafe extern "C" fn catchwait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catchwait_nana_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // let boma = fighter.boma(); // let opponent_boma = boma.get_grabbed_opponent_boma(); // let damage = DamageModule::damage(opponent_boma, 0); @@ -67,21 +82,12 @@ unsafe extern "C" fn catchwait_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// uncomment this to prevent buffering pummels with nana -// #[status_script(agent = "nana", status = FIGHTER_STATUS_KIND_CATCH_ATTACK, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// unsafe fn catchattack_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// fighter.sub_shift_status_main(L2CValue::Ptr(catchattack_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn catchattack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// fighter.change_status(FIGHTER_STATUS_KIND_THROW.into(), false.into()); -// 0.into() -// } - -pub fn install() { - smashline::Agent::new("nana") - .status(Main, *FIGHTER_STATUS_KIND_DASH, dash) - .status(Main, *FIGHTER_STATUS_KIND_THROW, throw) - .status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catchwait_main) - .install(); -} \ No newline at end of file +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_DASH, dash); + agent.status(Exit, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exit); +} + +pub fn install_nana(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_THROW, throw_nana); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catchwait_nana_main); +} diff --git a/fighters/ike/src/acmd/aerials.rs b/fighters/ike/src/acmd/aerials.rs index 46f3c9cf67..ef6d4a8ca2 100644 --- a/fighters/ike/src/acmd/aerials.rs +++ b/fighters/ike/src/acmd/aerials.rs @@ -1,354 +1,351 @@ - use super::*; -unsafe extern "C" fn ike_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.0)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 20.0/(50.0-20.0)); + FT_MOTION_RATE(agent, 20.0/(50.0-20.0)); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ike_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn ike_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(8.0-1.0)); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(8.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(9.5-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(9.5-8.0)); } frame(lua_state, 9.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.2-9.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.2-9.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(45.0-20.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(45.0-20.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn ike_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn ike_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(7.1-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(7.1-4.0)); } frame(lua_state, 7.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-7.1)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-7.1)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(11.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(11.0-10.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/(40.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/(40.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ike_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 5.0/(46.0-31.0)); + FT_MOTION_RATE(agent, 5.0/(46.0-31.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ike_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 10); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 10); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), true, true); } } -unsafe extern "C" fn ike_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attackairn", ike_attack_air_n_game) - .acmd("effect_attackairn", ike_attack_air_n_effect) - .acmd("expression_attackairn", ike_attack_air_n_expression) - .acmd("game_attackairf", ike_attack_air_f_game) - .acmd("effect_attackairf", ike_attack_air_f_effect) - .acmd("expression_attackairf", ike_attack_air_f_expression) - .acmd("game_attackairb", ike_attack_air_b_game) - .acmd("game_attackairhi", ike_attack_air_hi_game) - .acmd("expression_attackairhi", ike_attack_air_hi_expression) - .acmd("game_attackairlw", ike_attack_air_lw_game) - .acmd("effect_attackairlw", ike_attack_air_lw_effect) - .acmd("effect_landingairlw", ike_landing_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/ike/src/acmd/ground.rs b/fighters/ike/src/acmd/ground.rs index 9bf47da25d..a2512c3446 100644 --- a/fighters/ike/src/acmd/ground.rs +++ b/fighters/ike/src/acmd/ground.rs @@ -1,131 +1,128 @@ - use super::*; -unsafe extern "C" fn ike_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn ike_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn ike_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ike_attack_dash_expression(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_attackdash(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); } frame(lua_state, 13.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attack11", ike_attack_11_game) - .acmd("game_attack12", ike_attack_12_game) - .acmd("game_attack13", ike_attack_13_game) - .acmd("game_attackdash", ike_attack_dash_game) - .acmd("expression_attackdash", ike_attack_dash_expression) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); +} \ No newline at end of file diff --git a/fighters/ike/src/acmd/mod.rs b/fighters/ike/src/acmd/mod.rs index e2d01f3d67..d8a22387b4 100644 --- a/fighters/ike/src/acmd/mod.rs +++ b/fighters/ike/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 7f5707d23e..602465b4af 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -1,335 +1,219 @@ - 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_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_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(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_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_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_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_ike_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ike_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_right_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_right_s")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_left_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_left_s")); } } -unsafe extern "C" fn 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 ike_appeal_lw_l_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_r_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); - if is_excute(fighter) { +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, Hash40::new("appeal_lw"), false, 0.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_sword_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn ike_sword_appeal_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT(fighter, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } - } -} - -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); - } -} - -pub fn install() { - smashline::Agent::new("ike_sword") - .acmd("game_appeallw", ike_sword_appeal_lw_game) - .acmd("effect_appeallw", ike_sword_appeal_lw_effect) - .install(); - smashline::Agent::new("ike") - .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("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appeallwl", ike_appeal_lw_l_sound) - .acmd("sound_appeallwr", ike_appeal_lw_r_sound) - .acmd("game_appeallwl", ike_appeal_lw_game) - .acmd("game_appeallwr", ike_appeal_lw_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("sound_appeallwl", sound_appeallwl); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ike/src/acmd/smashes.rs b/fighters/ike/src/acmd/smashes.rs index a9a1ebcc53..20bfd52752 100644 --- a/fighters/ike/src/acmd/smashes.rs +++ b/fighters/ike/src/acmd/smashes.rs @@ -1,273 +1,270 @@ - use super::*; -unsafe extern "C" fn ike_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(84.0-54.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(84.0-54.0)); } frame(lua_state, 84.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } - } -unsafe extern "C" fn ike_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ike_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -unsafe extern "C" fn ike_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0/(71.0-37.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0/(71.0-37.0)); AttackModule::clear_all(boma); } frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 31.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 46.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks4", ike_attack_s4_s_game) - .acmd("effect_attacks4", ike_attack_s4_s_effect) - .acmd("game_attackhi4", ike_attack_hi4_game) - .acmd("effect_attackhi4", ike_attack_hi4_effect) - .acmd("game_attacklw4", ike_attack_lw4_game) - .acmd("effect_attacklw4", ike_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ike/src/acmd/specials.rs b/fighters/ike/src/acmd/specials.rs index eac0ec26d2..e3ae813dfb 100644 --- a/fighters/ike/src/acmd/specials.rs +++ b/fighters/ike/src/acmd/specials.rs @@ -1,260 +1,258 @@ use super::*; -unsafe extern "C" fn ike_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ike_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ike_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_s_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); +unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); } -unsafe extern "C" fn ike_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } } -unsafe extern "C" fn ike_special_s_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 5.0); for _ in 0..3{ - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } } -unsafe extern "C" fn ike_special_s_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal02")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal02")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_special_s01")); + PLAY_SE(agent, Hash40::new("vc_ike_special_s01")); } } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_special_s02")); } } -unsafe extern "C" fn ike_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); } } -unsafe extern "C" fn ike_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // Instakill if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); //ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 7.0, 10.0, Some(0.0), Some(5.0), Some(-10.0), 5.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.05); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.05); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } } // Normal Quickdraw else { frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsattack(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 VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); /* let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector @@ -263,342 +261,318 @@ unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { } } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_special_air_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); //LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); } } -unsafe extern "C" fn ike_special_s_attack_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, 0, 3, 130, 300, 1, 0, 12, 24, 24); +unsafe extern "C" fn expression_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, 0, 3, 130, 300, 1, 0, 12, 24, 24); crate::sv_animcmd::AREA_WIND_2ND(lua_state); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slash_critical"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slash_critical"), 0); } } frame(lua_state, 1.3); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn ike_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(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 VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector ColorBlendModule::set_main_color(boma, /* Brightness */ &cbm_vec1, /* Diffuse */ &cbm_vec2, 0.0, 0.0, /*Fadein time*/ 15, /* Display Color */ true); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); for _ in 0..2{ - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_END_NO_LANDING); } } -unsafe extern "C" fn ike_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.82); - +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.82); } -unsafe extern "C" fn ike_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(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) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ike_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - boma.select_cliff_hangdata_from_name("special_hi"); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); - KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } -} - -unsafe extern "C" fn ike_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(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) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ika_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + boma.select_cliff_hangdata_from_name("special_hi"); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn ike_special_hi4_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"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_specialhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_specialnend", ike_special_n_end_game) - .acmd("game_specialairnend", ike_special_air_n_end_game) - .acmd("game_specialsstart", ike_special_s_start_game) - .acmd("game_specialairsstart", ike_special_air_s_start_game) - .acmd("effect_specialshold", ike_special_s_hold_effect) - .acmd("game_specialsdash", ike_special_s_dash_game) - .acmd("effect_specialsdash", ike_special_s_dash_effect) - .acmd("sound_specialsdash", ike_special_s_dash_sound) - .acmd("game_specialairsdash", ike_special_air_s_dash_game) - .acmd("game_specialsattack", ike_special_s_attack_game) - .acmd("effect_specialsattack", ike_special_s_attack_effect) - .acmd("game_specialairsattack", ike_special_air_s_attack_game) - .acmd("effect_specialairsattack", ike_special_air_s_attack_effect) - .acmd("expression_specialsattack", ike_special_s_attack_expression) - .acmd( - "expression_specialairsattack", - ike_special_s_attack_expression, - ) - .acmd("effect_specialsend", ike_special_s_end_effect) - .acmd("game_specialairsend", ike_special_air_s_end_game) - .acmd("game_specialhi1", ike_special_hi1_game) - .acmd("game_specialhi2", ike_special_hi2_game) - .acmd("game_specialairhi2", ike_special_hi2_game) - .acmd("game_specialhi3", ike_special_hi3_game) - .acmd("game_specialairhi2", ike_special_air_hi2_game) - .acmd("game_specialhi3", ika_special_hi3_game) - .acmd("game_specialairhi3", ika_special_hi3_game) - .acmd("game_specialhi4", ike_special_hi4_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("effect_specialsdash", effect_specialsdash); + agent.acmd("sound_specialsdash", sound_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("effect_specialairsattack", effect_specialairsattack); + agent.acmd("expression_specialsattack", expression_specialsattack); + agent.acmd("expression_specialairsattack", expression_specialsattack); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("game_specialhi4", game_specialhi4); } diff --git a/fighters/ike/src/acmd/throws.rs b/fighters/ike/src/acmd/throws.rs index e968961f59..89f6d65a04 100644 --- a/fighters/ike/src/acmd/throws.rs +++ b/fighters/ike/src/acmd/throws.rs @@ -1,199 +1,196 @@ - use super::*; -unsafe extern "C" fn ike_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ike_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ike_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 26, 16); + CHECK_FINISH_CAMERA(agent, 26, 16); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 15, 7); + CHECK_FINISH_CAMERA(agent, 15, 7); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.1); } frame(lua_state, 22.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(44.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(44.0-25.0)); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 12, 17); + CHECK_FINISH_CAMERA(agent, 12, 17); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 0); + CHECK_FINISH_CAMERA(agent, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_catch", ike_catch_game) - .acmd("game_catchdash", ike_catch_dash_game) - .acmd("game_catchturn", ike_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ike/src/acmd/tilts.rs b/fighters/ike/src/acmd/tilts.rs index 0b66ff6cfa..bc317fb9de 100644 --- a/fighters/ike/src/acmd/tilts.rs +++ b/fighters/ike/src/acmd/tilts.rs @@ -1,234 +1,228 @@ - use super::*; -unsafe extern "C" fn ike_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); + } + frame(lua_state, 42.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_s3_expression(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_attacks3(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); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(34.0-31.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(34.0-31.0)); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(3.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(3.5-1.0)); } frame(lua_state, 3.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-3.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-3.5)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Ground-only */ ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Air-only */ ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-6.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Ground-only */ ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Air-only */ ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 11.0/(27.0-11.0)); + FT_MOTION_RATE(agent, 11.0/(27.0-11.0)); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn ike_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks3hi", ike_attack_s3_hi_game) - .acmd("game_attacks3", ike_attack_s3_s_game) - .acmd("game_attacks3lw", ike_attack_s3_lw_game) - .acmd("expression_attacks3hi", ike_attack_s3_expression) - .acmd("expression_attacks3", ike_attack_s3_expression) - .acmd("expression_attacks3lw", ike_attack_s3_expression) - .acmd("game_attackhi3", ike_attack_hi3_game) - .acmd("game_attacklw3", ike_attack_lw3_game) - .acmd("expression_attacklw3", ike_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/ike/src/lib.rs b/fighters/ike/src/lib.rs index 8e2ddcc726..3e13e442e5 100644 --- a/fighters/ike/src/lib.rs +++ b/fighters/ike/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod sword; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ike"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + sword::install(); } diff --git a/fighters/ike/src/opff.rs b/fighters/ike/src/opff.rs index 0d8f3ec019..4fcf51d5d7 100644 --- a/fighters/ike/src/opff.rs +++ b/fighters/ike/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn aether_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, stick_x: f32, facing: f32) { if situation_kind != *SITUATION_KIND_AIR { return; @@ -458,8 +457,7 @@ pub unsafe fn ike_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ike") - .on_line(Main, ike_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ike_frame_wrapper); } diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status/mod.rs similarity index 54% rename from fighters/ike/src/status.rs rename to fighters/ike/src/status/mod.rs index 185ddfba96..1502179946 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status/mod.rs @@ -1,4 +1,8 @@ use super::*; +use globals::*; +// status script import + +mod rebirth; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -30,28 +34,14 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn ike_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_IKE { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VisibilityModule::set_int64(fighter.module_accessor, hash40("sword") as i64, hash40("sword_normal") as i64); - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("ike") - .on_start(ike_init) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + rebirth::install(agent); } diff --git a/fighters/ike/src/status/rebirth.rs b/fighters/ike/src/status/rebirth.rs new file mode 100644 index 0000000000..c7e460dd8d --- /dev/null +++ b/fighters/ike/src/status/rebirth.rs @@ -0,0 +1,16 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + VisibilityModule::set_int64(fighter.module_accessor, hash40("sword") as i64, hash40("sword_normal") as i64); + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} diff --git a/fighters/ike/src/sword/acmd.rs b/fighters/ike/src/sword/acmd.rs new file mode 100644 index 0000000000..bef6228a7f --- /dev/null +++ b/fighters/ike/src/sword/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + /* Air-only */ + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Ground-only */ + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ + EFFECT(agent, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_appeallw", game_appeallw); + agent.acmd("effect_appeallw", effect_appeallw); +} \ No newline at end of file diff --git a/fighters/ike/src/sword/mod.rs b/fighters/ike/src/sword/mod.rs new file mode 100644 index 0000000000..60629a8fdf --- /dev/null +++ b/fighters/ike/src/sword/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ike_sword"); + acmd::install(agent); + agent.install(); +} diff --git a/fighters/inkling/src/acmd/aerials.rs b/fighters/inkling/src/acmd/aerials.rs index 6c592fd364..3f02fe4ebd 100644 --- a/fighters/inkling/src/acmd/aerials.rs +++ b/fighters/inkling/src/acmd/aerials.rs @@ -1,187 +1,182 @@ - use super::*; -unsafe extern "C" fn inkling_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 7.0); - FT_MOTION_RATE(fighter, 8.0/(15.0-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("head"), 7.0, 55, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 7.0); + FT_MOTION_RATE(agent, 8.0/(15.0-6.0)); + ATTACK(agent, 0, 0, Hash40::new("head"), 7.0, 55, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 56.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 inkling_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 48, 70, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 48, 70, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(6.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 50, 105, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 50, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 50, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 50, 105, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 50, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 50, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(8.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, -1.0, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, 4.2, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 2.5, 2.4, -4.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.5, 367, 50, 0, 40, 2.5, 0.0, 0.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, -1.0, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, 4.2, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 2.5, 2.4, -4.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.5, 367, 50, 0, 40, 2.5, 0.0, 0.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 80, 165, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 80, 165, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn inkling_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 16.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 16.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 270, 80, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 270, 80, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 270, 65, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 270, 65, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 10.0); AttackModule::set_ink_value(boma, 1, 10.0); AttackModule::set_ink_value(boma, 2, 10.0); @@ -190,23 +185,24 @@ unsafe extern "C" fn inkling_attack_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_ink_value(boma, 5, 10.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attackairn", inkling_attack_air_n_game) - .acmd("game_attackairf", inkling_attack_air_f_game) - .acmd("game_attackairb", inkling_attack_air_b_game) - .acmd("game_attackairhi", inkling_attack_air_hi_game) - .acmd("expression_attackairhi", inkling_attack_air_hi_expression) - .acmd("game_attackairlw", inkling_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/inkling/src/acmd/ground.rs b/fighters/inkling/src/acmd/ground.rs index d4e31f1402..9cd31c406c 100644 --- a/fighters/inkling/src/acmd/ground.rs +++ b/fighters/inkling/src/acmd/ground.rs @@ -1,77 +1,76 @@ - use super::*; -unsafe extern "C" fn inkling_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.5, 81, 100, 22, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.25, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 15, 2.5, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.5, 81, 100, 22, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.25, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 15, 2.5, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn inkling_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 80, 100, 25, 0, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 2.5, 80, 100, 25, 0, 3.75, 1.0, -2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 80, 100, 25, 0, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 2.5, 80, 100, 25, 0, 3.75, 1.0, -2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn inkling_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 4.0, 50, 90, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 4.0, 50, 90, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 7.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 16.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 21.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 7.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 16.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 21.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 10.0); AttackModule::set_ink_value(boma, 1, 10.0); AttackModule::set_ink_value(boma, 2, 10.0); @@ -79,17 +78,17 @@ unsafe extern "C" fn inkling_attack_100_end_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.84 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); - if is_excute(fighter) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID){ ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, 0); } @@ -107,39 +106,38 @@ unsafe extern "C" fn inkling_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 85, 0, 60, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 85, 0, 60, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 50, 0, 85, 3.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 50, 0, 85, 3.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attack11", inkling_attack_11_game) - .acmd("game_attack12", inkling_attack_12_game) - .acmd("game_attack13", inkling_attack_13_game) - .acmd("game_attack100end", inkling_attack_100_end_game) - .acmd("game_attackdash", inkling_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/inkling/src/acmd/mod.rs b/fighters/inkling/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/inkling/src/acmd/mod.rs +++ b/fighters/inkling/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/inkling/src/acmd/other.rs b/fighters/inkling/src/acmd/other.rs index d03a5d727b..390e17d32e 100644 --- a/fighters/inkling/src/acmd/other.rs +++ b/fighters/inkling/src/acmd/other.rs @@ -1,439 +1,167 @@ - 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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_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(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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_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_inkling_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_inkling_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn inkling_inkbullet_fly_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"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - AttackModule::enable_safe_pos(boma); - AttackModule::set_ink_value(boma, 0, 0.0); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - AttackModule::set_ink_value(boma, 0, 0.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_walk_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("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 60.0); - AttackModule::set_ink_value(boma, 1, 60.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_walk_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("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 60.0); - AttackModule::set_ink_value(boma, 1, 60.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_walk_no_ink_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("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_roller_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 120.0); - AttackModule::set_ink_value(boma, 1, 120.0); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_dash_no_ink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_roller_special_s_run_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("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_run_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("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_run_no_ink_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("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_splash_normal_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if !WorkModule::is_flag(owner_boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_AFTER_SPECIAL_HI) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - AttackModule::set_ink_value(boma, 0, 50.0); - AttackModule::set_ink_value(boma, 1, 50.0); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - AttackModule::set_ink_value(boma, 0, 40.0); - AttackModule::set_ink_value(boma, 1, 40.0); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - } -} - -unsafe extern "C" fn inkling_splashbomb_explode_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"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); - AttackModule::set_ink_value(boma, 0, 0.0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 12.0); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 14.0); - } - wait(lua_state, 2.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")); - - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(fighter.module_accessor); - let motion_frame = MotionModule::frame(fighter.module_accessor); - let motion_rate = MotionModule::rate(fighter.module_accessor); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); - if is_excute(fighter) { - ArticleModule::set_frame(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(fighter.module_accessor); + let motion_kind = MotionModule::motion_kind(boma); + let motion_frame = MotionModule::frame(boma); + let motion_rate = MotionModule::rate(boma); + ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + if is_excute(agent) { + ArticleModule::set_frame(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } 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(); - - if is_excute(fighter) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(fighter.module_accessor); - let motion_frame = MotionModule::frame(fighter.module_accessor); - let motion_rate = MotionModule::rate(fighter.module_accessor); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); - if is_excute(fighter) { - ArticleModule::set_frame(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(fighter.module_accessor); + let motion_kind = MotionModule::motion_kind(boma); + let motion_frame = MotionModule::frame(boma); + let motion_rate = MotionModule::rate(boma); + ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + if is_excute(agent) { + ArticleModule::set_frame(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } 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, 30.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } 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); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("inkling_splash") - .acmd("game_normal", inkling_splash_normal_game) - .install(); - smashline::Agent::new("inkling_splashbomb") - .acmd("game_explode", inkling_splashbomb_explode_game) - .install(); - smashline::Agent::new("inkling") - .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_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("inkling_inkbullet") - .acmd("game_fly", inkling_inkbullet_fly_game) - .install(); - smashline::Agent::new("inkling_roller") - .acmd("game_specialswalk", inkling_roller_special_s_walk_game) - .acmd("game_specialairswalk", inkling_roller_special_air_s_walk_game) - .acmd("game_specialswalknoink", inkling_roller_special_s_walk_no_ink_game) - .acmd("game_specialsdash", inkling_roller_special_s_dash_game) - .acmd("game_specialairsdash", inkling_roller_special_air_s_dash_game) - .acmd("game_specialsdashnoink", inkling_roller_special_s_dash_no_ink_game) - .acmd("game_specialsrun", inkling_roller_special_s_run_game) - .acmd("game_specialairsrun", inkling_roller_special_air_s_run_game) - .acmd("game_specialsrunnoink", inkling_roller_special_s_run_no_ink_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_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/inkling/src/acmd/smashes.rs b/fighters/inkling/src/acmd/smashes.rs index e16f602743..061ef1b896 100644 --- a/fighters/inkling/src/acmd/smashes.rs +++ b/fighters/inkling/src/acmd/smashes.rs @@ -1,106 +1,100 @@ - use super::*; -unsafe extern "C" fn inkling_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, false, 0); ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_s"), true, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_s"), true, 6.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 95, 0, 36, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 95, 0, 36, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 95, 0, 36, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 95, 0, 36, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 120.0); } if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_s4_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_charge"), false, 0.0); } - } -unsafe extern "C" fn inkling_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4"), true, 0.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME)); } } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 100, 100, 0, 3.5, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 100, 100, 0, 3.5, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 88, 82, 0, 55, 12.5, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 88, 100, 0, 55, 14.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 88, 82, 0, 55, 12.5, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 88, 100, 0, 55, 14.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 120.0); AttackModule::set_ink_value(boma, 1, 100.0); } if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 88, 66, 0, 55, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 88, 66, 0, 55, 12.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 88, 66, 0, 55, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 88, 66, 0, 55, 12.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi4_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4_charge"), false, 0.0); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attacks4", inkling_attack_s4_s_game) - .acmd("game_attacks4charge", inkling_attack_s4_hold_game) - .acmd("game_attackhi4", inkling_attack_hi4_game) - .acmd("game_attackhi4charge", inkling_attack_hi4_hold_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4charge", game_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4charge", game_attackhi4charge); } diff --git a/fighters/inkling/src/acmd/specials.rs b/fighters/inkling/src/acmd/specials.rs index 594ad55797..4b674cf781 100644 --- a/fighters/inkling/src/acmd/specials.rs +++ b/fighters/inkling/src/acmd/specials.rs @@ -1,62 +1,61 @@ - use super::*; -unsafe extern "C" fn inkling_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 3, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if agent.kind() == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 3, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } AttackModule::set_ink_value(boma, 0, 15.0); AttackModule::set_ink_value(boma, 1, 15.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if agent.kind() == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } AttackModule::set_ink_value(boma, 0, 15.0); AttackModule::set_ink_value(boma, 1, 15.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 15.0, 0, 180, 0, 1.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("inkling_squid_change"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 2.0, true); - LAST_PARTICLE_SET_COLOR(fighter, WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_R), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_G), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_B)); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 15.0, 0, 180, 0, 1.15, true); + EFFECT_FOLLOW(agent, Hash40::new("inkling_squid_change"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 2.0, true); + LAST_PARTICLE_SET_COLOR(agent, WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_R), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_G), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_B)); EffectModule::enable_sync_init_pos_last(boma); } } @@ -73,11 +72,11 @@ unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_specialnend", inkling_special_n_end_game) - .acmd("game_specialairnend", inkling_special_air_n_end_game) - .acmd("effect_specialsend", inkling_special_s_end_effect) - .acmd("game_specialhijump", game_specialhijump) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + + agent.acmd("effect_specialsend", effect_specialsend); + + agent.acmd("game_specialhijump", game_specialhijump); } diff --git a/fighters/inkling/src/acmd/throws.rs b/fighters/inkling/src/acmd/throws.rs index 804b745107..b7076866c3 100644 --- a/fighters/inkling/src/acmd/throws.rs +++ b/fighters/inkling/src/acmd/throws.rs @@ -1,27 +1,26 @@ use super::*; -unsafe extern "C" fn inkling_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 inkling_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -71,7 +70,7 @@ unsafe extern "C" fn inkling_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -121,38 +120,37 @@ unsafe extern "C" fn inkling_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 5.5, 0.0, 13.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 5.5, 0.0, 13.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 80.0); AttackModule::set_catch_only_all(boma, true, false); } - CHECK_FINISH_CAMERA(fighter, 10, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE_RANGE(fighter, 30.0, 45.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 7.0); frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn inkling_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); @@ -175,67 +173,68 @@ unsafe extern "C" fn inkling_throw_b_game(fighter: &mut L2CAgentBase) { else { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new("throw_b_r"), false, -1.0); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 92, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 92, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 17, 5); + CHECK_FINISH_CAMERA(agent, 17, 5); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn inkling_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 68, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 68, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.5, 0.0, 5.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.5, 0.0, 5.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 7, 0); + CHECK_FINISH_CAMERA(agent, 7, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_catch", inkling_catch_game) - .acmd("game_catchdash", inkling_catch_dash_game) - .acmd("game_catchturn", inkling_catch_turn_game) - .acmd("game_throwf", inkling_throw_f_game) - .acmd("game_throwb", inkling_throw_b_game) - .acmd("game_throwlw", inkling_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/inkling/src/acmd/tilts.rs b/fighters/inkling/src/acmd/tilts.rs index ce3f11121e..79d82c4902 100644 --- a/fighters/inkling/src/acmd/tilts.rs +++ b/fighters/inkling/src/acmd/tilts.rs @@ -1,104 +1,100 @@ - use super::*; -unsafe extern "C" fn inkling_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 80, 0, 64, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 80, 0, 64, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 1.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 6.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 80, 0, 64, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 80, 0, 64, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 1.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 6.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn inkling_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 5, 100, 20, 0, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 190, 100, 25, 0, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 5, 100, 20, 0, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 190, 100, 25, 0, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 0.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 0.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attacks3", inkling_attack_s3_s_game) - .acmd("game_attackhi3", inkling_attack_hi3_game) - .acmd("expression_attackhi3", inkling_attack_hi3_expression) - .acmd("game_attacklw3", inkling_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/inkling/src/inkbullet/acmd.rs b/fighters/inkling/src/inkbullet/acmd.rs new file mode 100644 index 0000000000..67f14ca8b0 --- /dev/null +++ b/fighters/inkling/src/inkbullet/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::enable_safe_pos(boma); + AttackModule::set_ink_value(boma, 0, 0.0); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::set_ink_value(boma, 0, 0.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/inkling/src/inkbullet/mod.rs b/fighters/inkling/src/inkbullet/mod.rs new file mode 100644 index 0000000000..0f79befb05 --- /dev/null +++ b/fighters/inkling/src/inkbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_inkbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/lib.rs b/fighters/inkling/src/lib.rs index e9c22ddd20..cb897b96dd 100644 --- a/fighters/inkling/src/lib.rs +++ b/fighters/inkling/src/lib.rs @@ -4,28 +4,57 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod inkbullet; +mod roller; +mod splash; +mod splashbomb; use smash::{ + lib::{ + L2CValue, + LuaConst + }, app::{ - self, - lua_bind::*, - sv_animcmd::{frame, wait}, *, + self, + sv_animcmd::{ + frame, + wait + }, + lua_bind::* }, hash40, lib::lua_const::*, - lib::{L2CValue, LuaConst}, lua2cpp::*, - phx::*, + phx::* +}; +use smash_script::{ + *, + macros::* +}; +use utils::{ + *, + util::*, + ext::*, + consts::*, }; -use smash_script::{macros::*, *}; use smashline::*; -use utils::{consts::*, ext::*, util::*, *}; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("inkling"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + inkbullet::install(); + roller::install(); + splash::install(); + splashbomb::install(); } diff --git a/fighters/inkling/src/opff.rs b/fighters/inkling/src/opff.rs index de53961b58..46863773b1 100644 --- a/fighters/inkling/src/opff.rs +++ b/fighters/inkling/src/opff.rs @@ -158,11 +158,8 @@ pub unsafe fn inkling_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("inkling") - .on_line(Main, inkling_frame_wrapper) - .install(); - skyline::install_hooks!( - get_ink_colors - ); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, inkling_frame_wrapper); + + skyline::install_hooks!(get_ink_colors); } diff --git a/fighters/inkling/src/roller/acmd.rs b/fighters/inkling/src/roller/acmd.rs new file mode 100644 index 0000000000..7d67b6c9a4 --- /dev/null +++ b/fighters/inkling/src/roller/acmd.rs @@ -0,0 +1,114 @@ +use super::*; + +unsafe extern "C" fn game_specialswalk(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 60.0); + AttackModule::set_ink_value(boma, 1, 60.0); + } +} + +unsafe extern "C" fn game_specialswalknoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 120.0); + AttackModule::set_ink_value(boma, 1, 120.0); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialsdashnoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_specialsrun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialairsrun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialsrunnoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialswalk", game_specialswalk); + agent.acmd("game_specialairswalk", game_specialswalk); + agent.acmd("game_specialswalknoink", game_specialswalknoink); + + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsdashnoink", game_specialsdashnoink); + + agent.acmd("game_specialsrun", game_specialsrun); + agent.acmd("game_specialairsrun", game_specialairsrun); + agent.acmd("game_specialsrunnoink", game_specialsrunnoink); +} \ No newline at end of file diff --git a/fighters/inkling/src/roller/mod.rs b/fighters/inkling/src/roller/mod.rs new file mode 100644 index 0000000000..0b895524df --- /dev/null +++ b/fighters/inkling/src/roller/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_roller"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/splash/acmd.rs b/fighters/inkling/src/splash/acmd.rs new file mode 100644 index 0000000000..61298abb66 --- /dev/null +++ b/fighters/inkling/src/splash/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_normal(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if !WorkModule::is_flag(owner_boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_AFTER_SPECIAL_HI) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + AttackModule::set_ink_value(boma, 0, 50.0); + AttackModule::set_ink_value(boma, 1, 50.0); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + AttackModule::set_ink_value(boma, 0, 40.0); + AttackModule::set_ink_value(boma, 1, 40.0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_normal", game_normal); +} \ No newline at end of file diff --git a/fighters/inkling/src/splash/mod.rs b/fighters/inkling/src/splash/mod.rs new file mode 100644 index 0000000000..def1e8d486 --- /dev/null +++ b/fighters/inkling/src/splash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_splash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/splashbomb/acmd.rs b/fighters/inkling/src/splashbomb/acmd.rs new file mode 100644 index 0000000000..74bd342ee4 --- /dev/null +++ b/fighters/inkling/src/splashbomb/acmd.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); + AttackModule::set_ink_value(boma, 0, 0.0); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 12.0); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 14.0); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/inkling/src/splashbomb/mod.rs b/fighters/inkling/src/splashbomb/mod.rs new file mode 100644 index 0000000000..3b94a3e106 --- /dev/null +++ b/fighters/inkling/src/splashbomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_splashbomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/status/guard.rs b/fighters/inkling/src/status/guard.rs new file mode 100644 index 0000000000..4c5f9a743e --- /dev/null +++ b/fighters/inkling/src/status/guard.rs @@ -0,0 +1,18 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD_ON + +unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOn() +} + +// FIGHTER_STATUS_KIND_GUARD + +unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_Guard() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on_main); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); +} diff --git a/fighters/inkling/src/status.rs b/fighters/inkling/src/status/mod.rs similarity index 50% rename from fighters/inkling/src/status.rs rename to fighters/inkling/src/status/mod.rs index 3b28eea35c..b1e6ce299d 100644 --- a/fighters/inkling/src/status.rs +++ b/fighters/inkling/src/status/mod.rs @@ -1,14 +1,9 @@ use super::*; +use globals::*; +// status script import mod special_s; - -unsafe extern "C" fn guard_on(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOn() -} - -unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Guard() -} +mod guard; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -28,21 +23,15 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn inkling_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_INKLING { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - special_s::install(); - smashline::Agent::new("inkling") - .status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on) - .status(Main, *FIGHTER_STATUS_KIND_GUARD, guard) - .on_start(inkling_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); + guard::install(agent); } diff --git a/fighters/inkling/src/status/special_s.rs b/fighters/inkling/src/status/special_s.rs index 5a50ee7cb5..be2fcd4d44 100644 --- a/fighters/inkling/src/status/special_s.rs +++ b/fighters/inkling/src/status/special_s.rs @@ -3,7 +3,7 @@ use globals::*; // FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK -pub unsafe extern "C" fn special_s_walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { // Once per airtime if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { VarModule::on_flag(fighter.battle_object, vars::inkling::instance::DISABLE_SPECIAL_S); @@ -13,7 +13,7 @@ pub unsafe extern "C" fn special_s_walk(fighter: &mut L2CFighterCommon) -> L2CVa // FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN -pub unsafe extern "C" fn special_s_run(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_run_main(fighter: &mut L2CFighterCommon) -> L2CValue { // Once per airtime if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { VarModule::on_flag(fighter.battle_object, vars::inkling::instance::DISABLE_SPECIAL_S); @@ -21,9 +21,9 @@ pub unsafe extern "C" fn special_s_run(fighter: &mut L2CFighterCommon) -> L2CVal smashline::original_status(Main, fighter, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN)(fighter) } -// FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END +// special_s_jump_end_init -pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_jump_end_init(fighter: &mut L2CFighterCommon) -> L2CValue { // Burn double jump when jumping out of Splat Roller if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && fighter.get_num_used_jumps() < fighter.get_jump_count_max() { @@ -32,22 +32,8 @@ pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("inkling") - .status( - Main, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK, - special_s_walk, - ) - .status( - Main, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN, - special_s_run, - ) - .status( - Init, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END, - special_s_jump_init, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK, special_s_walk_main); + agent.status(Main, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN, special_s_run_main); + agent.status(Init, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_init); } diff --git a/fighters/jack/src/acmd/aerials.rs b/fighters/jack/src/acmd/aerials.rs index 190df45d16..0771266ffd 100644 --- a/fighters/jack/src/acmd/aerials.rs +++ b/fighters/jack/src/acmd/aerials.rs @@ -1,464 +1,455 @@ - use super::*; -unsafe extern "C" fn jack_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(10.0-1.0)); + FT_MOTION_RATE(agent, 8.0/(10.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 56, 87, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 56, 87, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 56, 87, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 56, 87, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("throw"), 3.0, 52, 139, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("throw"), 3.0, 52, 139, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("throw"), 2.0, 361, 139, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("throw"), 2.0, 361, 139, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 28.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE(fighter, 15.0/(51.0-28.0)); + FT_MOTION_RATE(agent, 15.0/(51.0-28.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn jack_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_attack_arc3"), Hash40::new("top"), 0, 9, 0, 0, 180, -90, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_attack_arc3"), Hash40::new("top"), 0, 9, 0, 0, 180, -90, 0.7, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_front"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_front"), true, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); } - } -unsafe extern "C" fn jack_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 10); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); } } -unsafe extern "C" fn jack_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_n"), 0); +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_n"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } -unsafe extern "C" fn jack_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 5.0/(9.0-7.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(9.0-7.0)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 40, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 40, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 40, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 40, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 4.0, 80, 35, 0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 4.0, 80, 35, 0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } else{ // Air-only - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 50, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 50, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100,50, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 50, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 50, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100,50, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneer"), 4.0, 80, 35,0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneer"), 4.0, 80, 35,0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 361, 110, 0, 58, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 58, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 17.0, 0.0, Some(0.0), Some(16.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 361, 110, 0, 58, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 58, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 17.0, 0.0, Some(0.0), Some(16.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 125, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 361, 125, 0, 40, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 361, 125, 0, 40, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 125, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 361, 125, 0, 40, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 361, 125, 0, 40, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 27.0/(39.0-17.0)); + FT_MOTION_RATE(agent, 27.0/(39.0-17.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn jack_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_f"), 0); +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_f"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } -unsafe extern "C" fn jack_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 45, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 45, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 29.0/(32.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 29.0/(32.0-9.0)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 43, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 43, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn jack_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn jack_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_b"), 0); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_b"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } - } -unsafe extern "C" fn jack_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); //Air only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 1.5, 367, 87, 0, 44, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 1.5, 367, 87, 0, 44, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Ground only - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 1.5, 367, 30, 0, 33, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 1.5, 367, 30, 0, 33, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 20.0, 1.5, Some(0.0), Some(24.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 20.0, 1.5, Some(0.0), Some(24.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 23.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 21.0/(40.0-23.0)); + FT_MOTION_RATE(agent, 21.0/(40.0-23.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn jack_landing_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_hi"), 0); +unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_hi"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } -unsafe extern "C" fn jack_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 8.0/(12.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0/(12.5-12.0)); + FT_MOTION_RATE(agent, 1.0/(12.5-12.0)); frame(lua_state, 12.5); - FT_MOTION_RATE(fighter, 1.0/(13.0-12.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.5)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 367, 64, 0, 37, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 367, 64, 0, 37, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 361, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 361, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 2.5, 0.0, -1.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 3.0, 0.0, 2.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 2.5, 0.0, -1.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 3.0, 0.0, 2.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 1, Hash40::new("top"), 10.0, 270, 96, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("top"), 10.0, 270, 96, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 4, 1, Hash40::new("top"), 10.0, 270, 58, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 1, Hash40::new("top"), 10.0, 270, 58, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } else{ /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 47.0/(47.0-9.0)); + FT_MOTION_RATE(agent, 47.0/(47.0-9.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } -unsafe extern "C" fn jack_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 6); } frame(lua_state, 15.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } } -unsafe extern "C" fn jack_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_lw"), 0); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attackairn", jack_attack_air_n_game) - .acmd("effect_attackairn", jack_attack_air_n_effect) - .acmd("expression_attackairn", jack_attack_air_n_expression) - .acmd("game_landingairn", jack_landing_air_n_game) - .acmd("game_attackairf", jack_attack_air_f_game) - .acmd("game_landingairf", jack_landing_air_f_game) - .acmd("game_attackairb", jack_attack_air_b_game) - .acmd("expression_attackairb", jack_attack_air_b_expression) - .acmd("game_landingairb", jack_landing_air_b_game) - .acmd("game_attackairhi", jack_attack_air_hi_game) - .acmd("game_landingairhi", jack_landing_air_hi_game) - .acmd("game_attackairlw", jack_attack_air_lw_game) - .acmd("expression_attackairlw", jack_attack_air_lw_expression) - .acmd("game_landingairlw", jack_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_landingairhi", game_landingairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/jack/src/acmd/ground.rs b/fighters/jack/src/acmd/ground.rs index 3316d44c4a..976edeba23 100644 --- a/fighters/jack/src/acmd/ground.rs +++ b/fighters/jack/src/acmd/ground.rs @@ -1,202 +1,195 @@ - use super::*; -unsafe extern "C" fn jack_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 4.0, 0.0, 7.5, 12.5, Some(0.0), Some(7.5), Some(15.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 4.0, 0.0, 7.5, 12.5, Some(0.0), Some(7.5), Some(15.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 7.5, Some(0.0), Some(7.5), Some(10.8), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 5, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 10.8, Some(0.0), Some(7.5), Some(14.7), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 7.5, Some(0.0), Some(7.5), Some(10.8), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 5, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 10.8, Some(0.0), Some(7.5), Some(14.7), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn jack_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 13.0, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 30, 0, 25, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 13.0, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 30, 0, 25, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 10.5, Some(0.0), Some(8.0), Some(15.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 5, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(18.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 10.5, Some(0.0), Some(8.0), Some(15.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 5, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(18.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn jack_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 13.5, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 5.0, 361, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 13.5, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 5.0, 361, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 1.6, 361, 135, 0, 65, 3.5, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(14.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 1, Hash40::new("top"), 1.6, 361, 135, 0, 65, 3.5, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(14.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 27.0/(28.0-6.0)); + FT_MOTION_RATE(agent, 27.0/(28.0-6.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); } else{ - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 7.0); JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 4.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 4.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 5.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 5.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 23.0/(38.0-17.0)); + FT_MOTION_RATE(agent, 23.0/(38.0-17.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn jack_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -1.5, 0, 0, 0, 0.8, 0, 0, 1.5, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -1.5, 0, 0, 0, 0.8, 0, 0, 1.5, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_attack_line"), Hash40::new("top"), 0, 4, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_attack_line"), Hash40::new("top"), 0, 4, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("jack_attack_line2"), Hash40::new("top"), 7, 2, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_attack_line2"), Hash40::new("top"), 7, 2, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("jack_attack_line2"), Hash40::new("top"), -7, 2, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_attack_line2"), Hash40::new("top"), -7, 2, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 6, 0, -2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 6, 0, -2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 8, 0, -2.5, 0, 0, 0, 0.45, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 8, 0, -2.5, 0, 0, 0, 0.45, 0, 0, 1.5, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 7, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 7, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); } } - } -unsafe extern "C" fn jack_attack_dash_expression(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_INTP, *SLOPE_STATUS_TOP, 5); +unsafe extern "C" fn expression_attackdash(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_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attack11", jack_attack_11_game) - .acmd("game_attack12", jack_attack_12_game) - .acmd("game_attack13", jack_attack_13_game) - .acmd("game_attackdash", jack_attack_dash_game) - .acmd("effect_attackdash", jack_attack_dash_effect) - .acmd("expression_attackdash", jack_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/jack/src/acmd/mod.rs b/fighters/jack/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/jack/src/acmd/mod.rs +++ b/fighters/jack/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 02ee59fc6a..6039aa4798 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -1,287 +1,146 @@ - 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_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) { - 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_jack_rnd_futtobi01"), Hash40::new("seq_jack_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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) { + 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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_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_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); } } -unsafe extern "C" fn jack_appeal_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn jack_appeal_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn jack_appeal_s_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn jack_appeal_s_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn jack_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn jack_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_jack_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_jack_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_jack_step_left_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_jack_step_left_s")); } } -unsafe extern "C" fn 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, 12.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 jack_fire_hit_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"), 2.0, 75, 200, 0, 25, 8.5, 0.0, 1.5, 0.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } } -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 jack_attack_lw3_sound(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 8.0); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 8.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n01")); } } -unsafe extern "C" fn jack_attack_lw3_sound_ex(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); +unsafe extern "C" fn sound_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - } -pub fn install() { - smashline::Agent::new("jack_fire") - .acmd("game_hit", jack_fire_hit_game) - .install(); - smashline::Agent::new("jack") - .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("game_appealhil", jack_appeal_hi_l_game) - .acmd("game_appealhir", jack_appeal_hi_r_game) - .acmd("game_appealsl", jack_appeal_s_l_game) - .acmd("game_appealsr", jack_appeal_s_r_game) - .acmd("game_appeallwl", jack_appeal_lw_l_game) - .acmd("game_appeallwr", jack_appeal_lw_r_game) - .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("sound_attacklw3", jack_attack_lw3_sound) - .acmd("sound_attacklw3_ex", jack_attack_lw3_sound_ex) - .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("game_dash", game_dash); + 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_attacklw3", sound_attacklw3); + agent.acmd("sound_attacklw3_ex", sound_attacklw3_ex); } diff --git a/fighters/jack/src/acmd/smashes.rs b/fighters/jack/src/acmd/smashes.rs index f7b566a1f1..1427e8a2e5 100644 --- a/fighters/jack/src/acmd/smashes.rs +++ b/fighters/jack/src/acmd/smashes.rs @@ -1,242 +1,238 @@ - use super::*; -unsafe extern "C" fn jack_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 8.0/(15.5-7.0)); + FT_MOTION_RATE(agent, 8.0/(15.5-7.0)); frame(lua_state, 15.5); - FT_MOTION_RATE(fighter, 1.0/(16.0-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(16.0-15.5)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 16.0, 11.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 16.0, 11.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 10.0, 13.0, Some(0.0), Some(6.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 10.0, 13.0, Some(0.0), Some(6.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(9.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(10.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(9.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(10.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 9.0, 13.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 9.0, 13.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 42.0/(57.0-19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 42.0/(57.0-19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { } } - } -unsafe extern "C" fn jack_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn jack_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 3.0/(7.0-2.0)); + FT_MOTION_RATE(agent, 3.0/(7.0-2.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 3.0/(12.0-8.0)); + FT_MOTION_RATE(agent, 3.0/(12.0-8.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 7.0, 8.0, Some(0.0), Some(13.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 83, 116, 0, 43, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 7.0, 8.0, Some(0.0), Some(13.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 83, 116, 0, 43, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.5, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 83, 122, 0, 43, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("knife"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("armr"), 3.0, 83, 180, 0, 59, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.5, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 83, 122, 0, 43, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("knife"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("armr"), 3.0, 83, 180, 0, 59, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 47.0/(60.0-18.0)); + FT_MOTION_RATE(agent, 47.0/(60.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 7.0); app::sv_animcmd::execute(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 1.0, 4.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 1.0, 4.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 4.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 38, 250, 0, 44, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 4.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 38, 250, 0, 44, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 1.0, 4.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 1.0, 4.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 4.5, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 30, 250, 0, 44, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 4.5, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 30, 250, 0, 44, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } wait(lua_state, 2.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 40.0/(54.0-18.0)); + FT_MOTION_RATE(agent, 40.0/(54.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attacks4", jack_attack_s4_s_game) - .acmd("expression_attacks4", jack_attack_s4_s_expression) - .acmd("game_attackhi4", jack_attack_hi4_game) - .acmd("expression_attackhi4", jack_attack_hi4_expression) - .acmd("game_attacklw4", jack_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/jack/src/acmd/specials.rs b/fighters/jack/src/acmd/specials.rs index fc90fbfbab..1e885e642e 100644 --- a/fighters/jack/src/acmd/specials.rs +++ b/fighters/jack/src/acmd/specials.rs @@ -1,141 +1,139 @@ - use super::*; -unsafe extern "C" fn jack_special_airn_down_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairndown(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); for _ in 0..20 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } } - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 50, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-22.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.8, 55, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 50, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-22.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.8, 55, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } } - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); } - } -unsafe extern "C" fn jack_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, Hash40::new("special_hi"), false, 0.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_JACK_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); - ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); + ENABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); - ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); + ENABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 20.0); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("throw"), 3.0, 1.5, 1.5, 0.7, Some(1.5), Some(-15.0), Some(-6.4), *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); - SEARCH(fighter, 1, 0, Hash40::new("throw"), 5.5, 1.5, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); - SEARCH(fighter, 2, 0, Hash40::new("throw"), 5.5, 1.2, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 1.5, 1.5, 0.7, Some(1.5), Some(-15.0), Some(-6.4), *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + SEARCH(agent, 1, 0, Hash40::new("throw"), 5.5, 1.5, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + SEARCH(agent, 2, 0, Hash40::new("throw"), 5.5, 1.2, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - SET_SEARCH_SIZE_EXIST(fighter, 2, 8); + if is_excute(agent) { + SET_SEARCH_SIZE_EXIST(agent, 2, 8); } frame(lua_state, 23.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + UNABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); } } -unsafe extern "C" fn jack_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_JACK_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_JACK_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); // AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); // ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); @@ -143,91 +141,90 @@ unsafe extern "C" fn jack_special_air_hi_game(fighter: &mut L2CAgentBase) { // ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 70, 60, 0, 60, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 70,60, 0, 60, 6.5, 0.0, 22.0, 3.2, Some(0.0), Some(38.0), Some(10.6), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 70, 60, 0, 60, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 70,60, 0, 60, 6.5, 0.0, 22.0, 3.2, Some(0.0), Some(38.0), Some(10.6), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 255, 15, 0, 70, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 255, 15, 0, 70, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - SET_SEARCH_SIZE_EXIST(fighter, 2, 8); + if is_excute(agent) { + SET_SEARCH_SIZE_EXIST(agent, 2, 8); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { // UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); // UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); } } -unsafe extern "C" fn jack_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, -1, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, -1, 0.6, true); } } else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, 1, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, 1, 0.6, true); } } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("jack_wire_line"), false, true); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("jack_wire_line"), false, true); } } -unsafe extern "C" fn jack_special_air_hi_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhif(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::mul_speed(boma, &Vector3f::new(0.8, 1.0, 1.0), *FIGHTER_KINETIC_ENERGY_ID_STOP); ArticleModule::change_motion(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WING, Hash40::new("special_hi2_f"), false, 0.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 34.0); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_JACK_STATUS_SPECIAL_HI2_FLAG_APPEAR_DOYLE); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_specialairndown", jack_special_airn_down_game) - .acmd("game_specialhi", jack_special_hi_game) - .acmd("game_specialairhi", jack_special_air_hi_game) - .acmd("effect_specialairhi", jack_special_air_hi_effect) - .acmd("game_specialairhif", jack_special_air_hi_f_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairndown", game_specialairndown); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_specialairhif", game_specialairhif); } diff --git a/fighters/jack/src/acmd/throws.rs b/fighters/jack/src/acmd/throws.rs index f7992855d5..af6bef8eb9 100644 --- a/fighters/jack/src/acmd/throws.rs +++ b/fighters/jack/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn jack_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 8.1, 0.0, Some(0.0), Some(8.1), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.1, 0.0, Some(0.0), Some(8.1), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 jack_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn jack_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -64,31 +63,30 @@ unsafe extern "C" fn jack_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 134, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 134, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_catch", jack_catch_game) - .acmd("game_catchdash", jack_catch_dash_game) - .acmd("game_catchturn", jack_catch_turn_game) - .acmd("game_throwb", jack_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 54a7894255..08cc6f95fd 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -1,385 +1,354 @@ use super::*; -unsafe extern "C" fn jack_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 105, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 105, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 35, 61, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 35, 61, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 35, 61, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 35, 61, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(9.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(9.0-1.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"),2.0, 115, 100, 80, 0, 2.5, -1.0, 0.0, 0.0, Some(1.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 1.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 3.3, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"),2.0, 115, 100, 80, 0, 2.5, -1.0, 0.0, 0.0, Some(1.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 1.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 3.3, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 90, 116, 0, 75, 5.0, 0.0, 1.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 90, 116, 0, 75, 5.0, 0.0, 1.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 2, 1, Hash40::new("knife"), 5.0, 90, 144, 0, 55, 5.0, 0.0, 1.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("knife"), 5.0, 90, 144, 0, 55, 5.0, 0.0, 1.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 27.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 27.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_hi3_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 as u64, *EFFECT_AXIS_X, 0.0 as u64, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 as u64, *EFFECT_AXIS_X, 0.0 as u64, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 180, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 180, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_front"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_spin"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_front"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_spin"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); } if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_lightning"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_lightning"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_spin"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_spin"), false, true); } - } -unsafe extern "C" fn jack_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 35, 35, 0,60, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 35, 0,60, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 4, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("jack_gun_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 4, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("jack_gun_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - } -unsafe extern "C" fn jack_attack_lw3_expression(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_attacklw3(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw3_ex_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if fighter.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 8.0/(7.0-1.0)); + if agent.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 16.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 12.0, 16.0, 2.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn jack_attack_lw3_ex_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn jack_attack_lw3_ex_expression(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_attacklw3_ex(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_doyle_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attacks3hi", jack_attack_s3_hi_game) - .acmd("game_attacks3", jack_attack_s3_s_game) - .acmd("game_attacks3lw", jack_attack_s3_lw_game) - .acmd("game_attackhi3", jack_attack_hi3_game) - .acmd("effect_attackhi3", jack_attack_hi3_effect) - .acmd("expression_attackhi3", jack_attack_hi3_expression) - .acmd("game_attacklw3", jack_attack_lw3_game) - .acmd("effect_attacklw3", jack_attack_lw3_effect) - .acmd("expression_attacklw3", jack_attack_lw3_expression) - .acmd("game_attacklw3_ex", jack_attack_lw3_ex_game) - .acmd("effect_attacklw3_ex", jack_attack_lw3_ex_effect) - .acmd("expression_attacklw3_ex", jack_attack_lw3_ex_expression) - .install(); - smashline::Agent::new("jack_doyle") - .acmd("effect_attacklw3", jack_doyle_attack_lw3_effect) - .install(); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); + + agent.acmd("game_attacklw3_ex", game_attacklw3_ex); + agent.acmd("effect_attacklw3_ex", effect_attacklw3_ex); + agent.acmd("expression_attacklw3_ex", expression_attacklw3_ex); } + diff --git a/fighters/jack/src/doyle/acmd.rs b/fighters/jack/src/doyle/acmd.rs new file mode 100644 index 0000000000..8f59069e4c --- /dev/null +++ b/fighters/jack/src/doyle/acmd.rs @@ -0,0 +1,26 @@ +use super::*; + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacklw3", effect_attacklw3); +} \ No newline at end of file diff --git a/fighters/jack/src/doyle/mod.rs b/fighters/jack/src/doyle/mod.rs new file mode 100644 index 0000000000..8c9ed0e0d8 --- /dev/null +++ b/fighters/jack/src/doyle/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("jack_doyle"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/jack/src/status/doyle.rs b/fighters/jack/src/doyle/status.rs similarity index 76% rename from fighters/jack/src/status/doyle.rs rename to fighters/jack/src/doyle/status.rs index 8b7d1d44f0..df370ec563 100644 --- a/fighters/jack/src/status/doyle.rs +++ b/fighters/jack/src/doyle/status.rs @@ -8,8 +8,6 @@ pub unsafe extern "C" fn entry_main(weapon: &mut L2CWeaponCommon) -> L2CValue { smashline::original_status(Main, weapon, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY)(weapon) } -pub fn install() { - smashline::Agent::new("jack_doyle") - .status(Main, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY, entry_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY, entry_main); } diff --git a/fighters/jack/src/fire/acmd.rs b/fighters/jack/src/fire/acmd.rs new file mode 100644 index 0000000000..246f5248eb --- /dev/null +++ b/fighters/jack/src/fire/acmd.rs @@ -0,0 +1,59 @@ +use super::*; + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if agent.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); + } + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + FT_MOTION_RATE_RANGE(agent, 12.0, 16.0, 2.0); + frame(lua_state, 16.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacklw3", effect_attacklw3); +} diff --git a/fighters/jack/src/fire/mod.rs b/fighters/jack/src/fire/mod.rs new file mode 100644 index 0000000000..da7ddbd79b --- /dev/null +++ b/fighters/jack/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("jack_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 8e2ddcc726..bedca640ef 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod doyle; +mod fire; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("jack"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + doyle::install(); + fire::install(); } diff --git a/fighters/jack/src/opff.rs b/fighters/jack/src/opff.rs index 0f2c4ea144..70254b7cb5 100644 --- a/fighters/jack/src/opff.rs +++ b/fighters/jack/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn wings_of_rebellion_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if boma.is_status(*FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH) && boma.status_frame() == 1 { @@ -25,7 +24,6 @@ unsafe fn wings_of_rebellion_cancel(boma: &mut BattleObjectModuleAccessor, statu boma.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_AIR, false); } } - } } @@ -63,7 +61,6 @@ unsafe fn arsene_summon_desmummon(boma: &mut BattleObjectModuleAccessor) { //smash::app::FighterSpecializer_Jack::add_rebel_gauge(boma, app::FighterEntryID(entry_id), 100.0); } } - } // Joker Arsene Grappling Hook @@ -185,8 +182,7 @@ pub unsafe fn jack_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("jack") - .on_line(Main, jack_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, jack_frame_wrapper); } diff --git a/fighters/jack/src/status/dispatch.rs b/fighters/jack/src/status/dispatch.rs index 1cb47a810c..b3dfe25812 100644 --- a/fighters/jack/src/status/dispatch.rs +++ b/fighters/jack/src/status/dispatch.rs @@ -1,6 +1,8 @@ use super::*; -pub unsafe extern "C" fn jack_dispatch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_JACK_STATUS_KIND_DISPATCH + +pub unsafe extern "C" fn dispatch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -28,7 +30,7 @@ pub unsafe extern "C" fn jack_dispatch_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub unsafe extern "C" fn jack_dispatch_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dispatch_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion( fighter.module_accessor, Hash40::new("dispatch"), @@ -48,10 +50,10 @@ pub unsafe extern "C" fn jack_dispatch_main(fighter: &mut L2CFighterCommon) -> L GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } VisibilityModule::set_material_anim_priority(fighter.module_accessor, Hash40::new("mask"), true); - fighter.sub_shift_status_main(L2CValue::Ptr(jack_dispatch_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(dispatch_main_loop as *const () as _)) } -unsafe extern "C" fn jack_dispatch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn dispatch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -83,9 +85,7 @@ unsafe extern "C" fn jack_dispatch_main_loop(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("jack") - .status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_pre) - .status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, dispatch_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, dispatch_main); } diff --git a/fighters/jack/src/status.rs b/fighters/jack/src/status/mod.rs similarity index 71% rename from fighters/jack/src/status.rs rename to fighters/jack/src/status/mod.rs index 9ac761ee05..5d6bf9f0f0 100644 --- a/fighters/jack/src/status.rs +++ b/fighters/jack/src/status/mod.rs @@ -1,6 +1,7 @@ use super::*; +use globals::*; +// status script import -pub mod doyle; pub mod special_lw; pub mod summon; pub mod dispatch; @@ -25,20 +26,20 @@ unsafe fn get_original_customizer(fighter: &mut L2CFighterCommon) -> Option L2CValue { +unsafe extern "C" fn move_customizer(fighter: &mut L2CFighterCommon) -> L2CValue { let customize_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO); if customize_to == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_1 { fighter.sv_set_status_func( FIGHTER_STATUS_KIND_SPECIAL_LW.into(), LUA_SCRIPT_STATUS_FUNC_STATUS_PRE.into(), - std::mem::transmute(special_lw::jack_special_lw_pre as *const ()) + std::mem::transmute(special_lw::special_lw_pre as *const ()) ); 0.into() } else if customize_to == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_2 { fighter.sv_set_status_func( FIGHTER_STATUS_KIND_SPECIAL_LW.into(), LUA_SCRIPT_STATUS_FUNC_STATUS_PRE.into(), - std::mem::transmute(special_lw::jack_special_lw2_pre as *const ()) + std::mem::transmute(special_lw::special_lw2_pre as *const ()) ); 0.into() } else if let Some(original) = get_original_customizer(fighter) { @@ -48,7 +49,7 @@ unsafe extern "C" fn jack_move_customizer(fighter: &mut L2CFighterCommon) -> L2C } } -unsafe extern "C" fn jack_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { let rebel_gauge = WorkModule::get_float(fighter.module_accessor, 0x4D); if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE_EXIST) && rebel_gauge < 10.0 { // FIGHTER_JACK_INSTANCE_WORK_ID_FLOAT_REBEL_GAUGE @@ -61,21 +62,15 @@ unsafe extern "C" fn jack_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2C 1.into() } -extern "C" fn jack_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_JACK { - return; - } - - set_move_customizer(fighter, jack_move_customizer); - jack_move_customizer(fighter); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(jack_special_lw_uniq as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + set_move_customizer(fighter, move_customizer); + move_customizer(fighter); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(special_lw_uniq as *const () as _)); } -pub fn install() { - dispatch::install(); - doyle::install(); - summon::install(); - smashline::Agent::new("jack").on_start(jack_init).install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + dispatch::install(agent); + summon::install(agent); } diff --git a/fighters/jack/src/status/special_lw.rs b/fighters/jack/src/status/special_lw.rs index aa76f63ad1..e72365684a 100644 --- a/fighters/jack/src/status/special_lw.rs +++ b/fighters/jack/src/status/special_lw.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe extern "C" fn jack_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mut rebel_gauge = WorkModule::get_float(fighter.module_accessor, 0x4D); rebel_gauge -= 10.0; if rebel_gauge < 1.0 { @@ -13,7 +13,7 @@ pub unsafe extern "C" fn jack_special_lw_pre(fighter: &mut L2CFighterCommon) -> 1.into() } -pub unsafe extern "C" fn jack_special_lw2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_lw2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, 0x200000E4); // FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE_END FighterSpecializer_Jack::check_doyle_summon_dispatch(fighter.module_accessor, true, false); StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_JACK_STATUS_KIND_DISPATCH); diff --git a/fighters/jack/src/status/summon.rs b/fighters/jack/src/status/summon.rs index 76d748bda0..e10bd3142c 100644 --- a/fighters/jack/src/status/summon.rs +++ b/fighters/jack/src/status/summon.rs @@ -1,6 +1,8 @@ use super::*; -pub unsafe extern "C" fn jack_summon_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_JACK_STATUS_KIND_SUMMON + +pub unsafe extern "C" fn summon_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -28,7 +30,7 @@ pub unsafe extern "C" fn jack_summon_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn jack_summon_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn summon_main(fighter: &mut L2CFighterCommon) -> L2CValue { // if FighterSpecializer_Jack::is_cut_in_effect(fighter.module_accessor) { // WorkModule::on_flag(fighter.module_accessor, *FIGHTER_JACK_STATUS_SUMMON_FLAG_CUT_IN_EFFECT); // } @@ -56,10 +58,10 @@ pub unsafe extern "C" fn jack_summon_main(fighter: &mut L2CFighterCommon) -> L2C // } VisibilityModule::set_int64(fighter.module_accessor, hash40("mask") as i64, hash40("on") as i64); VisibilityModule::set_material_anim_priority(fighter.module_accessor, Hash40::new("mask"), true); - fighter.sub_shift_status_main(L2CValue::Ptr(jack_summon_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(summon_main_loop as *const () as _)) } -unsafe extern "C" fn jack_summon_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn summon_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -91,9 +93,7 @@ unsafe extern "C" fn jack_summon_main_loop(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("jack") - .status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_pre) - .status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, summon_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, summon_main); } diff --git a/fighters/kamui/src/acmd/aerials.rs b/fighters/kamui/src/acmd/aerials.rs index bcfc4a7315..f2222999b7 100644 --- a/fighters/kamui/src/acmd/aerials.rs +++ b/fighters/kamui/src/acmd/aerials.rs @@ -1,379 +1,371 @@ use super::*; -unsafe extern "C" fn kamui_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("attack_air_n"), false, 0.0); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 60, 93, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 50, 88, 0, 47, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 60, 93, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 50, 88, 0, 47, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 6.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 6.0, 1.0); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 15.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 15.0, 8.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 60, 88, 0, 51, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 50, 88, 0, 51, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 60, 88, 0, 51, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 50, 88, 0, 51, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_horn") as i64); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_hide") as i64); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_hide") as i64); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_normal") as i64); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_normal") as i64); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_none") as i64); } } -unsafe extern "C" fn kamui_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 8.85, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 8.85, 5.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.85); - FT_MOTION_RATE_RANGE(fighter, 8.85, 14.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 67, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 50, 75, 0, 57, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 8.85, 14.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 67, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 50, 75, 0, 57, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.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 kamui_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 5, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 5, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.85); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.85); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE); if (1.0..4.0).contains(&charge) { - SET_SPEED_EX(fighter, 0.3 + (0.2 * charge), 0.1 + (0.03 * charge), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0.3 + (0.2 * charge), 0.1 + (0.03 * charge), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } else if charge >= 5.0 { - SET_SPEED_EX(fighter, 1.3, 0.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.3, 0.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 13.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE); let damage = 13.0 + (charge * 0.5); let kbg = 98 - (charge * 1.6) as i32; let sound_level = if charge > 0.0 { *ATTACK_SOUND_LEVEL_L } else { *ATTACK_SOUND_LEVEL_M }; let sound = if charge > 0.0 { *COLLISION_SOUND_ATTR_WATER } else { *COLLISION_SOUND_ATTR_CUTUP }; - ATTACK(fighter, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, 40, 7.0, 0.0, 10.0, -12.5, Some(0.0), Some(11.0), Some(-17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), sound_level, sound, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, 40, 7.0, 0.0, 10.0, -12.5, Some(0.0), Some(11.0), Some(-17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), sound_level, sound, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 106, 0, 40, 5.7, 0.0, 10.7, -12.5, Some(0.0), Some(11.9), Some(-19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 106, 0, 40, 5.7, 0.0, 10.7, -12.5, Some(0.0), Some(11.9), Some(-19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_start"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_start"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.1); - if is_excute(fighter) { - if VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 1.6, 17.0, -8.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + if VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 1.6, 17.0, -8.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.3, -21, 0, 0, 0, 1.1, true); - if VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, 11.0, -10.0, 270, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.3, -21, 0, 0, 0, 1.1, true); + if VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, 11.0, -10.0, 270, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } - } -unsafe extern "C" fn kamui_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 10.5, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 70, 80, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 68, 70, 0, 85, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 10.5, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 70, 80, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 68, 70, 0, 85, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE_RANGE(fighter, 10.5, 11.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 10.5, 11.0, 1.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state =fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state =agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 7, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 7, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 10.0); - if is_excute(fighter){ - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent){ + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.769); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 6.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 4.5, 0.0, -7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 6.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 4.5, 0.0, -7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 0, 6, 0, -90, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 2, 6, 0, -90, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 13, -2.5, 78, 0, 0, 1.1, true, 0.9); - EFFECT_FOLLOW(fighter, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0.0, -5.0, 0.0, 120, 70, 100, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 0, 6, 0, -90, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 2, 6, 0, -90, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 13, -2.5, 78, 0, 0, 1.1, true, 0.9); + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0.0, -5.0, 0.0, 120, 70, 100, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 6.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_ryusensya_shot"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, -7.0, 0.0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, -12.0, 0.0, 0, 0, 0, 1.25, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_ryusensya_shot"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, -7.0, 0.0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, -12.0, 0.0, 0, 0, 0, 1.25, true, 1.0); } - } -unsafe extern "C" fn kamui_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn kamui_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line_b"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_ryusensya_shot"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_counter_splash"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_transform_splash_end"), false, true); - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line_b"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_ryusensya_shot"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_counter_splash"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_transform_splash_end"), false, true); + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attackairn", kamui_attack_air_n_game) - .acmd("expression_attackairn", kamui_attack_air_n_expression) - .acmd("game_attackairf", kamui_attack_air_f_game) - .acmd("effect_attackairf", kamui_attack_air_f_effect) - .acmd("expression_attackairf", kamui_attack_air_f_expression) - .acmd("game_attackairb", kamui_attack_air_b_game) - .acmd("effect_attackairb", kamui_attack_air_b_effect) - .acmd("game_attackairhi", kamui_attack_air_hi_game) - .acmd("effect_attackairhi", kamui_attack_air_hi_effect) - .acmd("expression_attackairhi", kamui_attack_air_hi_expression) - .acmd("game_attackairlw", kamui_attack_air_lw_game) - .acmd("effect_attackairlw", kamui_attack_air_lw_effect) - .acmd("game_landingairlw", kamui_landing_air_lw_game) - .acmd("effect_landingairlw", kamui_landing_air_lw_effect) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/kamui/src/acmd/ground.rs b/fighters/kamui/src/acmd/ground.rs index 042ca9dc47..a8bd1f0462 100644 --- a/fighters/kamui/src/acmd/ground.rs +++ b/fighters/kamui/src/acmd/ground.rs @@ -1,106 +1,105 @@ use super::*; -unsafe extern "C" fn kamui_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("attack_11"), false, 0.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 4.5, 0.0, 9.0, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 2.2, 0.0, 10.5, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 60, 25, 0, 25, 1.8, 8.0, 0.0, 0.4, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 4.5, 0.0, 9.0, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 2.2, 0.0, 10.5, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 60, 25, 0, 25, 1.8, 8.0, 0.0, 0.4, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 85, 55, 0, 20, 1.8, 13.0, 0.0, 0.4, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 85, 55, 0, 20, 1.8, 13.0, 0.0, 0.4, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn kamui_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn kamui_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kamui_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 14, 100, 65, 0, 4.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 14, 100, 25, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 14, 100, 5, 0, 3.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 14, 100, 65, 0, 4.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 14, 100, 25, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 14, 100, 5, 0, 3.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 5.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 5.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attack11", kamui_attack_11_game) - .acmd("game_attack12", kamui_attack_12_game) - .acmd("game_attack13", kamui_attack_13_game) - .acmd("game_attackdash", kamui_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/kamui/src/acmd/mod.rs b/fighters/kamui/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/kamui/src/acmd/mod.rs +++ b/fighters/kamui/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/acmd/other.rs b/fighters/kamui/src/acmd/other.rs index cc6d74f32e..0b2e734ae0 100644 --- a/fighters/kamui/src/acmd/other.rs +++ b/fighters/kamui/src/acmd/other.rs @@ -1,220 +1,125 @@ 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_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(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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_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_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn kamui_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.333); } frame(lua_state, 8.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_kamui_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_kamui_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn kamui_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, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 10.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } -unsafe extern "C" fn kamui_ryusensya_regular_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_RYUSENSYA_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 45, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_paralyze"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - AttackModule::enable_safe_pos(boma); - } -} +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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("kamui_ryusensya") - .acmd("game_regular", kamui_ryusensya_regular_game) - .install(); - smashline::Agent::new("kamui") - .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("game_dash", kamui_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", kamui_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/kamui/src/acmd/smashes.rs b/fighters/kamui/src/acmd/smashes.rs index a4335c2b40..316b71c386 100644 --- a/fighters/kamui/src/acmd/smashes.rs +++ b/fighters/kamui/src/acmd/smashes.rs @@ -1,15 +1,15 @@ use super::*; -unsafe extern "C" fn kamui_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -17,31 +17,32 @@ unsafe extern "C" fn kamui_attack_s4_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 12.25, 16.0, Some(0.0), Some(14.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 11.0, 7.5, Some(0.0), Some(13.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 14.0, 27.0, Some(0.0), Some(16.0), Some(41.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 10.25, 16.0, Some(0.0), Some(10.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.5, 7.5, Some(0.0), Some(10.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 10.0, 27.0, Some(0.0), Some(9.5), Some(42.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); + } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -49,32 +50,31 @@ unsafe extern "C" fn kamui_attack_s4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 10.25, 16.0, Some(0.0), Some(10.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.5, 7.5, Some(0.0), Some(10.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 10.0, 27.0, Some(0.0), Some(9.5), Some(42.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); - + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 12.25, 16.0, Some(0.0), Some(14.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 11.0, 7.5, Some(0.0), Some(13.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 14.0, 27.0, Some(0.0), Some(16.0), Some(41.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -82,148 +82,128 @@ unsafe extern "C" fn kamui_attack_s4_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 7.25, 16.0, Some(0.0), Some(3.75), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.0, 7.5, Some(0.0), Some(5.5), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 3.5, 27.0, Some(0.0), Some(-1.0), Some(40.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 7.25, 16.0, Some(0.0), Some(3.75), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.0, 7.5, Some(0.0), Some(5.5), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 3.5, 27.0, Some(0.0), Some(-1.0), Some(40.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_horn") as i64); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_hide") as i64); VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_hide") as i64); } frame(lua_state, 9.0); app::sv_animcmd::execute(lua_state, 9.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 0); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 1); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_piercel"), 0, 2); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_piercel"), 0, 2); sv_animcmd::RUMBLE_HIT(lua_state); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_normal") as i64); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_normal") as i64); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_none") as i64); } } -unsafe extern "C" fn kamui_spearhand_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - FT_MOTION_RATE(agent, 0.8); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 27.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 35.0); - FT_MOTION_RATE(agent, 1.2); -} - -unsafe extern "C" fn kamui_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, 3.0, Some(0.0), Some(19.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, -2.2, Some(0.0), Some(19.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 95, 0, 50, 3.3, 0.0, 30.0, 0.0, Some(0.0), Some(26.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 95, 80, 0, 75, 2.8, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, 3.0, Some(0.0), Some(19.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, -2.2, Some(0.0), Some(19.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 95, 0, 50, 3.3, 0.0, 30.0, 0.0, Some(0.0), Some(26.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 95, 80, 0, 75, 2.8, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kamui_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 30, 100, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 32, 100, 0, 40, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 10.0, 35, 100, 0, 50, 3.0, 0.0, 9.0, -13.0, Some(0.0), Some(9.0), Some(-6.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("top"), 14.0, 35, 95, 0, 50, 2.5, 0.0, 9.0, -22.0, Some(0.0), Some(9.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 30, 100, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 32, 100, 0, 40, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 10.0, 35, 100, 0, 50, 3.0, 0.0, 9.0, -13.0, Some(0.0), Some(9.0), Some(-6.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("top"), 14.0, 35, 95, 0, 50, 2.5, 0.0, 9.0, -22.0, Some(0.0), Some(9.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("kamui_spearhand") - .acmd("game_attacks4", kamui_spearhand_attack_s4_game) - .install(); - smashline::Agent::new("kamui") - .acmd("game_attacks4hi", kamui_attack_s4_hi_game) - .acmd("game_attacks4", kamui_attack_s4_game) - .acmd("game_attacks4lw", kamui_attack_s4_lw_game) - .acmd("expression_attacks4hi", kamui_attack_s4_expression) - .acmd("expression_attacks4", kamui_attack_s4_expression) - .acmd("expression_attacks4lw", kamui_attack_s4_expression) - .acmd("game_attackhi4", kamui_attack_hi4_game) - .acmd("game_attacklw4", kamui_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("expression_attacks4hi", expression_attacks4); + agent.acmd("expression_attacks4lw", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/kamui/src/acmd/specials.rs b/fighters/kamui/src/acmd/specials.rs index 7726ccfd95..c83f4cdef8 100644 --- a/fighters/kamui/src/acmd/specials.rs +++ b/fighters/kamui/src/acmd/specials.rs @@ -1,569 +1,389 @@ use super::*; -unsafe extern "C" fn kamui_special_n_end1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 45.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 45.0, 19.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_N_FLAG_AIR_CONTROL); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_DRAGONHAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kamui_dragonhand_special_n_end1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - if WorkModule::is_flag(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLAG_IS_KAMUI) { - if sv_animcmd::get_value_float(fighter.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - } - else { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - } - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn kamui_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); + ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn kamui_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsattack(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) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); + ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn kamui_spearhand_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); - let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); - let facing = PostureModule::lr(boma); - let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; - if GroundModule::line_segment_check(boma, - &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, - &Vector2f::zero(), - ground, - true).is_null() { - ATTACK(fighter, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - ATTACK(fighter, 0, 0, Hash40::new("drag2"), 7.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } -} - -unsafe extern "C" fn kamui_spearhand_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); - let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); - let facing = PostureModule::lr(boma); - let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; - // debug_draw_line( - // &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - // &Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, - // 500 - // ); - // debug_draw_circle(&Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, 5.0, 100); - // debug_draw_circle(&Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, 5.0, 100); - // debug_set_draw_color(255.0, 0.0, 0.0, 1.0); - if GroundModule::line_segment_check(boma, - &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, - &Vector2f::zero(), - ground, - true).is_null() { - ATTACK(fighter, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - ATTACK(fighter, 0, 0, Hash40::new("drag2"), 8.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } -} - -unsafe extern "C" fn kamui_special_s_wall_attack_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallattackf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("special_s_wall_attack_f"), false, 0.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 55, 50, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 55, 50, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); } wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 90, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 90, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); + } } -unsafe extern "C" fn kamui_special_s_wall_attack_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialswallattackf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, -6, 0, 0, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, -6, 0, 0, 0, 0.45, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1.5, 15.5, 0, 0, 90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1.5, 15.5, 0, 0, 90, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_tyousoutotu_wind"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("kamui_tyousoutotu_wind"), false, false); } } -unsafe extern "C" fn kamui_special_s_wall_attack_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallattackb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("special_s_wall_attack_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 125, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 125, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_WALL_ATTACK_B_REVERSE_LR); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 55, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 55, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 55, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 55, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } - } -unsafe extern "C" fn kamui_special_s_wall_attack_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialswallattackb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, -4, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, -4, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 14, 0, 12, 210, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 14, 0, 12, 210, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, 5, 0, 180, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, 5, 0, 180, 0, 0.45, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1, -12, 0, 180, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1, -12, 0, 180, 90, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_tyousoutotu_wind"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("kamui_tyousoutotu_wind"), false, false); } } -unsafe extern "C" fn kamui_special_s_wall_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialswalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 2.0); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_wall_jump"), true, 0.0); ArticleModule::set_rate(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, 1.5); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.5, 6.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.5, 6.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_CHANGE_JUMP_ACCEL_Y); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_JUMP_CONTROL); } } -unsafe extern "C" fn kamui_special_s_wall_jump_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialswalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 8, 6, 0, 0, 90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 8, 6, 0, 0, 90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 21, -16, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 21, -16, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn kamui_special_s_wall_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_wall_end"), true, 0.0); ArticleModule::change_motion(boma, 0, Hash40::new("fall"), false, 0.0); } } -unsafe extern "C" fn kamui_special_hi_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.5, 85, 100, 150, 0, 5.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(fighter.module_accessor, true, false); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.5, 85, 100, 150, 0, 5.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); } frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 1, Hash40::new("rot"), 1.2, 80, 100, 140, 0, 2.0, 0.0, 5.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 1, Hash40::new("rot"), 1.2, 105, 100, 140, 0, 5.5, 0.0, 4.0, 6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 1, Hash40::new("rot"), 1.2, 68, 100, 140, 0, 5.5, 0.0, 4.0, -6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 1, Hash40::new("rot"), 1.2, 100, 100, 155, 0, 5.0, 0.0, -1.0, 5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 1, Hash40::new("rot"), 1.2, 73, 100, 155, 0, 5.0, 0.0, -1.0, -5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(fighter.module_accessor, true, false); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("rot"), 1.2, 80, 100, 140, 0, 2.0, 0.0, 5.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 1, Hash40::new("rot"), 1.2, 105, 100, 140, 0, 5.5, 0.0, 4.0, 6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 1, Hash40::new("rot"), 1.2, 68, 100, 140, 0, 5.5, 0.0, 4.0, -6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 1, Hash40::new("rot"), 1.2, 100, 100, 155, 0, 5.0, 0.0, -1.0, 5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 1, Hash40::new("rot"), 1.2, 73, 100, 155, 0, 5.0, 0.0, -1.0, -5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 29.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 34.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 36.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn kamui_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 26.0, 30.0); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 26.0, 30.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 27.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 31.0); - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 37.0); + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 37.0); frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); VisibilityModule::set_whole(boma, true); } } -unsafe extern "C" fn kamui_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_guard_mark"), true, true); - EFFECT(fighter, Hash40::new("kamui_counter_success"), Hash40::new("top"), 0, 14, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_water_hamon"), Hash40::new("top"), 0, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_guard_mark"), true, true); + EFFECT(agent, Hash40::new("kamui_counter_success"), Hash40::new("top"), 0, 14, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_water_hamon"), Hash40::new("top"), 0, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } if WorkModule::is_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("kamui_water_splash"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("kamui_water_splash"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } frame(lua_state, 26.0); - if is_excute(fighter) { - if sv_animcmd::get_value_float(fighter.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("kamui_counter_ripple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("kamui_counter_ripple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 47.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } } -unsafe extern "C" fn kamui_waterdragon_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 26.0, 30.0); - frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 60, 0, 90, 8.0, 0.0, 8.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - if WorkModule::is_flag(boma, *WEAPON_KAMUI_WATERDRAGON_INSTANCE_WORK_ID_FLAG_SET_CRITICAL_HIT_SE) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_kamui_criticalhit")); - } - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 5.0, 0.0, 21.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 7.0, 0.0, 10.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 80, 60, 0, 90, 5.0, 0.0, 22.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 31.0); - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 37.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend1", game_specialnend1); + agent.acmd("game_specialairnend1", game_specialnend1); + + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("game_specialswallattackf", game_specialswallattackf); + agent.acmd("effect_specialswallattackf", effect_specialswallattackf); + agent.acmd("game_specialswallattackb", game_specialswallattackb); + agent.acmd("effect_specialswallattackb", effect_specialswallattackb); + agent.acmd("game_specialswalljump", game_specialswalljump); + agent.acmd("effect_specialswalljump", effect_specialswalljump); + agent.acmd("game_specialswallend", game_specialswallend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_specialnend1", kamui_special_n_end1_game) - .acmd("game_specialairnend1", kamui_special_n_end1_game) - .acmd("game_specialsattack", kamui_special_s_attack_game) - .acmd("game_specialairsattack", kamui_special_air_s_attack_game) - .acmd( - "game_specialswallattackf", - kamui_special_s_wall_attack_f_game, - ) - .acmd( - "effect_specialswallattackf", - kamui_special_s_wall_attack_f_effect, - ) - .acmd( - "game_specialswallattackb", - kamui_special_s_wall_attack_b_game, - ) - .acmd( - "effect_specialswallattackb", - kamui_special_s_wall_attack_b_effect, - ) - .acmd("game_specialswalljump", kamui_special_s_wall_jump_game) - .acmd("effect_specialswalljump", kamui_special_s_wall_jump_effect) - .acmd("game_specialswallend", kamui_special_s_wall_end_game) - .acmd("game_specialhi", kamui_special_hi_game) - .acmd("game_specialairhi", kamui_special_hi_game) - .acmd("game_speciallwhit", kamui_special_lw_hit_game) - .acmd("game_specialairlwhit", kamui_special_lw_hit_game) - .acmd("effect_speciallwhit", kamui_special_lw_hit_effect) - .acmd("effect_specialairlwhit", kamui_special_lw_hit_effect) - .install(); - smashline::Agent::new("kamui_spearhand") - .acmd("game_specialsattack", kamui_spearhand_special_s_attack_game) - .acmd( - "game_specialairsattack", - kamui_spearhand_special_air_s_attack_game, - ) - .install(); - smashline::Agent::new("kamui_dragonhand") - .acmd("game_dhspecialnend1", kamui_dragonhand_special_n_end1_game) - .acmd( - "game_dhspecialairnend1", - kamui_dragonhand_special_n_end1_game, - ) - .install(); - smashline::Agent::new("kamui_waterdragon") - .acmd("game_speciallwhit", kamui_waterdragon_special_lw_hit_game) - .acmd( - "game_specialairlwhit", - kamui_waterdragon_special_lw_hit_game, - ) - .install(); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); } diff --git a/fighters/kamui/src/acmd/throws.rs b/fighters/kamui/src/acmd/throws.rs index d76422b039..5a219290c2 100644 --- a/fighters/kamui/src/acmd/throws.rs +++ b/fighters/kamui/src/acmd/throws.rs @@ -1,27 +1,26 @@ use super::*; -unsafe extern "C" fn kamui_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 kamui_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn kamui_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn kamui_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -61,76 +60,75 @@ unsafe extern "C" fn kamui_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn kamui_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("throw_b"), true, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 140, 70, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 140, 70, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 6.5, 30, 120, 0, 40, 2.5, 10.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 12.0, 30, 100, 0, 40, 2.0, 20.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 6.5, 30, 120, 0, 40, 2.5, 10.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handl"), 12.0, 30, 100, 0, 40, 2.0, 20.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 8); + CHECK_FINISH_CAMERA(agent, 14, 8); } frame(lua_state, 13.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kamui_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, smash::phx::Hash40::new("throw_lw"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 107, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 107, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 40, 7.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(-6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 40, 7.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(-6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3.0, 0.0); + CHECK_FINISH_CAMERA(agent, 3.0, 0.0); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); VisibilityModule::set_whole(boma, true); } - } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_catch", kamui_catch_game) - .acmd("game_catchdash", kamui_catch_dash_game) - .acmd("game_catchturn", kamui_catch_turn_game) - .acmd("game_throwb", kamui_throw_b_game) - .acmd("game_throwlw", kamui_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/kamui/src/acmd/tilts.rs b/fighters/kamui/src/acmd/tilts.rs index 77036ac1ae..1a41ea4055 100644 --- a/fighters/kamui/src/acmd/tilts.rs +++ b/fighters/kamui/src/acmd/tilts.rs @@ -1,124 +1,122 @@ use super::*; -unsafe extern "C" fn kamui_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 7.9, 1.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.9, 1.0); frame(lua_state, 7.9); - FT_MOTION_RATE_RANGE(fighter, 7.9, 9.1, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 25, 65, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 35, 89, 0, 35, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.9, 9.1, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 25, 65, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 35, 89, 0, 35, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.1); - FT_MOTION_RATE_RANGE(fighter, 9.1, 10.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 9.1, 10.0, 1.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kamui_attack_s3_expression(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_attacks3(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); } frame(lua_state, 5.9); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.9); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 20.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 80, 43, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 80, 72, 0, 71, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 80, 43, 0, 80, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 68, 0, 80, 3.0, 0.0, 12.0, 4.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 20.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 80, 43, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 80, 72, 0, 71, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 80, 43, 0, 80, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 68, 0, 80, 3.0, 0.0, 12.0, 4.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, 4.0, Some(0.0), Some(26.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, 4.0, Some(0.0), Some(26.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 6, false); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kamui_attack_hi3_effect(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter){ - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 8, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2) + if is_excute(agent){ + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 8, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2) } frame(lua_state, 18.0); - if is_excute(fighter){ - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent){ + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 3.0, 0.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 2.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 3.0, 0.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 2.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attacks3", kamui_attack_s3_game) - .acmd("expression_attacks3", kamui_attack_s3_expression) - .acmd("game_attackhi3", kamui_attack_hi3_game) - .acmd("effect_attackhi3", kamui_attack_hi3_effect) - .acmd("game_attacklw3", kamui_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/kamui/src/dragonhand/acmd.rs b/fighters/kamui/src/dragonhand/acmd.rs new file mode 100644 index 0000000000..006764c350 --- /dev/null +++ b/fighters/kamui/src/dragonhand/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_dhspecialnend1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + if WorkModule::is_flag(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLAG_IS_KAMUI) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + } + else { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + } + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_dhspecialnend1", game_dhspecialnend1); + agent.acmd("game_dhspecialairnend1", game_dhspecialnend1); +} diff --git a/fighters/kamui/src/dragonhand/mod.rs b/fighters/kamui/src/dragonhand/mod.rs new file mode 100644 index 0000000000..df98b48f82 --- /dev/null +++ b/fighters/kamui/src/dragonhand/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_dragonhand"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/lib.rs b/fighters/kamui/src/lib.rs index 8e2ddcc726..929cbbc242 100644 --- a/fighters/kamui/src/lib.rs +++ b/fighters/kamui/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod dragonhand; +mod ryusensya; +mod spearhand; +mod waterdragon; use smash::{ lib::{ @@ -37,9 +44,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("kamui"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + dragonhand::install(); + ryusensya::install(); + spearhand::install(); + waterdragon::install(); } diff --git a/fighters/kamui/src/opff.rs b/fighters/kamui/src/opff.rs index f0c7667712..bd4300d459 100644 --- a/fighters/kamui/src/opff.rs +++ b/fighters/kamui/src/opff.rs @@ -127,8 +127,7 @@ pub unsafe fn kamui_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("kamui") - .on_line(Main, kamui_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, kamui_frame_wrapper); } diff --git a/fighters/kamui/src/ryusensya/acmd.rs b/fighters/kamui/src/ryusensya/acmd.rs new file mode 100644 index 0000000000..6d973b4f94 --- /dev/null +++ b/fighters/kamui/src/ryusensya/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_RYUSENSYA_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 45, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_paralyze"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/kamui/src/ryusensya/mod.rs b/fighters/kamui/src/ryusensya/mod.rs new file mode 100644 index 0000000000..94d7823ced --- /dev/null +++ b/fighters/kamui/src/ryusensya/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_ryusensya"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/spearhand/acmd.rs b/fighters/kamui/src/spearhand/acmd.rs new file mode 100644 index 0000000000..f44215eb42 --- /dev/null +++ b/fighters/kamui/src/spearhand/acmd.rs @@ -0,0 +1,101 @@ +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 1.2); +} + +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); + let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); + let facing = PostureModule::lr(boma); + let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; + if GroundModule::line_segment_check(boma, + &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, + &Vector2f::zero(), + ground, + true).is_null() { + ATTACK(agent, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + ATTACK(agent, 0, 0, Hash40::new("drag2"), 7.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + } +} + +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); + let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); + let facing = PostureModule::lr(boma); + let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; + // debug_draw_line( + // &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + // &Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, + // 500 + // ); + // debug_draw_circle(&Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, 5.0, 100); + // debug_draw_circle(&Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, 5.0, 100); + // debug_set_draw_color(255.0, 0.0, 0.0, 1.0); + if GroundModule::line_segment_check(boma, + &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, + &Vector2f::zero(), + ground, + true).is_null() { + ATTACK(agent, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + ATTACK(agent, 0, 0, Hash40::new("drag2"), 8.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); +} diff --git a/fighters/kamui/src/spearhand/mod.rs b/fighters/kamui/src/spearhand/mod.rs new file mode 100644 index 0000000000..0b75de640e --- /dev/null +++ b/fighters/kamui/src/spearhand/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_spearhand"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/status.rs b/fighters/kamui/src/status.rs deleted file mode 100644 index a3fc07cbb3..0000000000 --- a/fighters/kamui/src/status.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special_lw; - -pub fn install() { - special_lw::install(); -} diff --git a/fighters/kamui/src/status/mod.rs b/fighters/kamui/src/status/mod.rs new file mode 100644 index 0000000000..868a42d6c1 --- /dev/null +++ b/fighters/kamui/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_lw::install(agent); +} diff --git a/fighters/kamui/src/status/special_lw.rs b/fighters/kamui/src/status/special_lw.rs index 2e5b807f00..cf18a3c03e 100644 --- a/fighters/kamui/src/status/special_lw.rs +++ b/fighters/kamui/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); special_lw_mot_helper(fighter); @@ -99,9 +101,7 @@ unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("kamui") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/kamui/src/waterdragon/acmd.rs b/fighters/kamui/src/waterdragon/acmd.rs new file mode 100644 index 0000000000..cebe24b7d7 --- /dev/null +++ b/fighters/kamui/src/waterdragon/acmd.rs @@ -0,0 +1,42 @@ +use super::*; + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 26.0, 30.0); + frame(lua_state, 26.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 60, 0, 90, 8.0, 0.0, 8.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + if WorkModule::is_flag(boma, *WEAPON_KAMUI_WATERDRAGON_INSTANCE_WORK_ID_FLAG_SET_CRITICAL_HIT_SE) { + AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_kamui_criticalhit")); + } + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 5.0, 0.0, 21.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + } + frame(lua_state, 29.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 7.0, 0.0, 10.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 80, 60, 0, 90, 5.0, 0.0, 22.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + } + frame(lua_state, 31.0); + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 37.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/kamui/src/waterdragon/mod.rs b/fighters/kamui/src/waterdragon/mod.rs new file mode 100644 index 0000000000..0575b3b678 --- /dev/null +++ b/fighters/kamui/src/waterdragon/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_waterdragon"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ken/src/acmd/aerials.rs b/fighters/ken/src/acmd/aerials.rs index ab79ba3cf4..b238670c2f 100644 --- a/fighters/ken/src/acmd/aerials.rs +++ b/fighters/ken/src/acmd/aerials.rs @@ -1,269 +1,267 @@ - use super::*; -unsafe extern "C" fn ken_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5 * dmg, 361, 100, 0, 20, 2.5, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * dmg, 361, 100, 0, 20, 2.5, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5 * dmg, 361, 100, 0, 20, 2.5, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * dmg, 361, 100, 0, 20, 2.5, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 361, 90, 0, 20, 2.0, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.5 * dmg, 361, 90, 0, 20, 2.0, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 361, 90, 0, 20, 2.0, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.5 * dmg, 361, 90, 0, 20, 2.0, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } -unsafe extern "C" fn ken_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 * dmg, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 * dmg, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0 * dmg, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 * dmg, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 17.0 / (36.0 - 15.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0 / (36.0 - 15.0)); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } -unsafe extern "C" fn ken_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (9.0-6.0)/5.0); } frame(lua_state, 9.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ken_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn ken_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -55, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -55, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 8, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.5); } } -unsafe extern "C" fn ken_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 33.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attackairn", ken_attack_air_n_game) - .acmd("game_attackairf", ken_attack_air_f_game) - .acmd("game_attackairb", ken_attack_air_b_game) - .acmd("effect_attackairb", ken_attack_air_b_effect) - .acmd("game_attackairhi", ken_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", ken_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ken/src/acmd/finals.rs b/fighters/ken/src/acmd/finals.rs index db8f8bb789..1a65c9f5ad 100644 --- a/fighters/ken/src/acmd/finals.rs +++ b/fighters/ken/src/acmd/finals.rs @@ -1,191 +1,191 @@ use super::*; -unsafe extern "C" fn game_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); frame(lua_state, 1.0); - if is_excute(fighter) { - CHECK_VALID_FINAL_START_CAMERA(fighter, 0, 0, 20, 0, 0, 0); - SLOW_OPPONENT(fighter, 10.0, 70.0); + if is_excute(agent) { + CHECK_VALID_FINAL_START_CAMERA(agent, 0, 0, 20, 0, 0, 0); + SLOW_OPPONENT(agent, 10.0, 70.0); } if !boma.is_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { frame(lua_state, 5.0); - if is_excute(fighter) { - FT_SET_FINAL_FEAR_FACE(fighter, 40); - REQ_FINAL_START_CAMERA(fighter, Hash40::new("d04final.nuanmb"), true); - FT_START_CUTIN(fighter); + if is_excute(agent) { + FT_SET_FINAL_FEAR_FACE(agent, 40); + REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final.nuanmb"), true); + FT_START_CUTIN(agent); } } else { - if is_excute(fighter) { - FT_START_CUTIN(fighter); + if is_excute(agent) { + FT_START_CUTIN(agent); } - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, 0); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, 0); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); } } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 15.0, y: 0.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 0.0}, 5, false); } } else { if(PostureModule::scale(boma) <= 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 20.0, y: 0.0}, 2, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 20.0, y: 0.0}, 2, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 5.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 4.0}, 10, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); frame(lua_state, 25.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 12.0, y: 5.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 20.0}, 5, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 28.0, y: 5.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 37.0, y: 10.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 15.0, y: 1.0}, 9, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 19.0, y: 5.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 4.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 13.0, y: 7.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 37.0, y: 4.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 37.0, y: 7.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 20.0, y: 2.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 20.0, y: 4.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 55.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 8.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 13.0, y: 10.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 46.0, y: 8.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 46.0, y: 12.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 22.0, y: 4.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 22.0, y: 7.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 14.0, y: 8.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 16.0, y: 10.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 44.0, y: 8.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 52.0, y: 10.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 22.0, y: 4.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 26.0, y: 5.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 76.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); } // PostureModule::scale(boma, 0); @@ -193,338 +193,308 @@ unsafe extern "C" fn game_final(fighter: &mut L2CAgentBase) { // PostureModule::scale(boma); // 0x16e550(0, 0.5); wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); SlowModule::clear_whole(boma); } } -unsafe extern "C" fn game_finalhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); +unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); frame(lua_state, 1.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 60, 0, 9.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 60, 0, 9.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 50, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 50, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } else{ if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } else{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 80, 100, 60, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 80, 100, 60, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); } - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 10, 0); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 10, 0); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); } - if is_excute(fighter) { + if is_excute(agent) { SlowModule::set_whole(boma, 2, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 85, 82, 0, 96, 10.0, 0.0, 17.0, 10.0, Some(0.0), Some(17.0), Some(15.0), 5.0, 0.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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL03, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 85, 82, 0, 96, 10.0, 0.0, 17.0, 10.0, Some(0.0), Some(17.0), Some(15.0), 5.0, 0.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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL03, *ATTACK_REGION_KICK); AttackModule::set_force_reaction(boma, 0, true, false); boma.set_int(*FIGHTER_RYU_FINAL_CAMERA_OFFSET_7, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); // FILL_SCREEN_MODEL_COLOR(fighter, 1, 0, 1, 1, 1, 0, 0, 0, 0.9, 1.7, EffectScreenLayer:*CHAR, *EFFECT_SCREEN_PRIO_FINAL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); SlowModule::clear_whole(boma); - CANCEL_FILL_SCREEN(fighter, 1, 10); + CANCEL_FILL_SCREEN(agent, 1, 10); } frame(lua_state, 68.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); boma.set_int(*FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); } } -unsafe extern "C" fn game_final_com2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_com2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } } -unsafe extern "C" fn game_final_hit1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 55.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 64.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hitfinal(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hitfinal(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); } } -unsafe extern "C" fn game_final2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0 / (13.0 - 1.0)); + FT_MOTION_RATE(agent, 1.0 / (13.0 - 1.0)); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 8.0 / (36.0 - 13.0)); - if is_excute(fighter) { - CHECK_VALID_FINAL_START_CAMERA(fighter, 0, 0, 20, 0, 0, 0); - SLOW_OPPONENT(fighter, 10.0, 70.0); + FT_MOTION_RATE(agent, 8.0 / (36.0 - 13.0)); + if is_excute(agent) { + CHECK_VALID_FINAL_START_CAMERA(agent, 0, 0, 20, 0, 0, 0); + SLOW_OPPONENT(agent, 10.0, 70.0); } if !boma.is_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { frame(lua_state, 10.0); - if is_excute(fighter) { - FT_START_CUTIN(fighter); - FT_SET_FINAL_FEAR_FACE(fighter, 40); - REQ_FINAL_START_CAMERA(fighter, Hash40::new("d04final2.nuanmb"), true); + if is_excute(agent) { + FT_START_CUTIN(agent); + FT_SET_FINAL_FEAR_FACE(agent, 40); + REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final2.nuanmb"), true); } } else { - if is_excute(fighter) { + if is_excute(agent) { // PostureModule::scale(boma, 3, 0); // 0x16e550(1760657085, 1.8); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); - FT_START_CUTIN(fighter); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + FT_START_CUTIN(agent); } frame(lua_state, 40.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); } } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 6.0, y: 0.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 6.0, y: 0.0}, 5, false); } } else { if(PostureModule::scale(boma) <= 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 11.0, y: 0.0}, 2, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 11.0, y: 0.0}, 2, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 4.0, y: 5.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 6.0, y: 4.0}, 10, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 52.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_RECT, 40, -40, 20, 0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_RECT, 40, -40, 20, 0); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ADJUST_SHINRYUKEN_POS); } frame(lua_state, 90.0); } -unsafe extern "C" fn ken_shinryuken_game_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 110, 120, 130, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - frame(lua_state, 52.0); - if is_excute(fighter) { - boma.on_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.9, 110, 85, 70, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.9, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - frame(lua_state, 90.0); - if is_excute(fighter) { - boma.off_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); - AttackModule::clear_all(boma); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, 50.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ken_shinryuken_effect_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 51.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); EffectModule::set_scale_last(boma, &Vector3f::new(0.6, 0.36, 0.6)); } frame(lua_state, 97.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_final_shinryuken_beam"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); } } -pub fn install() { - smashline::Agent::new("ken_shinryuken") - .acmd("game_final", ken_shinryuken_game_final) - .acmd("effect_final", ken_shinryuken_effect_final) - .install(); - smashline::Agent::new("ken") - .acmd("game_final", game_final) - .acmd("game_finalair", game_final) - .acmd("game_finalhit", game_finalhit) - .acmd("game_finalhit_com", game_finalhit) - .acmd("game_final_com2", game_final_com2) - .acmd("game_final_hit1", game_final_hit1) - .acmd("game_final_hit2", game_final_hit2) - .acmd("game_final_hit3", game_final_hit3) - .acmd("game_final_hit4", game_final_hit4) - .acmd("game_final_hitfinal", game_final_hitfinal) - .acmd("game_final2", game_final2) - .acmd("game_finalair2", game_final2) - .install(); + +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); + agent.acmd("game_finalair", game_final); + agent.acmd("game_finalhit", game_finalhit); + agent.acmd("game_finalhit_com", game_finalhit); + agent.acmd("game_final_com2", game_final_com2); + agent.acmd("game_final_hit1", game_final_hit1); + agent.acmd("game_final_hit2", game_final_hit2); + agent.acmd("game_final_hit3", game_final_hit3); + agent.acmd("game_final_hit4", game_final_hit4); + agent.acmd("game_final_hitfinal", game_final_hitfinal); + + agent.acmd("game_final2", game_final2); + agent.acmd("game_finalair2", game_final2); } diff --git a/fighters/ken/src/acmd/ground.rs b/fighters/ken/src/acmd/ground.rs index 5ac5ec0f67..766a1e05d5 100644 --- a/fighters/ken/src/acmd/ground.rs +++ b/fighters/ken/src/acmd/ground.rs @@ -1,203 +1,199 @@ - use super::*; -unsafe extern "C" fn game_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - } +unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // it's here this early to make light jab --> heavy jab feel like the other target combos - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 180, 25, 8, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 105, 25, 10, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 180, 25, 8, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 105, 25, 10, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 18.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 18.0, 8.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 10.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 10.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn sound_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_punch_m")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_punch_m")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_m")); } } -unsafe extern "C" fn expression_attack11w(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_attack11w(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); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn game_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 80, 15, 0, 38, 4.0, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 15, 0, 38, 4.0, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 80, 15, 0, 38, 4.0, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 15, 0, 38, 4.0, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - 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); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 1, 14.5, 4.5, -5, -13, 109, 0.7, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.6); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11.5, 15, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 1, 14.5, 4.5, -5, -13, 109, 0.7, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.6); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11.5, 15, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false, 0.7); } } -unsafe extern "C" fn sound_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_punch_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_punch_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_l")); } } -unsafe extern "C" fn expression_attack11s(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_attack11s(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); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ken_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0 * dmg, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0 * dmg, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attack11w", game_attack11w) - .acmd("effect_attack11w", effect_attack11w) - .acmd("sound_attack11w", sound_attack11w) - .acmd("expression_attack11w", expression_attack11w) - .acmd("game_attack11s", game_attack11s) - .acmd("game_attack11nears", game_attack11s) - .acmd("game_attack12", game_attack11s) - .acmd("effect_attack11s", effect_attack11s) - .acmd("effect_attack11nears", effect_attack11s) - .acmd("effect_attack12", effect_attack11s) - .acmd("sound_attack11s", sound_attack11s) - .acmd("sound_attack11nears", sound_attack11s) - .acmd("sound_attack12", sound_attack11s) - .acmd("expression_attack11s", expression_attack11s) - .acmd("expression_attack11nears", expression_attack11s) - .acmd("expression_attack12", expression_attack11s) - .acmd("game_attackdash", ken_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11w", game_attack11w); + agent.acmd("effect_attack11w", effect_attack11w); + agent.acmd("sound_attack11w", sound_attack11w); + agent.acmd("expression_attack11w", expression_attack11w); + agent.acmd("game_attack11s", game_attack11s); + agent.acmd("game_attack11nears", game_attack11s); + agent.acmd("game_attack12", game_attack11s); + agent.acmd("effect_attack11s", effect_attack11s); + agent.acmd("effect_attack11nears", effect_attack11s); + agent.acmd("effect_attack12", effect_attack11s); + agent.acmd("sound_attack11s", sound_attack11s); + agent.acmd("sound_attack11nears", sound_attack11s); + agent.acmd("sound_attack12", sound_attack11s); + agent.acmd("expression_attack11s", expression_attack11s); + agent.acmd("expression_attack11nears", expression_attack11s); + agent.acmd("expression_attack12", expression_attack11s); + + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/ken/src/acmd/mod.rs b/fighters/ken/src/acmd/mod.rs index fbf138c7dc..3975bab577 100644 --- a/fighters/ken/src/acmd/mod.rs +++ b/fighters/ken/src/acmd/mod.rs @@ -1,20 +1,21 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; mod finals; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); - finals::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); + finals::install(agent); +} \ No newline at end of file diff --git a/fighters/ken/src/acmd/other.rs b/fighters/ken/src/acmd/other.rs index 5fd0c5e04f..3eeef46b28 100644 --- a/fighters/ken/src/acmd/other.rs +++ b/fighters/ken/src/acmd/other.rs @@ -1,196 +1,118 @@ - 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_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_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(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_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_rnd_futtobi01"), Hash40::new("seq_ken_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_ken_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ken_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn ken_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) { boma.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.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) { boma.on_flag(*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_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.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_ken_guard")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { + PLAY_SE(agent, Hash40::new("se_ken_guard")); } } } -pub fn install() { - smashline::Agent::new("ken") - .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", ken_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_guarddamage", sound_guarddamage) - .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_guarddamage", sound_guarddamage); } diff --git a/fighters/ken/src/acmd/smashes.rs b/fighters/ken/src/acmd/smashes.rs index e9aa3cd571..b54be01ada 100644 --- a/fighters/ken/src/acmd/smashes.rs +++ b/fighters/ken/src/acmd/smashes.rs @@ -1,180 +1,178 @@ - use super::*; -unsafe extern "C" fn ken_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0 * dmg, 361, 103, 0, 28, 3.0, 0.0, 12.5, 2.3, Some(0.0), Some(11.5), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0 * dmg, 361, 102, 0, 28, 3.3, 3.5, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 * dmg, 361, 103, 0, 28, 3.0, 0.0, 12.5, 2.3, Some(0.0), Some(11.5), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0 * dmg, 361, 102, 0, 28, 3.3, 3.5, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 11.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 11.0, 1.0); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 24.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 24.0, 21.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 53.0, 19.0); - + FT_MOTION_RATE_RANGE(agent, 24.0, 53.0, 19.0); } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 7, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 7, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), -2, 13, -2, 16, -30, 76, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), -2, 13, -2, 16, -30, 76, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); } } -unsafe extern "C" fn expression_attackhi4(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_attackhi4(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); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - AREA_WIND_2ND_arg10(fighter, 0, 0.8, 110, 8, 0.8, 0, 4, 32, 8, 80); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + AREA_WIND_2ND_arg10(agent, 0, 0.8, 110, 8, 0.8, 0, 4, 32, 8, 80); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn ken_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0 * dmg, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0 * dmg, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 1, 1.5, 0, 180, 180, -5, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 1, 1.5, 0, 180, 180, -5, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attacks4", ken_attack_s4_s_game) - .acmd("game_attackhi4", game_attackhi4) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", ken_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ken/src/acmd/specials/mod.rs b/fighters/ken/src/acmd/specials/mod.rs index 863b5c50da..a91a2bc69d 100644 --- a/fighters/ken/src/acmd/specials/mod.rs +++ b/fighters/ken/src/acmd/specials/mod.rs @@ -5,10 +5,10 @@ mod special_lw; mod special_n; mod special_s; -pub fn install() { - special_command::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + special_command::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/ken/src/acmd/specials/special_command.rs b/fighters/ken/src/acmd/specials/special_command.rs index acef58c87d..5dbf6aea3c 100644 --- a/fighters/ken/src/acmd/specials/special_command.rs +++ b/fighters/ken/src/acmd/specials/special_command.rs @@ -1,213 +1,210 @@ - use super::*; -unsafe extern "C" fn game_attackcommand1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 80, 0, 10, 4.0, 0.0, 13.5, 6.5, Some(0.0), Some(8.5), Some(6.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 80, 0, 10, 4.0, 0.0, 13.5, 6.5, Some(0.0), Some(8.5), Some(6.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 63, 30, 0, 40, 3.5, 0.0, 6.0, 7.0, Some(0.0), Some(17.8), Some(9.5), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 63, 30, 0, 40, 3.5, 0.0, 6.0, 7.0, Some(0.0), Some(17.8), Some(9.5), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackcommand2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); // HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackcommand3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 12.0, 30, 80, 0, 35, 3.0, 6.3, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.25); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 12.0, 30, 80, 0, 35, 3.0, 6.3, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.25); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 12.0 / (46.0 - 28.0)); + FT_MOTION_RATE(agent, 12.0 / (46.0 - 28.0)); frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -28, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -28, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.75); } } -unsafe extern "C" fn sound_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_smash_s01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_smash_s01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_ll")); } } -unsafe extern "C" fn expression_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attackcommand1", game_attackcommand1) - .acmd("game_attackcommand2", game_attackcommand2) - .acmd("game_attackcommand3", game_attackcommand3) - .acmd("game_attackcommand4", game_attackcommand4) - .acmd("effect_attackcommand4", effect_attackcommand4) - .acmd("sound_attackcommand4", sound_attackcommand4) - .acmd("expression_attackcommand4", expression_attackcommand4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackcommand1", game_attackcommand1); + agent.acmd("game_attackcommand2", game_attackcommand2); + agent.acmd("game_attackcommand3", game_attackcommand3); + agent.acmd("game_attackcommand4", game_attackcommand4); + agent.acmd("effect_attackcommand4", effect_attackcommand4); + agent.acmd("sound_attackcommand4", sound_attackcommand4); + agent.acmd("expression_attackcommand4", expression_attackcommand4); } diff --git a/fighters/ken/src/acmd/specials/special_hi.rs b/fighters/ken/src/acmd/specials/special_hi.rs index 6cd0801443..e3f15bab34 100644 --- a/fighters/ken/src/acmd/specials/special_hi.rs +++ b/fighters/ken/src/acmd/specials/special_hi.rs @@ -1,317 +1,314 @@ - use super::*; -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_S { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 54, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 54, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 107, 0, 76, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 107, 0, 76, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialairhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if MotionModule::motion_kind(boma) == hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } } frame(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_S { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.8, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.8, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) - && MotionModule::motion_kind(fighter.module_accessor) != hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) + && MotionModule::motion_kind(boma) != hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.6, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.6, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.6, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.6, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 80, 121, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 80, 121, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 5.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); } else { - let id = EffectModule::req_follow(fighter.module_accessor, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID, id as i32); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + let id = EffectModule::req_follow(boma, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID, id as i32); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); } } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_syoryuken_firearc"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_savingattack_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_syoryuken_firearc"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("ken_savingattack_aura"), -1); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ryu_syoryuken_arc"), true, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 21.0); - if is_excute(fighter) { - let id = VarModule::get_int(fighter.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID) as u32; - EffectModule::kill(fighter.module_accessor, id, true, true); + if is_excute(agent) { + let id = VarModule::get_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID) as u32; + EffectModule::kill(boma, id, true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } -unsafe extern "C" fn game_specialhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + 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("ken") - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialairhicommand", game_specialairhi) - .acmd("game_specialairhiend", game_specialairhiend) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialhicommand", game_specialhi) - .acmd("game_specialhifall", game_specialhifall) - .acmd("effect_specialhi", effect_specialhi) - .acmd("effect_specialhicommand", effect_specialhi) - .acmd("effect_specialairhi", effect_specialhi) - .acmd("effect_specialairhicommand", effect_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhicommand", game_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhicommand", game_specialhi); + agent.acmd("game_specialhifall", game_specialhifall); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialhicommand", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("effect_specialairhicommand", effect_specialhi); } diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index 14f2eb05ef..e35ad4d6c5 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -1,152 +1,145 @@ - use super::*; -unsafe extern "C" fn game_speciallwinstall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { } - unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ken_appeal_l01")); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_ken_appeal_l01")); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { - let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); + let sfx_handle = SoundModule::play_se(boma, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 0.5, 0); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ken_appeal_l02")); } } unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 31.0); + frame(lua_state, 31.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_speciallwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 6.0 / 2.0); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 6.0 / 2.0); + if is_excute(agent) { GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 6 + MeterModule::level(agent.battle_object) >= 6 ); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - MeterModule::drain_direct(fighter.battle_object, 0.5 * MeterModule::meter_per_level(fighter.battle_object)); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + MeterModule::drain_direct(agent.battle_object, 0.5 * MeterModule::meter_per_level(agent.battle_object)); } else { - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0 / (26.0 - 18.0)); + FT_MOTION_RATE(agent, 1.0 / (26.0 - 18.0)); } -unsafe extern "C" fn effect_speciallwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); +unsafe extern "C" fn effect_speciallwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn game_specialairlwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 6.0 / 2.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.75); +unsafe extern "C" fn game_specialairlwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 6.0 / 2.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.75); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 6 + MeterModule::level(agent.battle_object) >= 6 ); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairlwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); +unsafe extern "C" fn effect_specialairlwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); } } -unsafe extern "C" fn effect_speciallwstart(fighter: &mut L2CAgentBase) { - // stub -} - -unsafe extern "C" fn effect_specialairlwstart(fighter: &mut L2CAgentBase) { - // stub -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_speciallwinstall", game_speciallwinstall) - .acmd("effect_speciallwinstall", effect_speciallwinstall) - .acmd("sound_speciallwinstall", sound_speciallwinstall) - .acmd("expression_speciallwinstall", expression_speciallwinstall) - .acmd("game_speciallwstepf", game_speciallwstepf) - .acmd("effect_speciallwstepf", effect_speciallwstepf) - .acmd("game_specialairlwstepf", game_specialairlwstepf) - .acmd("effect_specialairlwstepf", effect_specialairlwstepf) - .acmd("effect_speciallwstart", effect_speciallwstart) - .acmd("effect_specialairlwstart", effect_specialairlwstart) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwinstall", game_speciallwinstall); + agent.acmd("effect_speciallwinstall", stub); + agent.acmd("sound_speciallwinstall", sound_speciallwinstall); + agent.acmd("expression_speciallwinstall", expression_speciallwinstall); + agent.acmd("game_speciallwstepf", game_speciallwstepf); + agent.acmd("effect_speciallwstepf", effect_speciallwstepf); + agent.acmd("game_specialairlwstepf", game_specialairlwstepf); + agent.acmd("effect_specialairlwstepf", effect_specialairlwstepf); + agent.acmd("effect_speciallwstart", stub); + agent.acmd("effect_specialairlwstart", stub); } diff --git a/fighters/ken/src/acmd/specials/special_n.rs b/fighters/ken/src/acmd/specials/special_n.rs index f3f04c7ca4..02a4bebb66 100644 --- a/fighters/ken/src/acmd/specials/special_n.rs +++ b/fighters/ken/src/acmd/specials/special_n.rs @@ -1,527 +1,301 @@ - use super::*; -unsafe extern "C" fn ken_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); // checking SITUATION_KIND_AIR so we don't get a ground hadouken on the 1 frame of landing // I could just rewrite the status script to prevent this but thats a lot. - if is_excute(fighter) && !boma.is_prev_situation(*SITUATION_KIND_AIR) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 2.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) && !boma.is_prev_situation(*SITUATION_KIND_AIR) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 2.0 * MeterModule::damage_gain_mul(agent.battle_object)); } } frame(lua_state, 14.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 36.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn ken_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 0.7 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 0.7 * MeterModule::damage_gain_mul(agent.battle_object)); } } frame(lua_state, 15.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 36.0); } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sound_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n02")); } } else{ if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n01")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n01")); } } else { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_command_success")); - PLAY_SE(fighter, Hash40::new("se_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_command_success")); + PLAY_SE(agent, Hash40::new("se_ken_special_n01")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n01_command")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n01_command")); } } } } -unsafe extern "C" fn effect_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 4.0); if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 11.5, 14.5, 0, 0, 0, 1, true); + if is_excute(agent) { + COL_NORMAL(agent); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 11.5, 14.5, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("ken_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("ken_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } for _ in 0..6 { wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } } else{ frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn effect_specialairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); + if is_excute(agent) { + COL_NORMAL(agent); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } } else { frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - } -} - -unsafe extern "C" fn game_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::enable_safe_pos(boma); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); - VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); - } else { - VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); - } - } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } - if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { - let lr = PostureModule::lr(owner_module_accessor); - GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); - KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - else{ - GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } -} - -unsafe extern "C" fn effect_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); - } else { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); - } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } - } -} - -unsafe extern "C" fn sound_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n04")); - } -} - -unsafe extern "C" fn game_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } - - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - } - if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { - let lr = PostureModule::lr(owner_module_accessor); - GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); - KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - wait(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - } - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); - } -} - -unsafe extern "C" fn effect_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - } -} - -unsafe extern "C" fn game_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn effect_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - } - } -} - -unsafe extern "C" fn sound_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n04")); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_specialn", ken_special_n_game) - .acmd("game_specialairn", ken_special_air_n_game) - .acmd("sound_specialn", sound_specialn) - .acmd("sound_specialairn", sound_specialn) - .acmd("effect_specialn", effect_specialn) - .acmd("effect_specialairn", effect_specialairn) - .install(); - smashline::Agent::new("ken_hadoken") - .acmd("game_movew", game_movewms) - .acmd("game_movem", game_movewms) - .acmd("game_moves", game_movewms) - .acmd("effect_movew", effect_movewms) - .acmd("effect_movem", effect_movewms) - .acmd("effect_moves", effect_movewms) - .acmd("sound_movew", sound_movewms) - .acmd("sound_movem", sound_movewms) - .acmd("sound_moves", sound_movewms) - .acmd("game_movespw", game_movespwms) - .acmd("game_movespm", game_movespwms) - .acmd("game_movesps", game_movespwms) - .acmd("game_movespw_last", game_movespwms_last) - .acmd("game_movespm_last", game_movespwms_last) - .acmd("game_movesps_last", game_movespwms_last) - .acmd("effect_movespw", effect_movespwms) - .acmd("effect_movespm", effect_movespwms) - .acmd("effect_movesps", effect_movespwms) - .acmd("effect_movespw_last", effect_movespwms_last) - .acmd("effect_movespm_last", effect_movespwms_last) - .acmd("effect_movesps_last", effect_movespwms_last) - .acmd("sound_movespw", sound_movespwms) - .acmd("sound_movespm", sound_movespwms) - .acmd("sound_movesps", sound_movespwms) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialairn); } diff --git a/fighters/ken/src/acmd/specials/special_s.rs b/fighters/ken/src/acmd/specials/special_s.rs index b7c00b23dc..09143c6e32 100644 --- a/fighters/ken/src/acmd/specials/special_s.rs +++ b/fighters/ken/src/acmd/specials/special_s.rs @@ -1,82 +1,81 @@ - use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 3.5, 8.5, 8.5); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.5, 8.5, 4.5); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * dmg, 0, 50, 100, 0, 4.5, 0.0, 9.0, 4.5, Some(0.0), Some(9.0), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * dmg, 0, 50, 100, 0, 4.5, 0.0, 9.0, 4.5, Some(0.0), Some(9.0), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 3.0, 9.0, 3.0); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.6); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - MeterModule::watch_damage(fighter.battle_object, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - } else if fighter.is_situation(*SITUATION_KIND_GROUND) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 12.5, 6.25, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * dmg, 365, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + } else if agent.is_situation(*SITUATION_KIND_GROUND) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 12.5, 6.25, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * dmg, 365, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * dmg, 31, 100, 59, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * dmg, 31, 100, 59, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -85,24 +84,24 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 12.5, -12.5, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 8.5, -6.25, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - } else if fighter.is_situation(*SITUATION_KIND_GROUND) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 12.5, -12.5, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 8.5, -6.25, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + } else if agent.is_situation(*SITUATION_KIND_GROUND) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); @@ -110,167 +109,164 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { // no finisher } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } -unsafe extern "C" fn effect_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsstart(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.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } if (boma.is_situation(*SITUATION_KIND_GROUND)) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10.5, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10.5, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND) && boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } - if is_excute(fighter) { + if is_excute(agent) { // FOOT_EFFECT_FLIP(fighter, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); // LAST_EFFECT_SET_RATE(fighter, 1.1); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -unsafe extern "C" fn effect_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND) { - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("game_specialsend", game_specialsend) - .acmd("game_specialairsend", game_specialsend) - .acmd("effect_specialsstart", effect_specialsstart) - .acmd("effect_specialairsstart", effect_specialsstart) - .acmd("effect_specials", effect_specials) - .acmd("effect_specialairs", effect_specials) - .acmd("effect_specialsend", effect_specialsend) - .acmd("effect_specialairsend", effect_specialsend) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); } diff --git a/fighters/ken/src/acmd/throws.rs b/fighters/ken/src/acmd/throws.rs index 94bb4a7bda..fd315ad587 100644 --- a/fighters/ken/src/acmd/throws.rs +++ b/fighters/ken/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn ken_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ken_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn ken_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ken_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,112 +63,112 @@ unsafe extern "C" fn ken_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 7); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 8.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 8.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 39, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 39, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 7); + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 10.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 10.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 42.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 77, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 77, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 6.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 6.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 91, 192, 0, 49, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 91, 192, 0, 49, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 91, 130, 0, 60, 4.3, 4.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.8, 2.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.7, -0.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 91, 130, 0, 60, 4.3, 4.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.8, 2.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.7, -0.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 20); + CHECK_FINISH_CAMERA(agent, 0, 20); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::add(fighter.battle_object, 1.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::add(agent.battle_object, 1.0 * MeterModule::damage_gain_mul(agent.battle_object)); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } @@ -213,17 +212,19 @@ unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_catch", ken_catch_game) - .acmd("game_catchdash", ken_catch_dash_game) - .acmd("game_catchturn", ken_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .acmd("effect_throwhi", effect_throwhi) - .acmd("sound_throwhi", sound_throwhi) - .acmd("expression_throwhi", expression_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); } diff --git a/fighters/ken/src/acmd/tilts.rs b/fighters/ken/src/acmd/tilts.rs index 6e4b157bc1..6635c33f12 100644 --- a/fighters/ken/src/acmd/tilts.rs +++ b/fighters/ken/src/acmd/tilts.rs @@ -1,42 +1,41 @@ - use super::*; -unsafe extern "C" fn game_attacks3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 2.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.8 * dmg, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.8 * dmg, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.8 * dmg, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.8 * dmg, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } @@ -84,302 +83,302 @@ unsafe extern "C" fn expression_attacks3w(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 38, 104, 0, 47, 3.0, 0.0, 12.5, 2.0, Some(0.0), Some(12.5), Some(2.7), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 38, 104, 0, 47, 3.4, 0.0, 12.5, 8.6, Some(0.0), Some(12.5), Some(6.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 38, 104, 0, 47, 3.0, 0.0, 12.5, 2.0, Some(0.0), Some(12.5), Some(2.7), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 38, 104, 0, 47, 3.4, 0.0, 12.5, 8.6, Some(0.0), Some(12.5), Some(6.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn game_attackhi3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 3.0); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 21.0); - if is_excute(fighter) { - boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - } -} - -unsafe extern "C" fn game_attacklw3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let mut attr = Hash40::new("collision_attr_normal"); - let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - attr = Hash40::new("collision_attr_fire"); - dmg = 1.10; - } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - } - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - // GROUND ONLY - // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground - ATTACK(fighter, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - // AIR ONLY - // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage - ATTACK(fighter, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - } -} - -unsafe extern "C" fn game_attacklw3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let mut attr = Hash40::new("collision_attr_normal"); - let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - attr = Hash40::new("collision_attr_fire"); - dmg = 1.10; - } - frame(lua_state, 7.0); - if is_excute(fighter) { - boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - } - wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); // HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); // GROUND - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); // AIR - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 9.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn sound_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ken_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ken_attack06")); } } -unsafe extern "C" fn expression_attackhi3s(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_attackhi3s(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attacks3w", game_attacks3w) - .acmd("game_attacknearw", game_attacks3w) - .acmd("effect_attacks3w", effect_attacks3w) - .acmd("effect_attacknearw", effect_attacks3w) - .acmd("sound_attacks3w", sound_attacks3w) - .acmd("sound_attacknearw", sound_attacks3w) - .acmd("expression_attacks3w", expression_attacks3w) - .acmd("expression_attacknearw", expression_attacks3w) - .acmd("game_attacks3s", game_attacks3s) - .acmd("effect_attacks3s", effect_attacks3s) - .acmd("game_attackhi3w", game_attackhi3w) - .acmd("game_attacklw3w", game_attacklw3w) - .acmd("game_attacklw3s", game_attacklw3s) - .acmd("game_attackhi3s", game_attackhi3s) - .acmd("effect_attackhi3s", effect_attackhi3s) - .acmd("sound_attackhi3s", sound_attackhi3s) - .acmd("expression_attackhi3s", expression_attackhi3s) - .install(); +unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut attr = Hash40::new("collision_attr_normal"); + let mut dmg = 1.0; + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + attr = Hash40::new("collision_attr_fire"); + dmg = 1.10; + } + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); + } + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + // GROUND ONLY + // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground + ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + // AIR ONLY + // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage + ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MeterModule::watch_damage(agent.battle_object, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + } + frame(lua_state, 14.0); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + } +} + +unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut attr = Hash40::new("collision_attr_normal"); + let mut dmg = 1.0; + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + attr = Hash40::new("collision_attr_fire"); + dmg = 1.10; + } + frame(lua_state, 7.0); + if is_excute(agent) { + boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MeterModule::watch_damage(agent.battle_object, false); + } + wait(lua_state, 10.0); + if is_excute(agent) { + boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3w", game_attacks3w); + agent.acmd("game_attacknearw", game_attacks3w); + agent.acmd("effect_attacks3w", effect_attacks3w); + agent.acmd("effect_attacknearw", effect_attacks3w); + agent.acmd("sound_attacks3w", sound_attacks3w); + agent.acmd("sound_attacknearw", sound_attacks3w); + agent.acmd("expression_attacks3w", expression_attacks3w); + agent.acmd("expression_attacknearw", expression_attacks3w); + agent.acmd("game_attacks3s", game_attacks3s); + agent.acmd("effect_attacks3s", effect_attacks3s); + + agent.acmd("game_attackhi3w", game_attackhi3w); + agent.acmd("game_attackhi3s", game_attackhi3s); + agent.acmd("effect_attackhi3s", effect_attackhi3s); + agent.acmd("sound_attackhi3s", sound_attackhi3s); + agent.acmd("expression_attackhi3s", expression_attackhi3s); + + agent.acmd("game_attacklw3w", game_attacklw3w); + agent.acmd("game_attacklw3s", game_attacklw3s); } diff --git a/fighters/ken/src/hadoken/acmd.rs b/fighters/ken/src/hadoken/acmd.rs new file mode 100644 index 0000000000..c0ea6b5814 --- /dev/null +++ b/fighters/ken/src/hadoken/acmd.rs @@ -0,0 +1,225 @@ +use super::*; + +unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::enable_safe_pos(boma); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); + VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); + } else { + VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); + } + } + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + else{ + GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } + wait(lua_state, 6.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } +} + +unsafe extern "C" fn effect_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); + } + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } + } +} + +unsafe extern "C" fn sound_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) + } + + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + wait(lua_state, 9.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + } + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); + } +} + +unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } + } +} + +unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + } +} + +unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + } + } +} + +unsafe extern "C" fn sound_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movew", game_movewms); + agent.acmd("game_movem", game_movewms); + agent.acmd("game_moves", game_movewms); + agent.acmd("effect_movew", effect_movewms); + agent.acmd("effect_movem", effect_movewms); + agent.acmd("effect_moves", effect_movewms); + agent.acmd("sound_movew", sound_movewms); + agent.acmd("sound_movem", sound_movewms); + agent.acmd("sound_moves", sound_movewms); + agent.acmd("game_movespw", game_movespwms); + agent.acmd("game_movespm", game_movespwms); + agent.acmd("game_movesps", game_movespwms); + agent.acmd("game_movespw_last", game_movespwms_last); + agent.acmd("game_movespm_last", game_movespwms_last); + agent.acmd("game_movesps_last", game_movespwms_last); + agent.acmd("effect_movespw", effect_movespwms); + agent.acmd("effect_movespm", effect_movespwms); + agent.acmd("effect_movesps", effect_movespwms); + agent.acmd("effect_movespw_last", effect_movespwms_last); + agent.acmd("effect_movespm_last", effect_movespwms_last); + agent.acmd("effect_movesps_last", effect_movespwms_last); + agent.acmd("sound_movespw", sound_movespwms); + agent.acmd("sound_movespm", sound_movespwms); + agent.acmd("sound_movesps", sound_movespwms); +} \ No newline at end of file diff --git a/fighters/ken/src/hadoken/mod.rs b/fighters/ken/src/hadoken/mod.rs new file mode 100644 index 0000000000..e51c1a9223 --- /dev/null +++ b/fighters/ken/src/hadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ken_hadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ken/src/lib.rs b/fighters/ken/src/lib.rs index 8e2ddcc726..624d9624c4 100644 --- a/fighters/ken/src/lib.rs +++ b/fighters/ken/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +//articles + +mod hadoken; +mod shinryuken; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ken"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + hadoken::install(); + shinryuken::install(); } diff --git a/fighters/ken/src/opff.rs b/fighters/ken/src/opff.rs index 43d28ac029..7b022ff0fd 100644 --- a/fighters/ken/src/opff.rs +++ b/fighters/ken/src/opff.rs @@ -63,11 +63,9 @@ extern "Rust" { fn shotos_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); } -pub fn install() { - smashline::Agent::new("ken") - .on_line(Main, ken_frame_wrapper) - .on_line(Main, ken_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ken_frame_wrapper); + agent.on_line(Main, ken_meter); } unsafe extern "C" fn ken_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -361,6 +359,7 @@ unsafe fn rotate_forward_bair(boma: &mut BattleObjectModuleAccessor) { } } } + unsafe fn ken_ex_focus(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { // enter EX if A+B on frame<5 if fighter.is_status_one_of(&[ diff --git a/fighters/ken/src/shinryuken/acmd.rs b/fighters/ken/src/shinryuken/acmd.rs new file mode 100644 index 0000000000..2a05ab2cbf --- /dev/null +++ b/fighters/ken/src/shinryuken/acmd.rs @@ -0,0 +1,46 @@ +use super::*; + +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 110, 120, 130, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + frame(lua_state, 52.0); + if is_excute(agent) { + boma.on_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.9, 110, 85, 70, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.9, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + frame(lua_state, 90.0); + if is_excute(agent) { + boma.off_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); + AttackModule::clear_all(boma); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, 50.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 51.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); + EffectModule::set_scale_last(boma, &Vector3f::new(0.6, 0.36, 0.6)); + } + frame(lua_state, 97.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); + agent.acmd("effect_final", effect_final); +} \ No newline at end of file diff --git a/fighters/ken/src/shinryuken/mod.rs b/fighters/ken/src/shinryuken/mod.rs new file mode 100644 index 0000000000..757246c127 --- /dev/null +++ b/fighters/ken/src/shinryuken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ken_shinryuken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ken/src/status/attack.rs b/fighters/ken/src/status/attack.rs new file mode 100644 index 0000000000..02fafa993d --- /dev/null +++ b/fighters/ken/src/status/attack.rs @@ -0,0 +1,196 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, + ) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_near_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK11, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk(fighter); + } + fighter.global_table[SUB_STATUS3] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk4(fighter, false.into()); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn ken_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + } + if ComboModule::count(fighter.module_accessor) == 1 { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); + let attack_start_cancel_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_start_cancel_frame"), + ); + if current_frame < attack_start_cancel_frame { + if ryu_kara_cancel(fighter).get_bool() { + return 1.into(); + } + } + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter + .sub_wait_ground_check_common(false.into()) + .get_bool() + { + return 1.into(); + } + } + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("attack_11_w"), + hash40("attack_11_s"), + hash40("attack_11_near_s"), + ] + .contains(&mot) + { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, + ) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, + ) { + if ControlModule::check_button_off( + fighter.module_accessor, + *CONTROL_PAD_BUTTON_ATTACK, + ) { + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let attack_hi3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_hi3_stick_y"), + ); + let cont; + if !(stick_y < attack_hi3_stick_y) { + cont = false; + } else { + let attack_lw3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_lw3_stick_y"), + ); + if !(attack_lw3_stick_y < stick_y) { + cont = false; + } else { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let attack_s3_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_s3_stick_x"), + ); + cont = stick_x < attack_s3_stick_x; + } + } + if cont { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, + ) { + let button_on_frame = WorkModule::get_int( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, + ); + let attack_11_s_button_on_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_11_s_button_on_frame"), + ); + if attack_11_s_button_on_frame <= button_on_frame as f32 { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + // if 0 < WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { + // if !StopModule::is_stop(fighter.module_accessor) { + // if fighter.sub_check_button_jump().get_bool() { + + // } + // } + // } + if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { + if !MotionModule::is_end(fighter.module_accessor) { + common::shoto_status::ryu_idkwhatthisis2(fighter); + } else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } else { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); +} diff --git a/fighters/ken/src/status/dash.rs b/fighters/ken/src/status/dash.rs new file mode 100644 index 0000000000..ce7dfe8fde --- /dev/null +++ b/fighters/ken/src/status/dash.rs @@ -0,0 +1,42 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +// FIGHTER_RYU_STATUS_KIND_DASH_BACK + +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); + + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_end); +} diff --git a/fighters/ken/src/status/finals.rs b/fighters/ken/src/status/finals.rs index 519d84043d..8a54a4f330 100644 --- a/fighters/ken/src/status/finals.rs +++ b/fighters/ken/src/status/finals.rs @@ -1,10 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_STATUS_KIND_FINAL // +// FIGHTER_STATUS_KIND_FINAL -pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -35,17 +33,16 @@ pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -// FIGHTER_RYU_STATUS_KIND_FINAL2 // +// FIGHTER_RYU_STATUS_KIND_FINAL2 -pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Pre, fighter, *FIGHTER_RYU_STATUS_KIND_FINAL2)(fighter); let meter_amount = MeterModule::meter(fighter.battle_object); MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); } diff --git a/fighters/ken/src/status/guard.rs b/fighters/ken/src/status/guard.rs new file mode 100644 index 0000000000..28eadde129 --- /dev/null +++ b/fighters/ken/src/status/guard.rs @@ -0,0 +1,85 @@ +use super::*; + +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_main_loop) +} + +unsafe extern "C" fn guard_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_main); +} diff --git a/fighters/ken/src/status.rs b/fighters/ken/src/status/mod.rs similarity index 51% rename from fighters/ken/src/status.rs rename to fighters/ken/src/status/mod.rs index 606cc9ce6b..5033b6f4a7 100644 --- a/fighters/ken/src/status.rs +++ b/fighters/ken/src/status/mod.rs @@ -1,13 +1,16 @@ use super::*; use globals::*; // status script import + mod finals; mod special_cmd4; mod special_hi; mod special_lw; mod special_n; mod special_s; - +mod attack; +mod dash; +mod guard; utils::import_noreturn!(common::shoto_status::{ fgc_end_dashback, ryu_idkwhatthisis2 @@ -24,19 +27,6 @@ extern "Rust" { fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; } -extern "C" fn ken_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_KEN { - return; - } - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ken_check_special_command as *const () as _)); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); - } -} - // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S) { @@ -56,7 +46,6 @@ unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterComm } unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // resets IS_USE_EX_SPECIAL if !fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_HI, @@ -322,338 +311,39 @@ pub unsafe extern "C" fn ken_check_special_command(fighter: &mut L2CFighterCommo false.into() } -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() -} -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_RYU_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // - -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, - ) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_near_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK11, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk(fighter); - } - fighter.global_table[SUB_STATUS3] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk4(fighter, false.into()); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_main_loop as *const () as _)) -} - -unsafe extern "C" fn ken_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - } - if ComboModule::count(fighter.module_accessor) == 1 { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); - let attack_start_cancel_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_start_cancel_frame"), - ); - if current_frame < attack_start_cancel_frame { - if ryu_kara_cancel(fighter).get_bool() { - return 1.into(); - } - } - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter - .sub_wait_ground_check_common(false.into()) - .get_bool() - { - return 1.into(); - } - } - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("attack_11_w"), - hash40("attack_11_s"), - hash40("attack_11_near_s"), - ] - .contains(&mot) - { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, - ) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, - ) { - if ControlModule::check_button_off( - fighter.module_accessor, - *CONTROL_PAD_BUTTON_ATTACK, - ) { - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let attack_hi3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_hi3_stick_y"), - ); - let cont; - if !(stick_y < attack_hi3_stick_y) { - cont = false; - } else { - let attack_lw3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_lw3_stick_y"), - ); - if !(attack_lw3_stick_y < stick_y) { - cont = false; - } else { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let attack_s3_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_s3_stick_x"), - ); - cont = stick_x < attack_s3_stick_x; - } - } - if cont { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, - ) { - let button_on_frame = WorkModule::get_int( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, - ); - let attack_11_s_button_on_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_11_s_button_on_frame"), - ); - if attack_11_s_button_on_frame <= button_on_frame as f32 { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - // if 0 < WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { - // if !StopModule::is_stop(fighter.module_accessor) { - // if fighter.sub_check_button_jump().get_bool() { - - // } - // } - // } - if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { - if !MotionModule::is_end(fighter.module_accessor) { - common::shoto_status::ryu_idkwhatthisis2(fighter); - } else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } else { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_WAIT // +// FIGHTER_STATUS_KIND_WAIT pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Wait() } -// FIGHTER_STATUS_KIND_LANDING // +// FIGHTER_STATUS_KIND_LANDING pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_landing_main(fighter) } -pub fn install() { - finals::install(); - special_cmd4::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); - - smashline::Agent::new("ken") - .on_start(ken_init) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ken_check_special_command as *const () as _)); + VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); + + finals::install(agent); + special_cmd4::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); + attack::install(agent); + dash::install(agent); + guard::install(agent); } diff --git a/fighters/ken/src/status/special_cmd4.rs b/fighters/ken/src/status/special_cmd4.rs index c7b943b463..84751a3444 100644 --- a/fighters/ken/src/status/special_cmd4.rs +++ b/fighters/ken/src/status/special_cmd4.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn ken_attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// statuses::ken::ATTACK_COMMAND_4 + +pub unsafe extern "C" fn attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -30,7 +30,7 @@ pub unsafe extern "C" fn ken_attack_command_4_pre(fighter: &mut L2CFighterCommon 0.into() } -pub unsafe extern "C" fn ken_attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_command4"), 0.0, 1.0, false, 0.0, false, false); fighter.set_int(*FIGHTER_LOG_ATTACK_KIND_ATTACK_COMMAND2, *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND); // fighter.clear_lua_stack(); @@ -38,10 +38,10 @@ pub unsafe extern "C" fn ken_attack_command_4_main(fighter: &mut L2CFighterCommo // let mut lr = PostureModule::lr(fighter.module_accessor); // fighter.push_lua_stack(&mut L2CValue::F32(lr)); // app::sv_kinetic_energy::set_chara_dir(fighter.lua_state_agent); - fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_command_4_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_command_4_main_loop as *const () as _)) } -pub unsafe extern "C" fn ken_attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 1.into(); @@ -71,9 +71,7 @@ pub unsafe extern "C" fn ken_attack_command_4_main_loop(fighter: &mut L2CFighter 0.into() } -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_pre) - .status(Main, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ken::ATTACK_COMMAND_4, attack_command_4_pre); + agent.status(Main, statuses::ken::ATTACK_COMMAND_4, attack_command_4_main); } diff --git a/fighters/ken/src/status/special_hi.rs b/fighters/ken/src/status/special_hi.rs index be659e9a75..190317faba 100644 --- a/fighters/ken/src/status/special_hi.rs +++ b/fighters/ken/src/status/special_hi.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; -use smashline::*; +// FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP -// FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP // - -pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP || fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_FALL || fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING { @@ -25,10 +22,8 @@ pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> return 0.into(); } -pub fn install() { - smashline::Agent::new("ken") - .status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, end_special_hi_jump) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, end_special_hi_jump) - .status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, end_special_hi_jump) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_jump_end); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, special_hi_jump_end); } diff --git a/fighters/ken/src/status/special_lw.rs b/fighters/ken/src/status/special_lw.rs index 4657fa4700..abab11b63f 100644 --- a/fighters/ken/src/status/special_lw.rs +++ b/fighters/ken/src/status/special_lw.rs @@ -1,25 +1,13 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install() { - smashline::Agent::new("ken") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init) - .status(Pre, statuses::ken::INSTALL, special_lw_install_pre) - .status(Main, statuses::ken::INSTALL, special_lw_install_main) - .status(End, statuses::ken::INSTALL, special_lw_install_end) - .install(); -} - -// FIGHTER_STATUS_KIND_SPECIAL_LW // +// FIGHTER_STATUS_KIND_SPECIAL_LW pub unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F.into(), true.into()); return 1.into(); } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F pub unsafe extern "C" fn special_lw_step_f_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -28,7 +16,6 @@ pub unsafe extern "C" fn special_lw_step_f_init(fighter: &mut L2CFighterCommon) smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F)(fighter) } - unsafe extern "C" fn special_lw_install_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -98,7 +85,7 @@ unsafe extern "C" fn special_lw_install_main_loop(fighter: &mut L2CFighterCommon } if fighter.is_situation(*SITUATION_KIND_AIR) { // TODO: replace these with actual params - let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut FighterKineticEnergyGravity; + let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; smash::app::lua_bind::FighterKineticEnergyGravity::set_accel(fighter_gravity, -0.03); smash::app::lua_bind::FighterKineticEnergyGravity::set_stable_speed(fighter_gravity, -1.6); } @@ -140,3 +127,12 @@ unsafe extern "C" fn special_lw_install_set_kinetic(fighter: &mut L2CFighterComm KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); } } + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init); + + agent.status(Pre, statuses::ken::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ken::INSTALL, special_lw_install_main); + agent.status(End, statuses::ken::INSTALL, special_lw_install_end); +} \ No newline at end of file diff --git a/fighters/ken/src/status/special_n.rs b/fighters/ken/src/status/special_n.rs index 32b68aa3ce..3275158d54 100644 --- a/fighters/ken/src/status/special_n.rs +++ b/fighters/ken/src/status/special_n.rs @@ -1,17 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command) - .install(); -} - -// FIGHTER_STATUS_KIND_SPECIAL_N // +// FIGHTER_STATUS_KIND_SPECIAL_N -pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND); return 1.into(); @@ -19,9 +10,9 @@ pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CVal smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND -pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_command_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND); return 1.into(); @@ -29,3 +20,7 @@ pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) - smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND)(fighter) } +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, special_n_command_pre); +} \ No newline at end of file diff --git a/fighters/ken/src/status/special_s.rs b/fighters/ken/src/status/special_s.rs index f7c316962f..84db0e6406 100644 --- a/fighters/ken/src/status/special_s.rs +++ b/fighters/ken/src/status/special_s.rs @@ -1,46 +1,34 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP -pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_loop_init(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP)(fighter) } -pub fn install() { - smashline::Agent::new("ken") - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - init_special_s_command, - ) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - init_special_s_loop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_init); } diff --git a/fighters/kirby/src/acmd/aerials.rs b/fighters/kirby/src/acmd/aerials.rs index ac49c5a3ff..99fdb36b2b 100644 --- a/fighters/kirby/src/acmd/aerials.rs +++ b/fighters/kirby/src/acmd/aerials.rs @@ -1,204 +1,201 @@ use super::*; -unsafe extern "C" fn kirby_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.375); + FT_MOTION_RATE(agent, 0.375); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("toer"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("toel"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("toer"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("toel"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 35.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kirby_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.77778); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.77778); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 39, 0, 43, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 38, 0, 35, 4.5, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 39, 0, 43, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 38, 0, 35, 4.5, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 2.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 2.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 4.2, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 3.0, 12.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 4.2, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 3.0, 12.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kirby_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kirby_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -14, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -14, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn kirby_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.0, 0.0, -5.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.0, 0.0, -5.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kirby_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 17.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 12.0); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 48, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 275, 36, 0, 40, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 48, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 275, 36, 0, 40, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kirby_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attackairn", kirby_attack_air_n_game) - .acmd("game_attackairf", kirby_attack_air_f_game) - .acmd("game_attackairb", kirby_attack_air_b_game) - .acmd("effect_attackairb", kirby_attack_air_b_effect) - .acmd("game_attackairhi", kirby_attack_air_hi_game) - .acmd("game_attackairlw", kirby_attack_air_lw_game) - .acmd("game_landingairlw", kirby_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/kirby/src/acmd/copy.rs b/fighters/kirby/src/acmd/copy.rs new file mode 100644 index 0000000000..fb37ebc515 --- /dev/null +++ b/fighters/kirby/src/acmd/copy.rs @@ -0,0 +1,41 @@ +use super::*; + +mod diddy; +mod edge; +mod ganon; +mod koopa; +mod koopajr; +mod krool; +mod littlemac; +mod lucas; +mod luigi; +mod mario; +mod mariod; +mod miigunner; +mod palutena; +mod richter; +mod ridley; +mod roy; +mod shizue; +mod sonic; + +pub fn install(agent: &mut Agent) { + diddy::install(agent); + edge::install(agent); + ganon::install(agent); + koopa::install(agent); + koopajr::install(agent); + krool::install(agent); + littlemac::install(agent); + lucas::install(agent); + luigi::install(agent); + mario::install(agent); + mariod::install(agent); + miigunner::install(agent); + palutena::install(agent); + richter::install(agent); + ridley::install(agent); + roy::install(agent); + shizue::install(agent); + sonic::install(agent); +} diff --git a/fighters/kirby/src/acmd/copy/diddy.rs b/fighters/kirby/src/acmd/copy/diddy.rs new file mode 100644 index 0000000000..7829b457af --- /dev/null +++ b/fighters/kirby/src/acmd/copy/diddy.rs @@ -0,0 +1,85 @@ +use super::*; + +unsafe extern "C" fn game_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn effect_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn sound_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn expression_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn game_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn effect_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn sound_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn expression_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_diddyspecialncancel", game_diddyspecialncancel); + agent.acmd("effect_diddyspecialncancel", effect_diddyspecialncancel); + agent.acmd("sound_diddyspecialncancel", sound_diddyspecialncancel); + agent.acmd( + "expression_diddyspecialncancel", + expression_diddyspecialncancel, + ); + agent.acmd( + "game_diddyspecialairncancel", + game_diddyspecialairncancel, + ); + agent.acmd( + "effect_diddyspecialairncancel", + effect_diddyspecialairncancel, + ); + agent.acmd( + "sound_diddyspecialairncancel", + sound_diddyspecialairncancel, + ); + agent.acmd( + "expression_diddyspecialairncancel", + expression_diddyspecialairncancel, + ); + } \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/edge.rs b/fighters/kirby/src/acmd/copy/edge.rs new file mode 100644 index 0000000000..d16d6514aa --- /dev/null +++ b/fighters/kirby/src/acmd/copy/edge.rs @@ -0,0 +1,85 @@ +use super::*; + +unsafe extern "C" fn game_edgespecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 20.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 32.0); + FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 79.0); + FT_MOTION_RATE(agent, 1.2); + frame(lua_state, 99.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 100.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 105.0); + FT_MOTION_RATE(agent, 1.6); + frame(lua_state, 115.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 120.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); + } + frame(lua_state, 140.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } +} + +unsafe extern "C" fn game_edgespecialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); + } + frame(lua_state, 15.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } +} + +unsafe extern "C" fn game_edgespecialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); + } + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 0.4); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } + frame(lua_state, 60.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_edgespecialnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialairnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialn1", game_edgespecialn1); + agent.acmd("game_edgespecialairn1", game_edgespecialn1); + agent.acmd("game_edgespecialn2", game_edgespecialn2); + agent.acmd("game_edgespecialairn2", game_edgespecialn2); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/ganon.rs b/fighters/kirby/src/acmd/copy/ganon.rs new file mode 100644 index 0000000000..f1775ba585 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/ganon.rs @@ -0,0 +1,165 @@ +use super::*; + +unsafe extern "C" fn game_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + } + frame(lua_state, 20.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + } + frame(lua_state, 28.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 6.0); + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } +} + +unsafe extern "C" fn expression_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn sound_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); + } + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_jump01")); + } +} + +unsafe extern "C" fn game_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0 / 10.0); + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + frame(lua_state, 2.0); + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } +} + +unsafe extern "C" fn expression_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn sound_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); + } +} + +unsafe extern "C" fn game_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 20.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + } + frame(lua_state, 60.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } +} + +unsafe extern "C" fn effect_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); + } +} + +unsafe extern "C" fn expression_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ganonfloatstart", game_ganonfloatstart); + agent.acmd("effect_ganonfloatstart", effect_ganonfloatstart); + agent.acmd("expression_ganonfloatstart", expression_ganonfloatstart); + agent.acmd("sound_ganonfloatstart", sound_ganonfloatstart); + agent.acmd("game_ganonfloatairstart", game_ganonfloatairstart); + agent.acmd("effect_ganonfloatairstart", effect_ganonfloatairstart); + agent.acmd( + "expression_ganonfloatairstart", + expression_ganonfloatairstart, + ); + agent.acmd("sound_ganonfloatairstart", sound_ganonfloatairstart); + agent.acmd("game_ganonfloat", game_ganonfloat); + agent.acmd("effect_ganonfloat", effect_ganonfloat); + agent.acmd("expression_ganonfloat", expression_ganonfloat); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/koopa.rs b/fighters/kirby/src/acmd/copy/koopa.rs new file mode 100644 index 0000000000..2787bef9b8 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/koopa.rs @@ -0,0 +1,150 @@ +use super::*; + +unsafe extern "C" fn effect_koopaspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + FLASH(agent, 0.961, 0.569, 0.569, 0.392); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); + } + wait(lua_state, 20.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_koopaspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + } + wait(lua_state, 19.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_copy_koopa_01")); + } +} + +unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent,1.0,31.0,16.0); +} + +unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); + } +} + +unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent,1.5); + + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + FLASH(agent, 0.961, 0.569, 0.569, 0.392); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"),false,false); + } + frame(lua_state, 24.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("koopa_breath_m_fire"),false,false); + + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 42.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); + } +} + +unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + } + wait(lua_state, 19.0); + if is_excute(agent) { + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); + } + } + frame(lua_state, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); + } + frame(lua_state, 24.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } +} + +unsafe extern "C" fn expression_koopaspecialnmax(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); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_koopaspecialnstart", effect_koopaspecialnstart); + agent.acmd("effect_koopaspecialairnstart", effect_koopaspecialnstart); + agent.acmd("sound_koopaspecialnstart", sound_koopaspecialnstart); + agent.acmd("game_koopaspecialnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialairnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialnmax", game_koopaspecialnmax); + agent.acmd("game_koopaspecialairnmax", game_koopaspecialnmax); + agent.acmd("effect_koopaspecialnmax", effect_koopaspecialnmax); + agent.acmd("effect_koopaspecialairnmax", effect_koopaspecialnmax); + agent.acmd("sound_koopaspecialnmax", sound_koopaspecialnmax); + agent.acmd("sound_koopaspecialairnmax", sound_koopaspecialnmax); + agent.acmd( + "expression_koopaspecialnmax", + expression_koopaspecialnmax, + ); + agent.acmd( + "expression_koopaspecialairnmax", + expression_koopaspecialnmax, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/koopajr.rs b/fighters/kirby/src/acmd/copy/koopajr.rs new file mode 100644 index 0000000000..d8ae136388 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/koopajr.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn effect_koopajrspecialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { + EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + else { + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_koopajrspecialnshoot", + effect_koopajrspecialnshoot, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/krool.rs b/fighters/kirby/src/acmd/copy/krool.rs new file mode 100644 index 0000000000..5f5082d3ed --- /dev/null +++ b/fighters/kirby/src/acmd/copy/krool.rs @@ -0,0 +1,114 @@ +use super::*; + +unsafe extern "C" fn effect_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 30.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 31.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn sound_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n08")); + } + frame(lua_state, 31.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { + PLAY_SE(agent, Hash40::new("se_krool_special_n07")); + } + else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + PLAY_SE(agent, Hash40::new("se_krool_special_n01")); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n09")); + } +} + +unsafe extern "C" fn expression_kroolspecialnfire(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); + ItemModule::set_have_item_visibility(boma, false, 0); + VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + } + frame(lua_state, 31.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 76.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); + } + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } + frame(lua_state, 89.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); + } +} + +unsafe extern "C" fn effect_kroolspecialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.9); + } + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); + } + } + wait(lua_state, 10.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_kroolspecialnfire", effect_kroolspecialnfire); + agent.acmd("effect_kroolspecialairnfire", effect_kroolspecialnfire); + agent.acmd("sound_kroolspecialnfire", sound_kroolspecialnfire); + agent.acmd("sound_kroolspecialairnfire", sound_kroolspecialnfire); + agent.acmd( + "expression_kroolspecialnfire", + expression_kroolspecialnfire, + ); + agent.acmd( + "expression_kroolspecialairnfire", + expression_kroolspecialnfire, + ); + agent.acmd("effect_kroolspecialnloop", effect_kroolspecialnloop); + agent.acmd("effect_kroolspecialairnloop", effect_kroolspecialnloop); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/littlemac.rs b/fighters/kirby/src/acmd/copy/littlemac.rs new file mode 100644 index 0000000000..1c99640bdd --- /dev/null +++ b/fighters/kirby/src/acmd/copy/littlemac.rs @@ -0,0 +1,137 @@ +use super::*; + +unsafe extern "C" fn game_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + let damage = 22.0 * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; + let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; + let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; + let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + AttackModule::set_damage_shake_scale(boma, 0.67); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 39.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::kirby::status::KO_PUNCH_GRAVITY); + } +} + +unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let size = 1.0; + EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); + } + frame(lua_state, 7.0); + if is_excute(agent) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); + } + } + frame(lua_state, 8.0); + let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(45.0, 135.0, 45.0), 0.3, false, 0, 0, 0, 0, 0, false, false); + if is_excute(agent) { + EffectModule::set_rate(boma, handle as u32, 1.5); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); + let facing = PostureModule::lr(boma); + EffectModule::set_rot(boma, handle as u32, &Vector3f::new(45.0 * facing, 135.0, 45.0 * facing)); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); + } +} + +unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); + PLAY_SE(agent, Hash40::new("vc_kirby_hammermax")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); + } +} + +unsafe extern "C" fn expression_littlemacspecialn(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); + } + frame(lua_state, 8.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_littlemacspecialn", game_littlemacspecialn); + agent.acmd("game_littlemacspecialairn", game_littlemacspecialn); + agent.acmd("effect_littlemacspecialn", effect_littlemacspecialn); + agent.acmd("effect_littlemacspecialairn", effect_littlemacspecialn); + agent.acmd("sound_littlemacspecialn", sound_littlemacspecialn); + agent.acmd("sound_littlemacspecialairn", sound_littlemacspecialn); + agent.acmd("expression_littlemacspecialn", expression_littlemacspecialn); + agent.acmd("expression_littlemacspecialairn", expression_littlemacspecialn); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/lucas.rs b/fighters/kirby/src/acmd/copy/lucas.rs new file mode 100644 index 0000000000..36460594b7 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/lucas.rs @@ -0,0 +1,166 @@ +use super::*; + +unsafe extern "C" fn game_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_010")); + } +} + +unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { + // INTENTIONALLY LEFT BLANK + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } */ +} + +unsafe extern "C" fn effect_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + for i in 1..=50 { + if is_excute(agent) { + if i%2==0 { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + } + if i%4==0 { + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + } + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn sound_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); + } +} + +unsafe extern "C" fn game_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + } + wait(lua_state, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + AttackModule::clear_all(boma); + } + } else { + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + } + + } +} + +unsafe extern "C" fn effect_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + for _ in 1..=5 { + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + wait(lua_state, 3.0) + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); + } +} + +unsafe extern "C" fn sound_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_attack04")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_lucasspecialnstart", game_lucasspecialnstart); + agent.acmd("game_lucasspecialairnstart", game_lucasspecialnstart); + agent.acmd("sound_lucasspecialnstart", sound_lucasspecialnstart); + agent.acmd("sound_lucasspecialairnstart", sound_lucasspecialnstart); + agent.acmd("game_lucasspecialnhold", game_lucasspecialnhold); + agent.acmd("game_lucasspecialairnhold", game_lucasspecialnhold); + agent.acmd("effect_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("effect_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("game_lucasspecialnfire", game_lucasspecialnfire); + agent.acmd("game_lucasspecialairnfire", game_lucasspecialnfire); + agent.acmd("effect_lucasspecialnfire", effect_lucasspecialnfire); + agent.acmd("effect_lucasspecialairnfire", effect_lucasspecialnfire); + agent.acmd("sound_lucasspecialairnfire", sound_lucasspecialnfire); + agent.acmd("sound_lucasspecialnfire", sound_lucasspecialnfire); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/luigi.rs b/fighters/kirby/src/acmd/copy/luigi.rs new file mode 100644 index 0000000000..1cf5dc713e --- /dev/null +++ b/fighters/kirby/src/acmd/copy/luigi.rs @@ -0,0 +1,152 @@ +use super::*; + +unsafe extern "C" fn game_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); + } +} + +unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); + FLASH(agent, 0, 1, 0, 0.353); + } + frame(lua_state, 19.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 37.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); + } +} + +unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); + } +} + +unsafe extern "C" fn game_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + let mut rand = &Vector3f::new( + app::sv_math::rand(hash40("fighter"), 50) as f32, + app::sv_math::rand(hash40("stage"), 50) as f32, + app::sv_math::rand(hash40("luigi"), 50) as f32 + ); + let mut flip = &Vector3f::new( + if app::sv_math::rand(hash40("fighter"), 1) == 0 { -1 } else { 1 } as f32, + if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, + if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 + ); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + FLASH(agent, 0, 0.25, 1.0, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); + PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); + } +} + +unsafe extern "C" fn expression_luigispecialnthunder(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); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_luigispecialn", game_luigispecialn); + agent.acmd("game_luigispecialairn", game_luigispecialn); + agent.acmd("effect_luigispecialn", effect_luigispecialn); + agent.acmd("effect_luigispecialairn", effect_luigispecialn); + agent.acmd("sound_luigispecialn", sound_luigispecialn); + agent.acmd("sound_luigispecialairn", sound_luigispecialn); + agent.acmd("game_luigispecialnthunder", game_luigispecialnthunder); + agent.acmd("game_luigispecialairnthunder", game_luigispecialnthunder); + agent.acmd( + "effect_luigispecialnthunder", + effect_luigispecialnthunder, + ); + agent.acmd( + "effect_luigispecialairnthunder", + effect_luigispecialnthunder, + ); + agent.acmd("sound_luigispecialnthunder", sound_luigispecialnthunder); + agent.acmd( + "sound_luigispecialairnthunder", + sound_luigispecialnthunder, + ); + agent.acmd( + "expression_luigispecialnthunder", + expression_luigispecialnthunder, + ); + agent.acmd( + "expression_luigispecialairnthunder", + expression_luigispecialnthunder, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/mario.rs b/fighters/kirby/src/acmd/copy/mario.rs new file mode 100644 index 0000000000..d9cd62ce48 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/mario.rs @@ -0,0 +1,196 @@ +use super::*; + +unsafe extern "C" fn game_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); + } + frame(lua_state, 21.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); + frame(lua_state, 49.0); + FT_MOTION_RATE(agent, 1.0); + +} + +unsafe extern "C" fn effect_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 13.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.353); + } + frame(lua_state, 17.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 27.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); + } +} + +unsafe extern "C" fn sound_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + } +} + +unsafe extern "C" fn game_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); + } + } + frame(lua_state, 12.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + EffectModule::enable_sync_init_pos_last(boma); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 18.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.75); + EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + } + frame(lua_state, 24.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); + } +} + +unsafe extern "C" fn sound_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); + } +} + +unsafe extern "C" fn expression_mariospecialnfire(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); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_mariospecialn", game_mariospecialn); + agent.acmd("game_mariospecialairn", game_mariospecialn); + agent.acmd("effect_mariospecialn", effect_mariospecialn); + agent.acmd("effect_mariospecialairn", effect_mariospecialn); + agent.acmd("sound_mariospecialn", sound_mariospecialn); + agent.acmd("sound_mariospecialairn", sound_mariospecialn); + agent.acmd("game_mariospecialnfire", game_mariospecialnfire); + agent.acmd("game_mariospecialairnfire", game_mariospecialnfire); + agent.acmd("effect_mariospecialnfire", effect_mariospecialnfire); + agent.acmd("effect_mariospecialairnfire", effect_mariospecialnfire); + agent.acmd("sound_mariospecialnfire", sound_mariospecialnfire); + agent.acmd("sound_mariospecialairnfire", sound_mariospecialnfire); + agent.acmd( + "expression_mariospecialnfire", + expression_mariospecialnfire, + ); + agent.acmd( + "expression_mariospecialairnfire", + expression_mariospecialnfire, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/mariod.rs b/fighters/kirby/src/acmd/copy/mariod.rs new file mode 100644 index 0000000000..45e27c994a --- /dev/null +++ b/fighters/kirby/src/acmd/copy/mariod.rs @@ -0,0 +1,136 @@ +use super::*; + +unsafe extern "C" fn game_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); + frame(lua_state, 15.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); + } +} + +unsafe extern "C" fn effect_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn sound_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); + } +} + +unsafe extern "C" fn game_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 43.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + FLASH(agent, 0.5, 0.25, 1, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 19.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_frieze_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack03")); + } +} + +unsafe extern "C" fn expression_mariodspecialnchill(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); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_mariodspecialn", game_mariodspecialn); + agent.acmd("game_mariodspecialairn", game_mariodspecialn); + agent.acmd("effect_mariodspecialn", effect_mariodspecialn); + agent.acmd("effect_mariodspecialairn", effect_mariodspecialn); + agent.acmd("sound_mariodspecialn", sound_mariodspecialn); + agent.acmd("sound_mariodspecialairn", sound_mariodspecialn); + agent.acmd("game_mariodspecialnchill", game_mariodspecialnchill); + agent.acmd("game_mariodspecialairnchill", game_mariodspecialnchill); + agent.acmd("effect_mariodspecialnchill", effect_mariodspecialnchill); + agent.acmd( + "effect_mariodspecialairnchill", + effect_mariodspecialnchill, + ); + agent.acmd("sound_mariodspecialnchill", sound_mariodspecialnchill); + agent.acmd("sound_mariodspecialairnchill", sound_mariodspecialnchill); + agent.acmd( + "expression_mariodspecialnchill", + expression_mariodspecialnchill, + ); + agent.acmd( + "expression_mariodspecialairnchill", + expression_mariodspecialnchill, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/miigunner.rs b/fighters/kirby/src/acmd/copy/miigunner.rs new file mode 100644 index 0000000000..f6c0ea5e34 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/miigunner.rs @@ -0,0 +1,90 @@ +use super::*; + +unsafe extern "C" fn effect_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); + } + } + frame(lua_state, 2.6); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); + } + frame(lua_state, 2.8); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + } + } + else { + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_miigunnerspecialn1firemax", + effect_miigunnerspecialn1firemax, + ); + agent.acmd( + "effect_miigunnerspecialairn1firemax", + effect_miigunnerspecialn1firemax, + ); + agent.acmd( + "sound_miigunnerspecialn1firemax", + sound_miigunnerspecialn1firemax, + ); + agent.acmd( + "sound_miigunnerspecialairn1firemax", + sound_miigunnerspecialn1firemax, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/palutena.rs b/fighters/kirby/src/acmd/copy/palutena.rs new file mode 100644 index 0000000000..8a12082b6c --- /dev/null +++ b/fighters/kirby/src/acmd/copy/palutena.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn effect_palutenaspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_palutenaspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 22.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_palutenaspecialn(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); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_palutenaspecialn", effect_palutenaspecialn); + agent.acmd("effect_palutenaspecialairn", effect_palutenaspecialn); + agent.acmd("sound_palutenaspecialn", sound_palutenaspecialn); + agent.acmd("sound_palutenaspecialairn", sound_palutenaspecialn); + agent.acmd("expression_palutenaspecialn", expression_palutenaspecialn); + agent.acmd( + "expression_palutenaspecialairn", + expression_palutenaspecialn, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/richter.rs b/fighters/kirby/src/acmd/copy/richter.rs new file mode 100644 index 0000000000..80cb407d38 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/richter.rs @@ -0,0 +1,98 @@ +use super::*; + +unsafe extern "C" fn effect_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn effect_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_richterspecialn", effect_richterspecialn); + agent.acmd("sound_richterspecialn", sound_richterspecialn); + agent.acmd("expression_richterspecialn", expression_richterspecialn); + agent.acmd("effect_richterspecialairn", effect_richterspecialairn); + agent.acmd("sound_richterspecialairn", sound_richterspecialairn); + agent.acmd("expression_richterspecialairn", expression_richterspecialairn); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/ridley.rs b/fighters/kirby/src/acmd/copy/ridley.rs new file mode 100644 index 0000000000..171ab6e37f --- /dev/null +++ b/fighters/kirby/src/acmd/copy/ridley.rs @@ -0,0 +1,167 @@ +use super::*; + +unsafe extern "C" fn game_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + } + frame(lua_state, 18.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + } + frame(lua_state, 34.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn sound_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } + frame(lua_state, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); + } +} + +unsafe extern "C" fn expression_ridleyspecialnexplode(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); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + } +} + +unsafe extern "C" fn game_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + } + frame(lua_state, 18.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + } + frame(lua_state, 34.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn sound_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } + frame(lua_state, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); + } +} + +unsafe extern "C" fn expression_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ridleyspecialnexplode", game_ridleyspecialnexplode); + agent.acmd( + "effect_ridleyspecialnexplode", + effect_ridleyspecialnexplode, + ); + agent.acmd( + "sound_ridleyspecialnexplode", + sound_ridleyspecialnexplode, + ); + agent.acmd( + "expression_ridleyspecialnexplode", + expression_ridleyspecialnexplode, + ); + agent.acmd( + "game_ridleyspecialairnexplode", + game_ridleyspecialairnexplode, + ); + agent.acmd( + "effect_ridleyspecialairnexplode", + effect_ridleyspecialairnexplode, + ); + agent.acmd( + "sound_ridleyspecialairnexplode", + sound_ridleyspecialairnexplode, + ); + agent.acmd( + "expression_ridleyspecialairnexplode", + expression_ridleyspecialairnexplode, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/roy.rs b/fighters/kirby/src/acmd/copy/roy.rs new file mode 100644 index 0000000000..ec0bc3e74e --- /dev/null +++ b/fighters/kirby/src/acmd/copy/roy.rs @@ -0,0 +1,60 @@ +use super::*; + +unsafe extern "C" fn effect_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); + + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + //AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 26.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } +} + +unsafe extern "C" fn sound_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_roy_02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_royspecialnend", sound_royspecialnend); + agent.acmd("sound_royspecialairnend", sound_royspecialnend); + agent.acmd("effect_royspecialnend", effect_royspecialnend); + agent.acmd("effect_royspecialairnend", effect_royspecialnend); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/shizue.rs b/fighters/kirby/src/acmd/copy/shizue.rs new file mode 100644 index 0000000000..88020428ba --- /dev/null +++ b/fighters/kirby/src/acmd/copy/shizue.rs @@ -0,0 +1,42 @@ +use super::*; + +unsafe extern "C" fn effect_shizuespecialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn expression_shizuespecialnfailure(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); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 1.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_shizuespecialnfailure", + effect_shizuespecialnfailure, + ); + agent.acmd( + "effect_shizuespecialairnfailure", + effect_shizuespecialnfailure, + ); + agent.acmd( + "expression_shizuespecialnfailure", + expression_shizuespecialnfailure, + ); + agent.acmd( + "expression_shizuespecialairnfailure", + expression_shizuespecialnfailure, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/sonic.rs b/fighters/kirby/src/acmd/copy/sonic.rs new file mode 100644 index 0000000000..2c8a0ad8a5 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/sonic.rs @@ -0,0 +1,37 @@ +use super::*; + +unsafe extern "C" fn game_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; + KineticModule::add_speed(boma, &temp); + } + FT_MOTION_RATE(agent, 0.5); + +} + +unsafe extern "C" fn effect_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn sound_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("vc_kirby_copy_sonic_01")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_appeal01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_sonicspecialnhit", game_sonicspecialnhit); + agent.acmd("effect_sonicspecialnhit", effect_sonicspecialnhit); + agent.acmd("sound_sonicspecialnhit", sound_sonicspecialnhit); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copyspecials.rs b/fighters/kirby/src/acmd/copyspecials.rs deleted file mode 100644 index f4a97f1195..0000000000 --- a/fighters/kirby/src/acmd/copyspecials.rs +++ /dev/null @@ -1,1922 +0,0 @@ -use super::*; - -unsafe extern "C" fn diddy_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(fighter, 8.0/(31.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn diddy_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn diddy_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn diddy_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn diddy_special_air_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(fighter, 8.0/(35.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn diddy_special_air_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn diddy_special_air_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn diddy_special_air_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn edge_special_n_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 79.0, 51.0); - if is_excute(fighter) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 79.0); - FT_MOTION_RATE(fighter, 1.2); - frame(lua_state, 99.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 100.0); - if is_excute(fighter) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 105.0); - FT_MOTION_RATE(fighter, 1.6); - frame(lua_state, 115.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 120.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); - } - frame(lua_state, 140.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } -} - -unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 13.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); - } - frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 5.0); - frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } - -} - -unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 13.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); - } - frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 0.4); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } - frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn ganon_float_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn ganon_float_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 6.0); - for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } -} - -unsafe extern "C" fn ganon_float_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn ganon_float_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_jump01")); - } -} - -unsafe extern "C" fn ganon_float_air_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0 / 10.0); - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn ganon_float_air_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - frame(lua_state, 2.0); - for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } -} - -unsafe extern "C" fn ganon_float_air_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn ganon_float_air_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); - } -} - -unsafe extern "C" fn ganon_float_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } -} - -unsafe extern "C" fn ganon_float_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } - frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_final_hand_triforce"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_entry_aura"), false, false); - } -} - -unsafe extern "C" fn ganon_float_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn koopa_special_n_start_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); - } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); - } - wait(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -unsafe extern "C" fn koopa_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); - } - wait(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_copy_koopa_01")); - } -} - -unsafe extern "C" fn koopa_special_n_end_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - FT_MOTION_RATE_RANGE(fighter,1.0,31.0,16.0); -} - -unsafe extern "C" fn koopa_special_n_max_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); - } -} - -unsafe extern "C" fn koopa_special_n_max_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter,1.5); - - if fighter.is_motion(Hash40::new("koopa_special_n_max")){ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); - } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); - } - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("sys_explosion_sign"),false,false); - } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("koopa_breath_m_fire"),false,false); - - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 42.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter,2.0,0.5,0); - } -} - -unsafe extern "C" fn koopa_special_n_max_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); - } - wait(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - if fighter.is_motion(Hash40::new("koopa_special_n_max")){ - PLAY_SE_REMAIN(fighter, Hash40::new("se_koopa_step_left_m")); - } - } - frame(fighter.lua_state_agent, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_m_damage")); - } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); - } -} - -unsafe extern "C" fn koopa_special_n_max_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(fighter.lua_state_agent, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn koopajr_special_n_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { - EFFECT(fighter, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - else { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } -} - -unsafe extern "C" fn krool_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 30.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 31.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT(fighter, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn krool_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n08")); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n07")); - } - else if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n01")); - } - } - frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n09")); - } -} - -unsafe extern "C" fn krool_special_n_fire_expression(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); - ItemModule::set_have_item_visibility(boma, false, 0); - VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); - } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - } - frame(lua_state, 31.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 76.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); - } - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 89.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, true, 0); - } -} - -unsafe extern "C" fn krool_special_n_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); - } - else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 2.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.9); - } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); - } - } - wait(lua_state, 10.0); -} - -unsafe extern "C" fn littlemac_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - let damage = 22.0 * if fighter.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; - let angle = if fighter.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; - let bkb = if fighter.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; - let shield_damage = if fighter.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_damage_shake_scale(boma, 0.67); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 39.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::kirby::status::KO_PUNCH_GRAVITY); - } - -} - -unsafe extern "C" fn littlemac_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let size = 1.0; - EFFECT_FLW_POS(fighter, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("littlemac_ko_uppercut_start"), -1); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); - } - else { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); - } - } - frame(lua_state, 8.0); - let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(45.0, 135.0, 45.0), 0.3, false, 0, 0, 0, 0, 0, false, false); - if is_excute(fighter) { - EffectModule::set_rate(boma, handle as u32, 1.5); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); - let facing = PostureModule::lr(boma); - EffectModule::set_rot(boma, handle as u32, &Vector3f::new(45.0 * facing, 135.0, 45.0 * facing)); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_ko_uppercut"), false, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); - } - -} - -unsafe extern "C" fn littlemac_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_special_n03")); - PLAY_SE(fighter, Hash40::new("vc_kirby_hammermax")); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_ll")); - } - -} - -unsafe extern "C" fn littlemac_special_n_expression(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); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_elecattack"), 0); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - -} - -// SPECIAL N START // - -unsafe extern "C" fn lucas_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucas_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_010")); - } - -} - -// SPECIAL N HOLD // - -unsafe extern "C" fn lucas_special_n_hold_game(fighter: &mut L2CAgentBase) { - // INTENTIONALLY LEFT BLANK - /* if fighter.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } */ -} - -unsafe extern "C" fn lucas_special_n_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(fighter, 0.01, 0.5, 1, 0.4); - } - for i in 1..=50 { - if is_excute(fighter) { - if i%2==0 { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); - } - if i%4==0 { - EFFECT_FLW_POS(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); - } - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn lucas_special_n_hold_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_lucas_pk_charge")); - } -} - -// SPECIAL N FIRE // - -unsafe extern "C" fn lucas_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { - frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - AttackModule::clear_all(boma); - } - } else { - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - } - - } -} - -unsafe extern "C" fn lucas_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - for _ in 1..=5 { - if is_excute(fighter) { - FLASH(fighter, 0.01, 0.5, 1, 0.4); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - wait(lua_state, 3.0) - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); - } -} - -unsafe extern "C" fn lucas_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_attack04")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); - } -} - -unsafe extern "C" fn luigi_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); - } - -} - -unsafe extern "C" fn luigi_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); - FLASH(fighter, 0, 1, 0, 0.353); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("luigi_fb_shoot"), false, false); - } - -} - -unsafe extern "C" fn luigi_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_special_n01")); - } - -} - -unsafe extern "C" fn luigi_special_n_thunder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - let mut rand = &Vector3f::new( - app::sv_math::rand(hash40("fighter"), 50) as f32, - app::sv_math::rand(hash40("stage"), 50) as f32, - app::sv_math::rand(hash40("luigi"), 50) as f32 - ); - let mut flip = &Vector3f::new( - if app::sv_math::rand(hash40("fighter"), 1) == 0 { -1 } else { 1 } as f32, - if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, - if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 - ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.25, 1.0, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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); - } - } - frame(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -unsafe extern "C" fn luigi_special_n_thunder_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack02")); - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_l")); - } -} - -unsafe extern "C" fn luigi_special_n_thunder_expression(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); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn mario_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 14.0, 8.0); - frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); - } - frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 49.0, 23.0); - frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn mario_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 13.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); - } - else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); - } - } - frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.353); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); - } - -} - -unsafe extern "C" fn mario_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); - } -} - -unsafe extern "C" fn mario_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 7.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - KineticModule::add_speed(fighter.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn mario_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); - } - else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); - } - } - frame(lua_state, 12.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - } - } - frame(lua_state, 14.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EffectModule::enable_sync_init_pos_last(boma); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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); - } - } - frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.75); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_bomb_a"), false, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_flame"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); - } -} - -unsafe extern "C" fn mario_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack02")); - } -} - -unsafe extern "C" fn mario_special_n_fire_expression(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); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn mariod_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 15.0, 8.0); - frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); - } -} - -unsafe extern "C" fn mariod_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn mariod_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mariod_special_n01")); - } -} - -unsafe extern "C" fn mariod_special_n_chill_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 43.0, 36.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn mariod_special_n_chill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.25, 1, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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); - } - } - frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -unsafe extern "C" fn mariod_special_n_chill_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_frieze_l")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack03")); - } -} - -unsafe extern "C" fn mariod_special_n_chill_expression(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); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn miigunner_special_n1_fire_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 3.0); - } - } - frame(lua_state, 2.6); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_sb_tama"), -1); - } - frame(lua_state, 2.8); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.85); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); - } - } - else { - EFFECT(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } - -} - -unsafe extern "C" fn miigunner_special_n1_fire_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("se_miigunner_final01")); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(fighter, Hash40::new("se_miigunner_final01")); - PLAY_SE(fighter, Hash40::new("se_miigunner_final04")); - } - } - -} - -unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 22.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn palutena_special_n_expression(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); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 5.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn richter_special_n_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); - LAST_EFFECT_SET_RATE(agent, 0.6); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); - } -} - -unsafe extern "C" fn richter_special_n_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_richter_special_l01")); - PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); - } -} - -unsafe extern "C" fn richter_special_n_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn richter_special_air_n_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); - } - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); - LAST_EFFECT_SET_RATE(agent, 0.6); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); - } -} - -unsafe extern "C" fn richter_special_air_n_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_richter_special_l01")); - PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); - } -} - -unsafe extern "C" fn richter_special_air_n_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn ridley_special_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ridley_special_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn ridley_special_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn ridley_special_n_explode_expression(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); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); - } -} - -unsafe extern "C" fn roy_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); - - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.25); - //AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn roy_special_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_kirby_copy_roy_02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); - } -} - -unsafe extern "C" fn shizue_special_n_failure_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn shizue_special_n_failure_expression(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); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - } -} - -unsafe extern "C" fn sonic_special_n_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; - KineticModule::add_speed(boma, &temp); - } - FT_MOTION_RATE(fighter, 0.5); - -} - -unsafe extern "C" fn sonic_special_n_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sonic_special_n_hit_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("vc_kirby_copy_sonic_01")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_appeal01")); - } -} - -pub fn install() { - smashline::Agent::new("roy") - .acmd("sound_royspecialnend", roy_special_n_end_sound) - .acmd("sound_royspecialairnend", roy_special_n_end_sound) - .install(); - smashline::Agent::new("kirby") - .acmd("game_diddyspecialncancel", diddy_special_n_cancel_game) - .acmd("effect_diddyspecialncancel", diddy_special_n_cancel_effect) - .acmd("sound_diddyspecialncancel", diddy_special_n_cancel_sound) - .acmd( - "expression_diddyspecialncancel", - diddy_special_n_cancel_expression, - ) - .acmd( - "game_diddyspecialairncancel", - diddy_special_air_n_cancel_game, - ) - .acmd( - "effect_diddyspecialairncancel", - diddy_special_air_n_cancel_effect, - ) - .acmd( - "sound_diddyspecialairncancel", - diddy_special_air_n_cancel_sound, - ) - .acmd( - "expression_diddyspecialairncancel", - diddy_special_air_n_cancel_expression, - ) - .acmd("game_edgespecialnstart", edge_special_n_start) - .acmd("game_edgespecialairnstart", edge_special_n_start) - .acmd("game_edgespecialn1", edge_special_n1_game) - .acmd("game_edgespecialairn1", edge_special_n1_game) - .acmd("game_edgespecialn2", edge_special_n2_game) - .acmd("game_edgespecialairn2", edge_special_n2_game) - .acmd("game_ganonfloatstart", ganon_float_start_game) - .acmd("effect_ganonfloatstart", ganon_float_start_effect) - .acmd("expression_ganonfloatstart", ganon_float_start_expression) - .acmd("sound_ganonfloatstart", ganon_float_start_sound) - .acmd("game_ganonfloatairstart", ganon_float_air_start_game) - .acmd("effect_ganonfloatairstart", ganon_float_air_start_effect) - .acmd( - "expression_ganonfloatairstart", - ganon_float_air_start_expression, - ) - .acmd("sound_ganonfloatairstart", ganon_float_air_start_sound) - .acmd("game_ganonfloat", ganon_float_game) - .acmd("effect_ganonfloat", ganon_float_effect) - .acmd("expression_ganonfloat", ganon_float_expression) - .acmd("effect_koopaspecialnstart", koopa_special_n_start_effect) - .acmd("effect_koopaspecialairnstart", koopa_special_n_start_effect) - .acmd("sound_koopaspecialnstart", koopa_special_n_start_sound) - .acmd("game_koopaspecialnend", koopa_special_n_end_game) - .acmd("game_koopaspecialairnend", koopa_special_n_end_game) - .acmd("game_koopaspecialnmax", koopa_special_n_max_game) - .acmd("game_koopaspecialairnmax", koopa_special_n_max_game) - .acmd("effect_koopaspecialnmax", koopa_special_n_max_effect) - .acmd("effect_koopaspecialairnmax", koopa_special_n_max_effect) - .acmd("sound_koopaspecialnmax", koopa_special_n_max_sound) - .acmd("sound_koopaspecialairnmax", koopa_special_n_max_sound) - .acmd( - "expression_koopaspecialnmax", - koopa_special_n_max_expression, - ) - .acmd( - "expression_koopaspecialairnmax", - koopa_special_n_max_expression, - ) - .acmd( - "effect_koopajrspecialnshoot", - koopajr_special_n_shoot_effect, - ) - .acmd("effect_kroolspecialnfire", krool_special_n_fire_effect) - .acmd("effect_kroolspecialairnfire", krool_special_n_fire_effect) - .acmd("sound_kroolspecialnfire", krool_special_n_fire_sound) - .acmd("sound_kroolspecialairnfire", krool_special_n_fire_sound) - .acmd( - "expression_kroolspecialnfire", - krool_special_n_fire_expression, - ) - .acmd( - "expression_kroolspecialairnfire", - krool_special_n_fire_expression, - ) - .acmd("effect_kroolspecialnloop", krool_special_n_loop_effect) - .acmd("effect_kroolspecialairnloop", krool_special_n_loop_effect) - .acmd("game_littlemacspecialn", littlemac_special_n_game) - .acmd("game_littlemacspecialairn", littlemac_special_n_game) - .acmd("effect_littlemacspecialn", littlemac_special_n_effect) - .acmd("effect_littlemacspecialairn", littlemac_special_n_effect) - .acmd("sound_littlemacspecialn", littlemac_special_n_sound) - .acmd("sound_littlemacspecialairn", littlemac_special_n_sound) - .acmd("expression_littlemacspecialn", littlemac_special_n_expression) - .acmd("expression_littlemacspecialairn", littlemac_special_n_expression) - .acmd("game_lucasspecialnstart", lucas_special_n_start_game) - .acmd("game_lucasspecialairnstart", lucas_special_n_start_game) - .acmd("sound_lucasspecialnstart", lucas_special_n_start_sound) - .acmd("sound_lucasspecialairnstart", lucas_special_n_start_sound) - .acmd("game_lucasspecialnhold", lucas_special_n_hold_game) - .acmd("game_lucasspecialairnhold", lucas_special_n_hold_game) - .acmd("effect_lucasspecialnhold", lucas_special_n_hold_effect) - .acmd("effect_lucasspecialairnhold", lucas_special_n_hold_effect) - .acmd("sound_lucasspecialairnhold", lucas_special_n_hold_sound) - .acmd("sound_lucasspecialnhold", lucas_special_n_hold_sound) - .acmd("game_lucasspecialnfire", lucas_special_n_fire_game) - .acmd("game_lucasspecialairnfire", lucas_special_n_fire_game) - .acmd("effect_lucasspecialnfire", lucas_special_n_fire_effect) - .acmd("effect_lucasspecialairnfire", lucas_special_n_fire_effect) - .acmd("sound_lucasspecialairnfire", lucas_special_n_fire_sound) - .acmd("sound_lucasspecialnfire", lucas_special_n_fire_sound) - .acmd("game_luigispecialn", luigi_special_n_game) - .acmd("game_luigispecialairn", luigi_special_n_game) - .acmd("effect_luigispecialn", luigi_special_n_effect) - .acmd("effect_luigispecialairn", luigi_special_n_effect) - .acmd("sound_luigispecialn", luigi_special_n_sound) - .acmd("sound_luigispecialairn", luigi_special_n_sound) - .acmd("game_luigispecialnthunder", luigi_special_n_thunder_game) - .acmd("game_luigispecialairnthunder", luigi_special_n_thunder_game) - .acmd( - "effect_luigispecialnthunder", - luigi_special_n_thunder_effect, - ) - .acmd( - "effect_luigispecialairnthunder", - luigi_special_n_thunder_effect, - ) - .acmd("sound_luigispecialnthunder", luigi_special_n_thunder_sound) - .acmd( - "sound_luigispecialairnthunder", - luigi_special_n_thunder_sound, - ) - .acmd( - "expression_luigispecialnthunder", - luigi_special_n_thunder_expression, - ) - .acmd( - "expression_luigispecialairnthunder", - luigi_special_n_thunder_expression, - ) - .acmd("game_mariospecialn", mario_special_n_game) - .acmd("game_mariospecialairn", mario_special_n_game) - .acmd("effect_mariospecialn", mario_special_n_effect) - .acmd("effect_mariospecialairn", mario_special_n_effect) - .acmd("sound_mariospecialn", mario_special_n_sound) - .acmd("sound_mariospecialairn", mario_special_n_sound) - .acmd("game_mariospecialnfire", mario_special_n_fire_game) - .acmd("game_mariospecialairnfire", mario_special_n_fire_game) - .acmd("effect_mariospecialnfire", mario_special_n_fire_effect) - .acmd("effect_mariospecialairnfire", mario_special_n_fire_effect) - .acmd("sound_mariospecialnfire", mario_special_n_fire_sound) - .acmd("sound_mariospecialairnfire", mario_special_n_fire_sound) - .acmd( - "expression_mariospecialnfire", - mario_special_n_fire_expression, - ) - .acmd( - "expression_mariospecialairnfire", - mario_special_n_fire_expression, - ) - .acmd("game_mariodspecialn", mariod_special_n_game) - .acmd("game_mariodspecialairn", mariod_special_n_game) - .acmd("effect_mariospecialn", mariod_special_n_effect) - .acmd("effect_mariospecialairn", mariod_special_n_effect) - .acmd("sound_mariodspecialn", mariod_special_n_sound) - .acmd("sound_mariodspecialairn", mariod_special_n_sound) - .acmd("game_mariodspecialnchill", mariod_special_n_chill_game) - .acmd("game_mariodspecialairnchill", mariod_special_n_chill_game) - .acmd("effect_mariodspecialnchill", mariod_special_n_chill_effect) - .acmd( - "effect_mariodspecialairnchill", - mariod_special_n_chill_effect, - ) - .acmd("sound_mariodspecialnchill", mariod_special_n_chill_sound) - .acmd("sound_mariodspecialairnchill", mariod_special_n_chill_sound) - .acmd( - "expression_mariodspecialnchill", - mariod_special_n_chill_expression, - ) - .acmd( - "expression_mariodspecialairnchill", - mariod_special_n_chill_expression, - ) - .acmd( - "effect_miigunnerspecialn1firemax", - miigunner_special_n1_fire_max_effect, - ) - .acmd( - "effect_miigunnerspecialairn1firemax", - miigunner_special_n1_fire_max_effect, - ) - .acmd( - "sound_miigunnerspecialn1firemax", - miigunner_special_n1_fire_max_sound, - ) - .acmd( - "sound_miigunnerspecialairn1firemax", - miigunner_special_n1_fire_max_sound, - ) - .acmd("effect_palutenaspecialn", palutena_special_n_effect) - .acmd("effect_palutenaspecialairn", palutena_special_n_effect) - .acmd("sound_palutenaspecialn", palutena_special_n_sound) - .acmd("sound_palutenaspecialairn", palutena_special_n_sound) - .acmd("expression_palutenaspecialn", palutena_special_n_expression) - .acmd( - "expression_palutenaspecialairn", - palutena_special_n_expression, - ) - .acmd("effect_richterspecialn", richter_special_n_effect) - .acmd("sound_richterspecialn", richter_special_n_sound) - .acmd("expression_richterspecialn", richter_special_n_expression) - .acmd("effect_richterspecialairn", richter_special_air_n_effect) - .acmd("sound_richterspecialairn", richter_special_air_n_sound) - .acmd("expression_richterspecialairn", richter_special_air_n_expression) - .acmd("game_ridleyspecialnexplode", ridley_special_n_explode_game) - .acmd( - "effect_ridleyspecialnexplode", - ridley_special_n_explode_effect, - ) - .acmd( - "sound_ridleyspecialnexplode", - ridley_special_n_explode_sound, - ) - .acmd( - "expression_ridleyspecialnexplode", - ridley_special_n_explode_expression, - ) - .acmd( - "game_ridleyspecialairnexplode", - ridley_special_air_n_explode_game, - ) - .acmd( - "effect_ridleyspecialairnexplode", - ridley_special_air_n_explode_effect, - ) - .acmd( - "sound_ridleyspecialairnexplode", - ridley_special_air_n_explode_sound, - ) - .acmd( - "expression_ridleyspecialairnexplode", - ridley_special_air_n_explode_expression, - ) - .acmd("effect_royspecialnend", roy_special_n_end_effect) - .acmd("effect_royspecialairnend", roy_special_n_end_effect) - .acmd( - "effect_shizuespecialnfailure", - shizue_special_n_failure_effect, - ) - .acmd( - "effect_shizuespecialairnfailure", - shizue_special_n_failure_effect, - ) - .acmd( - "expression_shizuespecialnfailure", - shizue_special_n_failure_expression, - ) - .acmd( - "expression_shizuespecialairnfailure", - shizue_special_n_failure_expression, - ) - .acmd("game_sonicspecialnhit", sonic_special_n_hit_game) - .acmd("effect_sonicspecialnhit", sonic_special_n_hit_effect) - .acmd("sound_sonicspecialnhit", sonic_special_n_hit_sound) - .install(); -} diff --git a/fighters/kirby/src/acmd/ground.rs b/fighters/kirby/src/acmd/ground.rs index 59f2cd39f5..381eb86ec0 100644 --- a/fighters/kirby/src/acmd/ground.rs +++ b/fighters/kirby/src/acmd/ground.rs @@ -1,140 +1,137 @@ use super::*; -unsafe extern "C" fn kirby_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 10.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 5.5, 13.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 10.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 5.5, 13.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn kirby_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.0, 0.0, 5.2, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.5, 0.0, 5.2, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 3.3, 7.5, Some(0.0), Some(3.3), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.0, 0.0, 5.2, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.5, 0.0, 5.2, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 3.3, 7.5, Some(0.0), Some(3.3), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn kirby_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 4.0); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 66, 0, 77, 5.0, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 66, 0, 77, 5.0, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); - FT_MOTION_RATE_RANGE(fighter, 14.0, 31.0, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 70, 50, 0, 80, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); + FT_MOTION_RATE_RANGE(agent, 14.0, 31.0, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 70, 50, 0, 80, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - FT_MOTION_RATE_RANGE(fighter, 31.0, 65.0, 22.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + FT_MOTION_RATE_RANGE(agent, 31.0, 65.0, 22.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 65.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kirby_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("kirby_dash"), Hash40::new("top"), 0, 6, 5, -90, 0, 160, 0.7, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("kirby_dash"), Hash40::new("top"), 0, 6, 5, -90, 0, 160, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 2, 0.059, 0.008, 0); - BURN_COLOR_FRAME(fighter, 4, 2, 0.059, 0.008, 0.9); + if is_excute(agent) { + BURN_COLOR(agent, 2, 0.059, 0.008, 0); + BURN_COLOR_FRAME(agent, 4, 2, 0.059, 0.008, 0.9); } frame(lua_state, 30.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 2, 0.059, 0.008, 0.9); - BURN_COLOR_FRAME(fighter, 12, 2, 0.059, 0.008, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("kirby_dash"), false, true); + if is_excute(agent) { + BURN_COLOR(agent, 2, 0.059, 0.008, 0.9); + BURN_COLOR_FRAME(agent, 12, 2, 0.059, 0.008, 0); + EFFECT_OFF_KIND(agent, Hash40::new("kirby_dash"), false, true); } frame(lua_state, 42.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 44.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn kirby_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_kirby_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_kirby_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_kirby_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_kirby_attackdash")); } frame(lua_state, 44.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - PLAY_LANDING_SE(fighter, Hash40::new("se_kirby_landing02")); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + PLAY_LANDING_SE(agent, Hash40::new("se_kirby_landing02")); } } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attack11", kirby_attack_11_game) - .acmd("game_attack12", kirby_attack_12_game) - .acmd("game_attackdash", kirby_attack_dash_game) - .acmd("effect_attackdash", kirby_attack_dash_effect) - .acmd("sound_attackdash", kirby_attack_dash_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/kirby/src/acmd/mod.rs b/fighters/kirby/src/acmd/mod.rs index 3a6a536578..9f8d2915e0 100644 --- a/fighters/kirby/src/acmd/mod.rs +++ b/fighters/kirby/src/acmd/mod.rs @@ -1,20 +1,23 @@ use super::*; -mod aerials; -mod copyspecials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; + +mod copy; + +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); -pub fn install() { - aerials::install(); - copyspecials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} + copy::install(agent); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 41b61a02f1..8cd65ba0ed 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -1,211 +1,135 @@ - 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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_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(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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_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_kirby_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_kirby_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, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_kirby_step_left_m"), Hash40::new("se_kirby_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_kirby_step_left_m"), Hash40::new("se_kirby_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_kirby_step_right_m"), Hash40::new("se_kirby_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_kirby_step_right_m"), Hash40::new("se_kirby_step_left_m")); } } -unsafe extern "C" fn kirby_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); } } -unsafe extern "C" fn game_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); +unsafe extern "C" fn game_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); } } -unsafe extern "C" fn landingheavy_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("kirby_star"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("kirby_star"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("kirby") - .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", kirby_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_landingheavy", game_landingheavy) - .acmd("effect_landingheavy", landingheavy_effect) - .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("game_landingheavy", game_landingheavy); + agent.acmd("effect_landingheavy", effect_landingheavy); } diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index 40816ea2c8..9e9648fe9a 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -1,455 +1,449 @@ use super::*; -unsafe extern "C" fn kirby_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kirby_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kirby_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } - } -unsafe extern "C" fn kirby_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); } frame(lua_state, 8.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_s01")); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } } -unsafe extern "C" fn kirby_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 18.0, 75, 104, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 18.0, 75, 104, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 17.0, 75, 104, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 18.0, 75, 104, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 18.0, 75, 104, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 17.0, 75, 104, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 84, 101, 0, 26, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 16.0, 84, 101, 0, 26, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 15.0, 84, 101, 0, 26, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 84, 101, 0, 26, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 16.0, 84, 101, 0, 26, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 15.0, 84, 101, 0, 26, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 40, 78, 0, 21, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 15.0, 40, 78, 0, 21, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 14.0, 40, 78, 0, 21, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 40, 78, 0, 21, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 15.0, 40, 78, 0, 21, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 14.0, 40, 78, 0, 21, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } } else { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 75, 107, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 15.0, 75, 107, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 14.0, 75, 107, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 75, 107, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 15.0, 75, 107, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 14.0, 75, 107, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 88, 102, 0, 20, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 88, 102, 0, 20, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 13.0, 88, 102, 0, 20, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 88, 102, 0, 20, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 88, 102, 0, 20, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 13.0, 88, 102, 0, 20, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 50, 52, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 13.0, 50, 52, 0, 10, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 50, 52, 0, 10, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 50, 52, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 13.0, 50, 52, 0, 10, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 50, 52, 0, 10, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } } - } -unsafe extern "C" fn kirby_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); } frame(lua_state, 10.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack06")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_h01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } } -unsafe extern "C" fn kirby_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 70, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 70, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); - ATK_POWER(fighter, 0, 13); - ATK_POWER(fighter, 1, 13); - ATK_POWER(fighter, 3, 14); - ATK_POWER(fighter, 4, 14); + if is_excute(agent) { + HIT_RESET_ALL(agent); + ATK_POWER(agent, 0, 13); + ATK_POWER(agent, 1, 13); + ATK_POWER(agent, 3, 14); + ATK_POWER(agent, 4, 14); } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 40, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 40, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); - ATK_POWER(fighter, 0, 10); - ATK_POWER(fighter, 1, 10); - ATK_POWER(fighter, 3, 10); - ATK_POWER(fighter, 4, 10); + if is_excute(agent) { + HIT_RESET_ALL(agent); + ATK_POWER(agent, 0, 10); + ATK_POWER(agent, 1, 10); + ATK_POWER(agent, 3, 10); + ATK_POWER(agent, 4, 10); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } +} +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack07")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_l01")); + } + wait(lua_state, 40.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); + } } -unsafe extern "C" fn kirby_attack_lw4_expression(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_TOP); +unsafe extern "C" fn expression_attacklw4(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_TOP); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 38.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn kirby_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); - } - } - wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_l01")); - } - wait(lua_state, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); - } +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("sound_attacks4hi", sound_attacks4); + agent.acmd("sound_attacks4lw", sound_attacks4); -} + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attacks4hi", kirby_attack_s4_hi_game) - .acmd("game_attacks4", kirby_attack_s4_game) - .acmd("game_attacks4lw", kirby_attack_s4_lw_game) - .acmd("sound_attacks4hi", kirby_attack_s4_sound) - .acmd("sound_attacks4", kirby_attack_s4_sound) - .acmd("sound_attacks4lw", kirby_attack_s4_sound) - .acmd("game_attackhi4", kirby_attack_hi4_game) - .acmd("sound_attackhi4", kirby_attack_hi4_sound) - .acmd("game_attacklw4", kirby_attack_lw4_game) - .acmd("expression_attacklw4", kirby_attack_lw4_expression) - .acmd("sound_attacklw4", kirby_attack_lw4_sound) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index 6e77886a65..7c2ac3763a 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -1,623 +1,616 @@ use super::*; -unsafe extern "C" fn kirby_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 6.0, 5.0, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 6.0, 5.0, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn kirby_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_INHALE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 160, 100, 30, 0, 8.5, 0.0, 7.0, 15.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 160, 100, 25, 0, 7.8, 0.0, 7.0, 9.7, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - CATCH(fighter, 0, Hash40::new("top"), 5.3, 0.0, 6.4, 10.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 1, Hash40::new("top"), 5.8, 0.0, 6.4, 6.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 160, 100, 30, 0, 8.5, 0.0, 7.0, 15.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 160, 100, 25, 0, 7.8, 0.0, 7.0, 9.7, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + CATCH(agent, 0, Hash40::new("top"), 5.3, 0.0, 6.4, 10.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 1, Hash40::new("top"), 5.8, 0.0, 6.4, 6.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn kirby_special_n_eat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialneat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 52.0, 24.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 52.0, 24.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_REMOVE); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_USE); } } -unsafe extern "C" fn kirby_special_n_drink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 0, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialndrink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 0, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_SPIT); } } -unsafe extern "C" fn kirby_special_n_large_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnlarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 86.0, 54.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 86.0, 54.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_REMOVE); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_USE); } } -unsafe extern "C" fn kirby_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 15.0, 6.0); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 15.0, 6.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, false, -1); } } -unsafe extern "C" fn kirby_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_ss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_s_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 5.8, 0.0, 4.2, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 3.9, 0.0, 4.2, 5.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 5.8, 0.0, 4.2, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 3.9, 0.0, 4.2, 5.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 18.0, 11.0); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 18.0, 11.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, false, -1); } - } -unsafe extern "C" fn kirby_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn kirby_special_air_ss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn kirby_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi2"), false, -1.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 100, 117, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 93, 100, 117, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 100, 102, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 93, 100, 102, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 100, 117, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 93, 100, 117, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 100, 102, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 93, 100, 102, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 100, 60, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 93, 100, 60, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 100, 50, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 93, 100, 50, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 100, 60, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 93, 100, 60, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 100, 50, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 93, 100, 50, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 275, 102, 0, 40, 6.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 275, 102, 0, 40, 6.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 361, 180, 0, 30, 5.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 361, 180, 0, 30, 5.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn kirby_special_air_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 3, 0.25, Hash40::new("haver"), 0, 20, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); - EFFECT_FOLLOW(fighter, Hash40::new("kirby_fcut_rise"), Hash40::new("haver"), 0, 3, 0.3, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 3, 0.25, Hash40::new("haver"), 0, 20, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + EFFECT_FOLLOW(agent, Hash40::new("kirby_fcut_rise"), Hash40::new("haver"), 0, 3, 0.3, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2.5, 0.5, Hash40::new("haver"), 0, 16, 0.3, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2.5, 0.5, Hash40::new("haver"), 0, 16, 0.3, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn kirby_special_hi_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 23.0, 7.0); // startup - if is_excute(fighter) { +unsafe extern "C" fn game_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 23.0, 7.0); // startup + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi1"), false, -1.0); } frame(lua_state, 22.0); // rush - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 7.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 7.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - FT_MOTION_RATE_RANGE(fighter, 42.0, 74.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 42.0, 74.0, 15.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_hi_h_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 1, 6, 85, 120, -90, 1, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 1, 6, 85, 120, -90, 1, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 23.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 4, 6, -65, -100, -90, 1, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 4, 6, -65, -100, -90, 1, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 35.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 44.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn kirby_special_hi_h_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - 0 => PLAY_SE(fighter, Hash40::new("vc_kirby_002")), - 1 => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), - _ => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), + 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), + 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), + _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), }; } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h04")); } } -unsafe extern "C" fn kirby_special_hi_h_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kirby_special_air_hi_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 18.0, 6.0); // startup - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 18.0, 6.0); // startup + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi1"), false, -1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); // rush - FT_MOTION_RATE_RANGE(fighter, 18.0, 29.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 29.0, 7.0); frame(lua_state, 29.0); // flip - FT_MOTION_RATE_RANGE(fighter, 29.0, 48.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 29.0, 48.0, 12.0); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 52.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if is_excute(agent) { + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(fighter.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI); + VarModule::on_flag(agent.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI); StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } } frame(lua_state, 56.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 60.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + if is_excute(agent) { + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn kirby_special_air_hi_h_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 2, 0, 0, 90, -90, 1, false, *EF_FLIP_XY); - LAST_EFFECT_SET_SCALE_W(fighter, 0.65, 1.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 2, 0, 0, 90, -90, 1, false, *EF_FLIP_XY); + LAST_EFFECT_SET_SCALE_W(agent, 0.65, 1.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 18.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 44.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); } - } -unsafe extern "C" fn kirby_special_air_hi_h_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - 0 => PLAY_SE(fighter, Hash40::new("vc_kirby_002")), - 1 => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), - _ => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), + 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), + 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), + _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), }; } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h04")); } } -unsafe extern "C" fn kirby_special_air_hi_h_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kirby_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw"), false, -1.0); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_WORK_ID_FLAG_STONE_BLINK_ONOFF); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw_to_ground"), false, -1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::init_attack_pos(boma, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kirby_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 30.0, 24.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 30.0, 24.0); + if is_excute(agent) { //KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_air_lw"), false, -1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 100); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 100); WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_WORK_ID_FLAG_STONE_BLINK_ONOFF); } frame(lua_state, 19.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 15.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 15.0); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { //KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw_to_air"), false, -1.0); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 70, 76, 0, 69, 6.5, 0.0, 2.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 70, 76, 0, 69, 6.5, 0.0, 2.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::init_attack_pos(boma, 0); } } -unsafe extern "C" fn kirby_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 2, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 2, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("kirby_stone_s"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - FLASH(fighter, 0.706, 0.502, 0.392, 0.157); + if is_excute(agent) { + EFFECT(agent, Hash40::new("kirby_stone_s"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + FLASH(agent, 0.706, 0.502, 0.392, 0.157); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.235); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.235); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.314); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.314); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.392); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.392); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.471); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.471); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.549); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.549); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.627); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.627); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.706); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.706); } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_specialnstart", kirby_special_n_start_game) - .acmd("game_specialairnstart", kirby_special_n_start_game) - .acmd("game_specialnloop", kirby_special_n_loop_game) - .acmd("game_specialairnloop", kirby_special_n_loop_game) - .acmd("game_specialneat", kirby_special_n_eat_game) - .acmd("game_specialairneat", kirby_special_n_eat_game) - .acmd("game_specialndrink", kirby_special_n_drink_game) - .acmd("game_specialairndrink", kirby_special_n_drink_game) - .acmd("game_specialnlarge", kirby_special_n_large_game) - .acmd("game_specialairnlarge", kirby_special_n_large_game) - .acmd("game_specialsstart", kirby_special_s_start_game) - .acmd("game_specials", kirby_special_s_game) - .acmd("game_specialss", kirby_special_ss_game) - .acmd("game_specialsmax", kirby_special_s_max_game) - .acmd("game_specialairsstart", kirby_special_air_s_start_game) - .acmd("game_specialairs", kirby_special_air_s_game) - .acmd("game_specialairss", kirby_special_air_ss_game) - .acmd("game_specialairhi2", kirby_special_air_hi2_game) - .acmd("effect_specialairhi2", kirby_special_air_hi2_effect) - .acmd("game_specialhih", kirby_special_hi_h_game) - .acmd("effect_specialhih", kirby_special_hi_h_effect) - .acmd("sound_specialhih", kirby_special_hi_h_sound) - .acmd("expression_specialhih", kirby_special_hi_h_expression) - .acmd("game_specialairhih", kirby_special_air_hi_h_game) - .acmd("effect_specialairhih", kirby_special_air_hi_h_effect) - .acmd("sound_specialairhih", kirby_special_air_hi_h_sound) - .acmd( - "expression_specialairhih", - kirby_special_air_hi_h_expression, - ) - .acmd("game_speciallw", kirby_special_lw_game) - .acmd("game_specialairlw", kirby_special_air_lw_game) - .acmd("effect_specialairlw", kirby_special_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnloop", game_specialnloop); + agent.acmd("game_specialneat", game_specialneat); + agent.acmd("game_specialairneat", game_specialneat); + agent.acmd("game_specialndrink", game_specialndrink); + agent.acmd("game_specialairndrink", game_specialndrink); + agent.acmd("game_specialnlarge", game_specialnlarge); + agent.acmd("game_specialairnlarge", game_specialnlarge); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialss", game_specialss); + agent.acmd("game_specialsmax", game_specialsmax); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairss", game_specialairss); + + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("game_specialhih", game_specialhih); + agent.acmd("effect_specialhih", effect_specialhih); + agent.acmd("sound_specialhih", sound_specialhih); + agent.acmd("expression_specialhih", expression_specialhih); + agent.acmd("game_specialairhih", game_specialairhih); + agent.acmd("effect_specialairhih", effect_specialairhih); + agent.acmd("sound_specialairhih", sound_specialairhih); + agent.acmd("expression_specialairhih", expression_specialairhih); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/kirby/src/acmd/throws.rs b/fighters/kirby/src/acmd/throws.rs index 2a76d126db..9af68ded46 100644 --- a/fighters/kirby/src/acmd/throws.rs +++ b/fighters/kirby/src/acmd/throws.rs @@ -1,220 +1,218 @@ - use super::*; -unsafe extern "C" fn kirby_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 kirby_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(12.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(12.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 kirby_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(-17.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(-17.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 kirby_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 75, 125, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 75, 125, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 38.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { // reduce fthrow bounce height KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_BRAKE); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { // enable aerial drift before fthrow anim is over KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } -unsafe extern "C" fn kirby_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 115, 120, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 115, 120, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 31.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, -10, 0); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn kirby_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 78, 68, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 78, 68, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 95, 0, 85, 9.5, 0.0, 6.5, 2.0, Some(1.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 7.0, 65, 95, 0, 85, 9.5, 0.0, 6.5, 2.0, Some(1.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::set_float(boma, 5.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FINISH_CAMERA_THROW_RAY_LENGTH); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_RAY_CHECK_FINISH_CAMERA_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 7); + CHECK_FINISH_CAMERA(agent, 15, 7); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.8); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: 0.0, z: 0.0}); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn kirby_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); for _ in 0..9 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.8, 0.0, 4.0, 3.2, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.8, 0.0, 4.0, 3.2, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 90, 100, 0, 10, 5.8, 0.0, 4.0, 2.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 90, 100, 0, 10, 5.8, 0.0, 4.0, 2.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 4); + CHECK_FINISH_CAMERA(agent, 8, 4); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: 6.868900}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 68.0); { - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_catch", kirby_catch_game) - .acmd("game_catchdash", kirby_catch_dash_game) - .acmd("game_catchturn", kirby_catch_turn_game) - .acmd("game_throwf", kirby_throw_f_game) - .acmd("game_throwb", kirby_throw_b_game) - .acmd("game_throwhi", kirby_throw_hi_game) - .acmd("game_throwlw", kirby_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/kirby/src/acmd/tilts.rs b/fighters/kirby/src/acmd/tilts.rs index db0eb0a227..c7cfeabbc5 100644 --- a/fighters/kirby/src/acmd/tilts.rs +++ b/fighters/kirby/src/acmd/tilts.rs @@ -1,106 +1,100 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, 4.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, 4.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index 4cb51e2a8b..fc97acb47a 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,12 +37,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub const KOOPA_MAX_COOLDOWN : i32 = 900; pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("kirby"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/kirby/src/opff.rs b/fighters/kirby/src/opff.rs index 003ace89b1..4b3e5a4e77 100644 --- a/fighters/kirby/src/opff.rs +++ b/fighters/kirby/src/opff.rs @@ -3,6 +3,8 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; +mod copy; + // symbol-based call for the pikachu/pichu characters' common opff extern "Rust" { fn gimmick_flash(boma: &mut BattleObjectModuleAccessor); @@ -57,1075 +59,21 @@ unsafe fn dash_attack_jump_cancels(boma: &mut BattleObjectModuleAccessor) { // } // } -pub extern "C" fn hammer_swing_drift_landcancel(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_ATTACK) { - if fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR) { - AttackModule::clear_all(fighter.module_accessor); - MotionModule::change_motion_force_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), 33.0, 1.0, 1.0); - MotionModule::set_rate(fighter.module_accessor, (55.0 - 33.0)/25.0); // equates to 17F landing lag - } - if fighter.is_situation(*SITUATION_KIND_AIR) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - -// Magic Series -unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - if( (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_RYU) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KEN) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCARIO) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_DOLLY)){ - let cat1 = cat[0]; - let cat4 = cat[3]; - // Level 1: Jab and Dash Attack Cancels - if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for tilt attack inputs - if boma.is_cat_flag(Cat1::AttackS3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); - } - if boma.is_cat_flag(Cat1::AttackHi3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); - } - if boma.is_cat_flag(Cat1::AttackLw3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); - } - - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during dash attack (on hit) - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } +unsafe fn hammer_swing_drift_landcancel(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_ATTACK) { + if fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR) { + AttackModule::clear_all(fighter.module_accessor); + MotionModule::change_motion_force_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), 33.0, 1.0, 1.0); + MotionModule::set_rate(fighter.module_accessor, (55.0 - 33.0)/25.0); // equates to 17F landing lag } - - // Level 2: Tilt Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during utilt - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Smash Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - } - } - - // Aerial Cancels - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for jump inputs - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - } -} - -// Copy Abilities -// Fox Drift and Laser Land Cancel -unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + if fighter.is_situation(*SITUATION_KIND_AIR) { + if KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } } } -// Falco Drift and Laser Land Cancel -unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Wolf Drift and Laser Airdodge Cancel -unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { - if frame > 17.0 { - boma.check_airdodge_cancel(); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Water Shuriken Max Dash Cancel -unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { - if frame > 12.0 { - boma.check_dash_cancel(); - } - } -} - -// Sora Magic Cancels -unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - // Firaga Airdodge Cancel - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { - if frame > 2.0 { - boma.check_airdodge_cancel(); - } - } - // Thundaga Land Cancel - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) - { - let special_n_fire_cancel_frame_ground = 69.0; - let landing_lag = 12.0; - if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); - } - } -} - -// cycles Kirby to firaga after copying Sora -unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if fighter.is_motion(Hash40::new("special_n_drink")) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { - let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); - let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; - if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE - && frame > 3.0 { - WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); - FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder - } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER - && frame > 4.0 { - FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire - } - } -} - -// handles kirby's mining behavior when copying steve -unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { - if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { - VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); - } - - // wait 2 frames before letting the material table advance, preventing any jumps in entries - if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { - if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { - VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); - } else { - VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); - } - } - } -} - -// Bite Early Throw and Turnaround -unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { - if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { - boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { - if frame < 7.0 { - if facing * stick_x < 0.0 { - PostureModule::reverse_lr(boma); - PostureModule::update_rot_y_lr(boma); - } - } - } -} - -// Chef Drift and Land Cancel -unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if StatusModule::is_changing(boma) { - let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Nayru's Love Drift and Land Cancel -unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND { - if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { - //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); - MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); - } - } - else if situation_kind == *SITUATION_KIND_AIR { - if frame >= 31.0 { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - -// Hero Dash Cancel Frizz -unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_motion(Hash40::new("brave_special_n1")) - && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF - && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) - { - if fighter.check_dash_cancel() { - let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; - FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } -} - -// Falcon Punch Turnarounds -unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - let frame = fighter.motion_frame(); - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) - && 22.0 < frame && frame < 41.0 - && fighter.is_stick_backward() - && fighter.stick_x().abs() > 0.1 - { - fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); - } -} - -// Blue Eggs Land Cancel -unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_prev_situation(*SITUATION_KIND_AIR) - { - // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame - let special_n_fire_cancel_frame_ground = 49.0; - // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag - let landing_lag = 12.0; - if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); - } - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); - } -} - -// Peanut Popgun Airdodge Cancel -unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { - boma.check_airdodge_cancel(); - } -} - -//Darkest Lariat Ledge Slipoff -unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); - fighter.sub_transition_group_check_air_cliff(); - } -} - -//Bowser Flame Land Cancel -unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - if frame < 23.0 && !cooleddown { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - MotionModule::set_frame(boma, 22.0, true); - } - } - } -} - -unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - /* //Ignore cooldown during respawn,death,entry and nspecial - if (&[ - *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, - *FIGHTER_STATUS_KIND_SPECIAL_N - ]).contains(&status_kind) { - return; - } */ - - if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); - //If cooling down, remove ready effect - if !cooleddown { - if charged_effect > 0 { - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); - if EffectModule::is_exist_effect(boma, charged_effect as u32) { - EffectModule::kill(boma, charged_effect as u32, false,false); - } - } - return; - } - //Otherwise, spawn effect if effect does not exist - else if (charged_effect <= 0 - || !EffectModule::is_exist_effect(boma, charged_effect as u32)) - { - if (charged_effect <= 0){ - gimmick_flash(boma); - } - let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; - let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; - let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); - } - } -} - -// Clown Cannon Shield Cancel -unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { - if frame > 16.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - if situation_kind == *SITUATION_KIND_GROUND { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); - } - } - } - } -} - -// Link's Bow Drift -unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Bonus Fruit Airdodge Cancel -unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { - if frame > 11.0 { - boma.check_airdodge_cancel(); - } - } -} - -// Colorless Attack Dash Cancel on Hit -// This is unique to Kirby due to only having access to colorless attack. -unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { - boma.check_dash_cancel(); - } - } -} - -// Dark Pit's Bow Land Cancel -unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ - if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - } - } - } -} - -// Flamethrower Land Cancel -unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - let prev_situation = StatusModule::prev_situation_kind(boma); - if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { - return; - } - if StatusModule::is_changing(boma) { - return; - } - if frame < 19.0 { - MotionModule::set_frame(boma, 18.0, true); - } -} - -// Metal Blade Airdodge Cancel -unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { - if boma.status_frame() > 16 { - boma.check_airdodge_cancel(); - } - } -} - -// Simon's Axe Drift -unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Richter's Knife Drift -unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Richter's Knife land cancel -unsafe fn knife_lc(boma: &mut BattleObjectModuleAccessor) { - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N) - && VarModule::is_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL) - && boma.is_situation(*SITUATION_KIND_GROUND){ - // remove the unthrown knife from richter's hand - if (2.0..13.0).contains(&boma.motion_frame()) - && ArticleModule::is_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE){ - ArticleModule::remove_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - - let landing_lag = 10.0; // amount of frames until richter can act when landing - let rate = 27.0 / landing_lag; - MotionModule::change_motion(boma, Hash40::new("landing_heavy"), 0.0, rate, false, 0.0, false, false); - VarModule::off_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL); - EffectModule::kill_kind(boma, Hash40::new("sys_sp_flash"), true, true); - } -} - -// Toon Link's Bow Drift -unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Young Link's Bow Drift -unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// PM-like neutral-b canceling -// Donkey Kong -unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Samus & Dark Samus -unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Robin -unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Sheik -unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Mewtwo -unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - if MotionModule::is_end(boma) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); - } - } - } -} - -// Squirtle -unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { - //PM-like neutral-b canceling - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { - if situation_kind == *SITUATION_KIND_AIR { - if boma.is_cat_flag(Cat1::AirEscape) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); - } - } - } -} - -// Diddy Kong -unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - if fighter.is_cat_flag(Cat2::StickEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeF) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeB) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - if fighter.sub_check_command_guard().get_bool() { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - } - else { - if fighter.is_cat_flag(Cat1::AirEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) - && fighter.get_num_used_jumps() < fighter.get_jump_count_max() - { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); - } - } - } -} - -// Lucario -unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { - if boma.is_cat_flag(Cat2::CommonGuard) { - if situation_kind == *SITUATION_KIND_AIR { - if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - else { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - }***/ - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - } - } -} - -// WiiFit Trainer -unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Pac-Man -unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Hero -unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) - && fighter.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR - { - WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } -} - -// Sephiroth -unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Mii Gunner -unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Byleth -unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Ken -unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if !boma.is_status_one_of(&[ - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, - ]) { - return; - } - - // set VarModule flag on f12 - this flag changes hado properties - if frame == 12.0 && fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n"), - ]) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - // after frame 13, disallow changing from aerial to grounded hadoken - // instead, we enter a landing animation - if (frame > 13.0 || fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n_empty"), - Hash40::new("ken_special_n_empty"), - ])) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) { - if frame < 70.0 { // the autocancel frame - WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - } else { - boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); - } - } -} - -//Bowser & Lucas -unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} - -unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { - // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // - let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); - let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); - let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); - } - else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { - // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // - let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; - EffectModule::kill(fighter.module_accessor, handle, false, false); - let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; - EffectModule::kill(fighter.module_accessor, handle2, false, false); - let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; - EffectModule::kill(fighter.module_accessor, handle3, false, false); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); - } -} - -pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { - if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] - ) { - //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); - if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } - else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, - *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF - ) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - } -} - -// Piranha Plant Ptooie Stance -pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { - let opponent_boma = fighter.get_grabbed_opponent_boma(); - let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); - if grabbed_fighter == *FIGHTER_KIND_PACKUN { - let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); - if new_stance != old_stance { - // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); - VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); - } - } - } -} - -unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { - if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); - } - else { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - -// End of Copy Abilities - unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { let copystatus = StatusModule::status_kind(fighter.module_accessor); if !fighter.is_in_hitlag() @@ -1193,130 +141,17 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod dash_attack_jump_cancels(boma); //disable_dash_attack_slideoff(fighter); //stone_control(fighter); + hammer_swing_drift_landcancel(fighter); fastfall_specials(fighter); cutter_size(boma, status_kind); - reset_flags(fighter, boma, status_kind, situation_kind); - - // Magic Series - magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); - - // Fox Drift and Laser Land Cancel - fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Falco Drift and Laser Land Cancel - falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Water Shuriken Max Dash Cancel - max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cancels - magic_cancels(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cycle Adjustment - trail_magic_cycle(fighter, boma, frame); - - // Steve Mining - pickel_mining(fighter, boma); - - // Bite Early Throw and Turnaround - bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); - - // Chef Drift and Land Cancel - chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Nayru's Love Drift and Fast Fall - nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); - - // Hero Dash Cancel Frizz - dash_cancel_frizz(fighter); - - // Wolf Drift and Laser Airdodge Cancel - wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Falcon Punch Turnarounds - repeated_falcon_punch_turnaround(fighter); - - //Blue Eggs Land Cancel - blue_eggs_land_cancels(fighter); - - // Peanut Popgun Airdodge Cancel - peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); - - // Darkest Lariat Ledge Slipoff - lariat_ledge_slipoff(fighter); - - // Bowser Flame Land Cancel - koopa_flame_cancel(boma, status_kind, situation_kind, frame); - - //Bowser Fireball Cooldown - koopa_fireball_cooldown(boma, status_kind); - - // Clown Cannon Shield Cancel - clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); - - // Link's Bow Drift - bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Bonus Fruit Airdodge Cancel - bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Colorless Attack Dash Cancel on Hit - colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Dark Pit's Bow Land Cancel - pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); - - // Flamethower Land Cancel - plizardon_flame_cancel(boma, status_kind, situation_kind, frame); - - // Metal Blade Airdodge Cancel - blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Simon's Axe Drift - axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Richter's Knife Drift - knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Richter's Knife land cancel - knife_lc(boma); - - // Toon Link's Bow Drift - heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Young Link's Bow Fastfall - fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); - - // Lucas Offense Up - lucas_offense_charge(fighter, boma, situation_kind); - lucas_offense_effct_handler(fighter); - - // Piranha Plant Ptooie Stance - packun_ptooie_stance(fighter, boma, status_kind); - packun_ptooie_scale(boma); - // PM-like Neutral B Cancels - donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); - samus_nspecial_cancels(boma, status_kind, situation_kind); - reflet_nspecial_cancels(boma, status_kind, situation_kind); - sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); - mewtwo_nspecial_cancels(boma, status_kind, situation_kind); - pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); - diddy_nspecial_cancels(fighter, boma, status_kind); - lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - wiifit_nspecial_cancels(boma, status_kind, situation_kind); - pacman_nspecial_cancels(boma, status_kind, situation_kind); - brave_nspecial_cancels(fighter); - edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); - master_nspecial_cancels(boma, status_kind, situation_kind); - ken_air_hado_distinguish(fighter, boma, frame); + copy::kirby_copy_handler(fighter, boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); } pub extern "C" fn kirby_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { common::opff::fighter_common_opff(fighter); - kirby_frame(fighter) + kirby_frame(fighter) } } @@ -1325,13 +160,7 @@ pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("kirby") - .on_line(Main, kirby_frame_wrapper) - .on_line(Main, hammer_swing_drift_landcancel) - .install(); - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install() +pub fn install(agent: &mut Agent) { + agent.on_line(Main, kirby_frame_wrapper); } diff --git a/fighters/kirby/src/opff/copy.rs b/fighters/kirby/src/opff/copy.rs new file mode 100644 index 0000000000..32be997de7 --- /dev/null +++ b/fighters/kirby/src/opff/copy.rs @@ -0,0 +1,1142 @@ +use super::*; + +// Magic Series +unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + let cat1 = cat[0]; + let cat4 = cat[3]; + // Level 1: Jab and Dash Attack Cancels + if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for tilt attack inputs + if boma.is_cat_flag(Cat1::AttackS3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); + } + if boma.is_cat_flag(Cat1::AttackHi3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); + } + if boma.is_cat_flag(Cat1::AttackLw3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); + } + + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during dash attack (on hit) + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Level 2: Tilt Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S3, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during utilt + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Smash Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4, + *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + } + } + + // Aerial Cancels + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for jump inputs + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } +} + +// Copy Abilities +// Fox Drift and Laser Land Cancel +unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Falco Drift and Laser Land Cancel +unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Wolf Drift and Laser Airdodge Cancel +unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { + if frame > 17.0 { + boma.check_airdodge_cancel(); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Water Shuriken Max Dash Cancel +unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { + if frame > 12.0 { + boma.check_dash_cancel(); + } + } +} + +// Sora Magic Cancels +unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + // Firaga Airdodge Cancel + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { + if frame > 2.0 { + boma.check_airdodge_cancel(); + } + } + // Thundaga Land Cancel + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) + { + let special_n_fire_cancel_frame_ground = 69.0; + let landing_lag = 12.0; + if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); + } + } +} + +// cycles Kirby to firaga after copying Sora +unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if fighter.is_motion(Hash40::new("special_n_drink")) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { + let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); + let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; + if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE + && frame > 3.0 { + WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); + FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder + } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER + && frame > 4.0 { + FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire + } + } +} + +// handles kirby's mining behavior when copying steve +unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { + if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { + VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); + } + + // wait 2 frames before letting the material table advance, preventing any jumps in entries + if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { + if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { + VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); + } else { + VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); + } + } + } +} + +// Bite Early Throw and Turnaround +unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { + if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { + boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { + if frame < 7.0 { + if facing * stick_x < 0.0 { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); + } + } + } +} + +// Chef Drift and Land Cancel +unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if StatusModule::is_changing(boma) { + let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; + KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Nayru's Love Drift and Land Cancel +unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND { + if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { + //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); + } + } + else if situation_kind == *SITUATION_KIND_AIR { + if frame >= 31.0 { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } + } +} + +// Hero Dash Cancel Frizz +unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_motion(Hash40::new("brave_special_n1")) + && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF + && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) + { + if fighter.check_dash_cancel() { + let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; + FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); + EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } +} + +// Falcon Punch Turnarounds +unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + let frame = fighter.motion_frame(); + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) + && 22.0 < frame && frame < 41.0 + && fighter.is_stick_backward() + && fighter.stick_x().abs() > 0.1 + { + fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); + } +} + +// Blue Eggs Land Cancel +unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_prev_situation(*SITUATION_KIND_AIR) + { + // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame + let special_n_fire_cancel_frame_ground = 49.0; + // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag + let landing_lag = 12.0; + if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); + } + LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); + } +} + +// Peanut Popgun Airdodge Cancel +unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { + boma.check_airdodge_cancel(); + } +} + +//Darkest Lariat Ledge Slipoff +unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); + fighter.sub_transition_group_check_air_cliff(); + } +} + +//Bowser Flame Land Cancel +unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + if frame < 23.0 && !cooleddown { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + MotionModule::set_frame(boma, 22.0, true); + } + } + } +} + +unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + /* //Ignore cooldown during respawn,death,entry and nspecial + if (&[ + *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, + *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, + *FIGHTER_STATUS_KIND_SPECIAL_N + ]).contains(&status_kind) { + return; + } */ + + if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); + //If cooling down, remove ready effect + if !cooleddown { + if charged_effect > 0 { + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); + if EffectModule::is_exist_effect(boma, charged_effect as u32) { + EffectModule::kill(boma, charged_effect as u32, false,false); + } + } + return; + } + //Otherwise, spawn effect if effect does not exist + else if (charged_effect <= 0 + || !EffectModule::is_exist_effect(boma, charged_effect as u32)) + { + if (charged_effect <= 0){ + gimmick_flash(boma); + } + let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; + let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; + let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); + } + } +} + +// Clown Cannon Shield Cancel +unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { + if frame > 16.0 { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { + if situation_kind == *SITUATION_KIND_GROUND { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); + } + } + } + } +} + +// Link's Bow Drift +unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Bonus Fruit Airdodge Cancel +unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { + if frame > 11.0 { + boma.check_airdodge_cancel(); + } + } +} + +// Colorless Attack Dash Cancel on Hit +// This is unique to Kirby due to only having access to colorless attack. +unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { + boma.check_dash_cancel(); + } + } +} + +// Dark Pit's Bow Land Cancel +unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ + if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + } + } + } +} + +// Flamethrower Land Cancel +unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + let prev_situation = StatusModule::prev_situation_kind(boma); + if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { + return; + } + if StatusModule::is_changing(boma) { + return; + } + if frame < 19.0 { + MotionModule::set_frame(boma, 18.0, true); + } +} + +// Metal Blade Airdodge Cancel +unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { + if boma.status_frame() > 16 { + boma.check_airdodge_cancel(); + } + } +} + +// Simon's Axe Drift +unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Richter's Knife Drift +unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Richter's Knife land cancel +unsafe fn knife_lc(boma: &mut BattleObjectModuleAccessor) { + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N) + && VarModule::is_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL) + && boma.is_situation(*SITUATION_KIND_GROUND) { + // remove the unthrown knife from richter's hand + if (2.0..13.0).contains(&boma.motion_frame()) + && ArticleModule::is_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE){ + ArticleModule::remove_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + + let landing_lag = 10.0; // amount of frames until richter can act when landing + let rate = 27.0 / landing_lag; + MotionModule::change_motion(boma, Hash40::new("landing_heavy"), 0.0, rate, false, 0.0, false, false); + VarModule::off_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL); + EffectModule::kill_kind(boma, Hash40::new("sys_sp_flash"), true, true); + } +} + +// Toon Link's Bow Drift +unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Young Link's Bow Drift +unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// PM-like neutral-b canceling +// Donkey Kong +unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + +// Samus & Dark Samus +unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + +// Robin +unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Sheik +unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Mewtwo +unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + if MotionModule::is_end(boma) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); + } + } + } +} + +// Squirtle +unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { + //PM-like neutral-b canceling + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { + if situation_kind == *SITUATION_KIND_AIR { + if boma.is_cat_flag(Cat1::AirEscape) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); + } + } + } +} + +// Diddy Kong +unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + if fighter.is_cat_flag(Cat2::StickEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeF) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeB) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + if fighter.sub_check_command_guard().get_bool() { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + } + else { + if fighter.is_cat_flag(Cat1::AirEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) + && fighter.get_num_used_jumps() < fighter.get_jump_count_max() + { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); + } + } + } +} + +// Lucario +unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { + if boma.is_cat_flag(Cat2::CommonGuard) { + if situation_kind == *SITUATION_KIND_AIR { + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + else { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + }***/ + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + } + } +} + +// WiiFit Trainer +unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Pac-Man +unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Hero +unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) + && fighter.is_situation(*SITUATION_KIND_AIR) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR + { + WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } +} + +// Sephiroth +unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Mii Gunner +unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Byleth +unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Ken +unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if !boma.is_status_one_of(&[ + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, + ]) { + return; + } + + // set VarModule flag on f12 - this flag changes hado properties + if frame == 12.0 && fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n"), + ]) { + VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + // after frame 13, disallow changing from aerial to grounded hadoken + // instead, we enter a landing animation + if (frame > 13.0 || fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n_empty"), + Hash40::new("ken_special_n_empty"), + ])) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) { + if frame < 70.0 { // the autocancel frame + WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + } else { + boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); + } + } +} + +//Bowser & Lucas +unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } +} + +unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { + // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // + let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); + let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); + let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); + } + else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { + // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // + let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; + EffectModule::kill(fighter.module_accessor, handle, false, false); + let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; + EffectModule::kill(fighter.module_accessor, handle2, false, false); + let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; + EffectModule::kill(fighter.module_accessor, handle3, false, false); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); + } +} + +unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { + if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] + ) { + //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); + if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } + } + else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, + *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF + ) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + } +} + +// Piranha Plant Ptooie Stance +unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { + let opponent_boma = fighter.get_grabbed_opponent_boma(); + let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); + if grabbed_fighter == *FIGHTER_KIND_PACKUN { + let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); + if new_stance != old_stance { + // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); + VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); + } + } + } +} + +unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { + if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); + } + else { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); + } +} + +pub unsafe fn kirby_copy_handler(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + if !WorkModule::is_flag(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_FLAG_COPY) { + reset_flags(fighter, boma, status_kind, situation_kind); + return; + } + + let copy = WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA); + + match copy { + // Ryu + 0x3C => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Ken + 0x3D => { + magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); + ken_air_hado_distinguish(fighter, boma, frame); + }, + // Lucario + 0x2C => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Terry + 0x55 => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Fox + 0x7 => fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Falco + 0x14 => falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Wolf + 0x2F => wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[1], frame), + // Greninja + 0x35 => max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame), + // Sora + 0x5D => { + magic_cancels(boma, status_kind, situation_kind, cat[0], frame); + trail_magic_cycle(fighter, boma, frame); + }, + // Steve + 0x58 => pickel_mining(fighter, boma), + // Wario + 0x21 => bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame), + // Mr. Game & Watch + 0x1C => chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Zelda + 0x11 => nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame), + // Hero + 0x53 => { + dash_cancel_frizz(fighter); + brave_nspecial_cancels(fighter); + }, + // Captain Falcon + 0xB => repeated_falcon_punch_turnaround(fighter), + // Banjo & Kazooie + 0x54 => blue_eggs_land_cancels(fighter), + // Diddy Kong + 0x27 => { + peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); + diddy_nspecial_cancels(fighter, boma, status_kind); + }, + // Incineroar + 0x47 => lariat_ledge_slipoff(fighter), + // Bowser + 0xF => { + koopa_flame_cancel(boma, status_kind, situation_kind, frame); + koopa_fireball_cooldown(boma, status_kind); + }, + // Bowser Jr. + 0x3A => clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame), + // Link + 0x2 => bow_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Pac Man + 0x37 => { + bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); + pacman_nspecial_cancels(boma, status_kind, situation_kind); + }, + // Palutena + 0x36 => colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame), + // Dark Pit + 0x1F => pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y), + // Charizard + 0x26 => plizardon_flame_cancel(boma, status_kind, situation_kind, frame), + // Mega Man + 0x31 => blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame), + // Simon + 0x43 => axe_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Richter + 0x44 => { + knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); + knife_lc(boma); + }, + // Toon Link + 0x2E => heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Young Link + 0x17 => fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y), + // Lucas + 0x28 => { + lucas_offense_charge(fighter, boma, situation_kind); + lucas_offense_effct_handler(fighter); + }, + // Piranha Plant + 0x51 => { + packun_ptooie_stance(fighter, boma, status_kind); + packun_ptooie_scale(boma); + }, + // Donkey Kong + 0x1 => donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind), + // Samus + 0x3 => samus_nspecial_cancels(fighter, status_kind, situation_kind), + // Robin + 0x38 => reflet_nspecial_cancels(fighter, status_kind, situation_kind), + // Sheik + 0x10 => sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind), + // Mewtwo + 0x19 => mewtwo_nspecial_cancels(boma, status_kind, situation_kind), + // Squirtle + 0x24 => pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]), + // Lucario + 0x2C => lucario_nspecial_cancels(fighter, status_kind, situation_kind, cat[2]), + // Wii Fit Trainer + 0x32 => wiifit_nspecial_cancels(fighter, status_kind, situation_kind), + // Sephiroth + 0x59 => edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]), + // Mii Gunner + 0x4A => miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]), + // Byleth + 0x56 => master_nspecial_cancels(boma, status_kind, situation_kind), + _ => {} + } +} \ No newline at end of file diff --git a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs index 42b65af928..8e0136299a 100644 --- a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs +++ b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { @@ -195,14 +196,12 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -pub fn install() { - smashline::Agent::new("kirby") - .status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_init) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_main) - .status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_init) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Pre, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_init); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_main); + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_init); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_end); } \ No newline at end of file diff --git a/fighters/kirby/src/status/diddy_special_n_cancel.rs b/fighters/kirby/src/status/diddy_special_n_cancel.rs index 5a8e81534a..44288ba51a 100644 --- a/fighters/kirby/src/status/diddy_special_n_cancel.rs +++ b/fighters/kirby/src/status/diddy_special_n_cancel.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { @@ -180,47 +181,13 @@ unsafe extern "C" fn special_n_jump_cancel_end(fighter: &mut L2CFighterCommon) - return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, - special_n_main, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Pre, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_pre, - ) - .status( - Main, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_main, - ) - .status( - End, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_end, - ) - .status( - Pre, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_pre, - ) - .status( - Main, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_main, - ) - .status( - End, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, special_n_main); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_end); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end); } diff --git a/fighters/kirby/src/status/edge_special_n.rs b/fighters/kirby/src/status/edge_special_n.rs index a11b86c8e5..2305d49b52 100644 --- a/fighters/kirby/src/status/edge_special_n.rs +++ b/fighters/kirby/src/status/edge_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("edge_special_n_start").into(), Hash40::new("edge_special_air_n_start").into(), false.into()); @@ -101,8 +102,6 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par } } -pub fn install() { - smashline::Agent::new("kirby") - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/kirby/src/status/ganon_special_n.rs b/fighters/kirby/src/status/ganon_special_n.rs index cab36e4722..9275799f95 100644 --- a/fighters/kirby/src/status/ganon_special_n.rs +++ b/fighters/kirby/src/status/ganon_special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( @@ -169,32 +171,10 @@ unsafe extern "C" fn special_n_exec(_fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_pre, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_main, - ) - .status( - End, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_end, - ) - .status( - Init, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_init, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_exec, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_end); + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_init); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_exec); } diff --git a/fighters/kirby/src/status/ganon_special_n_float.rs b/fighters/kirby/src/status/ganon_special_n_float.rs index 2e80fc93e3..2bd5460769 100644 --- a/fighters/kirby/src/status/ganon_special_n_float.rs +++ b/fighters/kirby/src/status/ganon_special_n_float.rs @@ -1,5 +1,7 @@ use super::*; +// GANON_SPECIAL_N_FLOAT + unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -133,22 +135,8 @@ unsafe extern "C" fn special_n_float_end(_fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_pre, - ) - .status( - Main, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_main, - ) - .status( - End, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_pre); + agent.status(Main, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_main); + agent.status(End, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_end); } diff --git a/fighters/kirby/src/status/gaogaen_special_n.rs b/fighters/kirby/src/status/gaogaen_special_n.rs index 996f7c3062..3086c7b470 100644 --- a/fighters/kirby/src/status/gaogaen_special_n.rs +++ b/fighters/kirby/src/status/gaogaen_special_n.rs @@ -1,9 +1,8 @@ use super::*; -use globals::*; // FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N -pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_N | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 @@ -39,7 +38,7 @@ pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) - } -pub unsafe extern "C" fn exec_gaogaen_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); @@ -48,17 +47,7 @@ pub unsafe extern "C" fn exec_gaogaen_special_n(fighter: &mut L2CFighterCommon) return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - gaogaen_special_n_pre, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - exec_gaogaen_special_n, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_pre); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_exec); } diff --git a/fighters/kirby/src/status/koopa_special_n.rs b/fighters/kirby/src/status/koopa_special_n.rs index 49a517f8e9..104654c049 100644 --- a/fighters/kirby/src/status/koopa_special_n.rs +++ b/fighters/kirby/src/status/koopa_special_n.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn koopa_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N + +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if !can_fireball { return smashline::original_status(Main, fighter, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N)(fighter); @@ -16,11 +18,11 @@ unsafe extern "C" fn koopa_special_n_main(fighter: &mut L2CFighterCommon) -> L2C GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } - fighter.sub_shift_status_main(L2CValue::Ptr(koopa_specialnmax_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_max_main_loop as *const () as _)) } } -unsafe extern "C" fn koopa_specialnmax_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_situation_changed(fighter.module_accessor) { fighter.sub_change_motion_by_situation(Hash40::new("koopa_special_n_max").into(), Hash40::new("koopa_special_air_n_max").into(), true.into()); @@ -54,7 +56,7 @@ unsafe extern "C" fn koopa_specialnmax_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn koopa_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if (!can_fireball){ if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_CONTINUE_START) @@ -71,7 +73,7 @@ unsafe extern "C" fn koopa_special_n_exec(fighter: &mut L2CFighterCommon) -> L2C } } -unsafe extern "C" fn koopa_special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if (!can_fireball){ return smashline::original_status(ExecStop, fighter, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N)(fighter); @@ -81,22 +83,8 @@ unsafe extern "C" fn koopa_special_n_execstop(fighter: &mut L2CFighterCommon) -> } } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_main, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_exec, - ) - .status( - ExecStop, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_execstop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_exec); + agent.status(ExecStop, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_execstop); } diff --git a/fighters/kirby/src/status/littlemac_special_n.rs b/fighters/kirby/src/status/littlemac_special_n.rs index 97da4f0110..1931c68f2b 100644 --- a/fighters/kirby/src/status/littlemac_special_n.rs +++ b/fighters/kirby/src/status/littlemac_special_n.rs @@ -1,10 +1,11 @@ use super::*; -use globals::*; #[skyline::from_offset(0xb96770)] fn copy_ability_reset(fighter: *mut Fighter, some_miifighter_bool: bool); -unsafe extern "C" fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START + +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -33,7 +34,7 @@ unsafe extern "C" fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> 0.into() } -unsafe extern "C" fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_UNIQ, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB); let sum_spd_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -61,10 +62,10 @@ unsafe extern "C" fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, (*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_02) + -1); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x3a40337e2c), (*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_02) + -1); - fighter.main_shift(littlemac_special_n_main_loop) + fighter.main_shift(special_n_main_loop) } -unsafe extern "C" fn littlemac_special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -129,7 +130,7 @@ unsafe extern "C" fn littlemac_special_n_main_loop(fighter: &mut L2CFighterCommo return 0.into() } -unsafe extern "C" fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_NONE, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB); EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); let kirb = fighter.battle_object.cast::(); @@ -139,10 +140,8 @@ unsafe extern "C" fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_pre) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_main) - .status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_main); + agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_end); } \ No newline at end of file diff --git a/fighters/kirby/src/status/lucas_special_n.rs b/fighters/kirby/src/status/lucas_special_n.rs index a1b25e0889..bcb1802217 100644 --- a/fighters/kirby/src/status/lucas_special_n.rs +++ b/fighters/kirby/src/status/lucas_special_n.rs @@ -1,8 +1,8 @@ use super::*; -// SPECIAL N // +// FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N -unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { fighter.change_status(FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE.into(), false.into()); return 0.into(); @@ -10,12 +10,11 @@ unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV else { smashline::original_status(Pre, fighter, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N)(fighter) } - } // SPECIAL N HOLD // -unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N STATUS MAIN CODE // // @@ -26,20 +25,20 @@ unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); // if !StopModule::is_stop(fighter.module_accessor) { - // lucas_special_n_hold_main_sub_status(fighter, false.into()); + // special_n_hold_main_sub_status(fighter, false.into()); // } - // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - // fighter.main_shift(lucas_special_n_hold_main_loop) + // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + // fighter.main_shift(special_n_hold_main_loop) if !StopModule::is_stop(fighter.module_accessor) { - lucas_special_n_hold_main_sub_status(fighter, false.into()); + special_n_hold_main_sub_status(fighter, false.into()); } MotionModule::change_motion(fighter.module_accessor, Hash40::new("lucas_special_n_hold"), 0.0, 1.0, false, 0.0, false, false); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - fighter.main_shift(lucas_special_n_hold_main_loop) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + fighter.main_shift(special_n_hold_main_loop) } -unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { +unsafe fn special_n_check_explosion(fighter: &mut L2CFighterCommon) { // // OLD PK FREEZE EXPLOSION CODE // // @@ -71,12 +70,12 @@ unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { // } } -unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { // // OLD SPECIAL N SUBSTATUS CODE // // // if arg.get_bool() { - // lucas_special_n_check_explosion(fighter); + // special_n_check_explosion(fighter); // } // if !fighter.is_situation(*SITUATION_KIND_GROUND) { // if !arg.get_bool() { @@ -103,7 +102,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFight 0.into() } -unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // // @@ -117,7 +116,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // // else block - // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + // special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); // } @@ -146,14 +145,14 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // else block - lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("lucas_special_n_hold"), Hash40::new("lucas_special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } 1.into() } -unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( +unsafe extern "C" fn special_n_hold_transition_g2a_kind( fighter: &mut L2CFighterCommon, mtrans_kind_work_id: i32, flag_work_id: i32, @@ -185,17 +184,7 @@ unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( fighter.on_flag(flag_work_id); } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, - lucas_special_n_pre, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, - lucas_special_n_hold_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, special_n_hold_main); } diff --git a/fighters/kirby/src/status/luigi_special_n.rs b/fighters/kirby/src/status/luigi_special_n.rs index 7ef435a619..3273ab44c2 100644 --- a/fighters/kirby/src/status/luigi_special_n.rs +++ b/fighters/kirby/src/status/luigi_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,12 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status/mario_special_n.rs b/fighters/kirby/src/status/mario_special_n.rs index 90ca697826..4c252e5903 100644 --- a/fighters/kirby/src/status/mario_special_n.rs +++ b/fighters/kirby/src/status/mario_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,12 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status/mariod_special_n.rs b/fighters/kirby/src/status/mariod_special_n.rs index 6282018850..852654ff8f 100644 --- a/fighters/kirby/src/status/mariod_special_n.rs +++ b/fighters/kirby/src/status/mariod_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,12 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status.rs b/fighters/kirby/src/status/mod.rs similarity index 82% rename from fighters/kirby/src/status.rs rename to fighters/kirby/src/status/mod.rs index c39a2ac38f..3c858fc6bf 100644 --- a/fighters/kirby/src/status.rs +++ b/fighters/kirby/src/status/mod.rs @@ -1,5 +1,7 @@ use super::*; use globals::*; +// status script import + mod special_hi_h; mod gaogaen_special_n; mod luigi_special_n; @@ -12,33 +14,10 @@ mod koopa_special_n; mod littlemac_special_n; mod diddy_special_n_cancel; mod lucas_special_n; -mod sonic; +mod sonic_special_n; mod edge_special_n; mod bayonetta_special_n_cancel; -extern "C" fn kirby_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(ganon_should_use_special_n_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(shoto_check_special_command as *const () as _)); - - if is_training_mode() { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,0); - } - else { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), LUCAS_CHARGE_TIME, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} - unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI) { false.into() @@ -81,7 +60,7 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L // FIGHTER_STATUS_KIND_JUMP // -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_FLAG_COPY) { if WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { @@ -246,31 +225,48 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { } } -pub fn install() { - special_hi_h::install(); - gaogaen_special_n::install(); - luigi_special_n::install(); - mario_special_n::install(); - mariod_special_n::install(); - ridley_special_n::install(); - ganon_special_n::install(); - ganon_special_n_float::install(); - koopa_special_n::install(); - littlemac_special_n::install(); - diddy_special_n_cancel::install(); - lucas_special_n::install(); - sonic::install(); - edge_special_n::install(); - bayonetta_special_n_cancel::install(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(ganon_should_use_special_n_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(shoto_check_special_command as *const () as _)); + + if is_training_mode() { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,0); + } + else { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), LUCAS_CHARGE_TIME, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_map_correction); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + + special_hi_h::install(agent); + gaogaen_special_n::install(agent); + luigi_special_n::install(agent); + mario_special_n::install(agent); + mariod_special_n::install(agent); + ridley_special_n::install(agent); + ganon_special_n::install(agent); + ganon_special_n_float::install(agent); + koopa_special_n::install(agent); + littlemac_special_n::install(agent); + diddy_special_n_cancel::install(agent); + lucas_special_n::install(agent); + sonic_special_n::install(agent); + edge_special_n::install(agent); - smashline::Agent::new("kirby") - .on_start(kirby_init) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status( - MapCorrection, - *FIGHTER_STATUS_KIND_THROW_KIRBY, - throw_kirby_map_correction, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .install(); + bayonetta_special_n_cancel::install(agent); } diff --git a/fighters/kirby/src/status/ridley_special_n.rs b/fighters/kirby/src/status/ridley_special_n.rs index 7a6e68de3e..8a8cd9b5d7 100644 --- a/fighters/kirby/src/status/ridley_special_n.rs +++ b/fighters/kirby/src/status/ridley_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); @@ -71,6 +72,7 @@ unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, return 0.into() } +// FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT /// Hold neutral special to explode unsafe extern "C" fn special_n_shoot_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -132,17 +134,7 @@ unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) } } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, - special_n_shoot_status_main, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, special_n_shoot_status_main); + } diff --git a/fighters/kirby/src/status/sonic.rs b/fighters/kirby/src/status/sonic_special_n.rs similarity index 90% rename from fighters/kirby/src/status/sonic.rs rename to fighters/kirby/src/status/sonic_special_n.rs index e62972b1d3..0dcd135d47 100644 --- a/fighters/kirby/src/status/sonic.rs +++ b/fighters/kirby/src/status/sonic_special_n.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn main_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N + +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { hash40("special_n_start") } @@ -94,7 +94,9 @@ unsafe extern "C" fn special_n_main_loop2(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub unsafe extern "C" fn pre_special_n_homing_start(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START + +pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let blast_attack = VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK); let ret = smashline::original_status(Pre, fighter, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N)(fighter); @@ -102,17 +104,7 @@ pub unsafe extern "C" fn pre_special_n_homing_start(fighter: &mut L2CFighterComm ret } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, - main_special_n, - ) - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, - pre_special_n_homing_start, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, special_n_main); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, special_n_homing_start_pre); } diff --git a/fighters/kirby/src/status/special_hi_h.rs b/fighters/kirby/src/status/special_hi_h.rs index 50382ce11c..a1d77d847a 100644 --- a/fighters/kirby/src/status/special_hi_h.rs +++ b/fighters/kirby/src/status/special_hi_h.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::kirby::SPECIAL_HI_H unsafe extern "C" fn special_hi_h_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -67,10 +68,8 @@ unsafe extern "C" fn special_hi_h_end(fighter: &mut L2CFighterCommon) -> L2CValu return 0.into() } -pub fn install() { - Agent::new("kirby") - .status(Pre, statuses::kirby::SPECIAL_HI_H, special_hi_h_pre) - .status(Main, statuses::kirby::SPECIAL_HI_H, special_hi_h_main) - .status(End, statuses::kirby::SPECIAL_HI_H, special_hi_h_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::kirby::SPECIAL_HI_H, special_hi_h_pre); + agent.status(Main, statuses::kirby::SPECIAL_HI_H, special_hi_h_main); + agent.status(End, statuses::kirby::SPECIAL_HI_H, special_hi_h_end); } diff --git a/fighters/koopa/src/acmd/aerials.rs b/fighters/koopa/src/acmd/aerials.rs index 72262a5a16..c4888bfc47 100644 --- a/fighters/koopa/src/acmd/aerials.rs +++ b/fighters/koopa/src/acmd/aerials.rs @@ -1,327 +1,325 @@ use super::*; -unsafe extern "C" fn koopa_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.5); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); for _ in 0..2 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 03, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 03, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 3, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 3, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); } wait(lua_state, 5.0); } - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter,1.2); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent,1.2); } } -unsafe extern "C" fn koopa_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_koopa_attackair_l01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_koopa_attackair_l01")); } } -unsafe extern "C" fn koopa_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 7); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 7); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 50.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn koopa_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 14.25, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 361, 75, 0, 50, 6.5, 6.0, 0.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 11.0, 14.25, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 361, 75, 0, 50, 6.5, 6.0, 0.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.25); - FT_MOTION_RATE_RANGE(fighter, 14.25, 16.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.25, 16.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopa_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), 0, 16, 4, -1, 16, -107, 1.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), 0, 16, 4, -1, 16, -107, 1.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn koopa_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 8.5, 0.0, 8.5, -14.0, Some(0.0), Some(8.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 8.5, 0.0, 8.5, -14.0, Some(0.0), Some(8.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 8.5, 0.0, 8.5, -11.0, Some(0.0), Some(8.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 8.5, 0.0, 8.5, -11.0, Some(0.0), Some(8.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopa_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn koopa_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 9.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 17.0, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 80, 90, 0, 45, 7.5, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + FT_MOTION_RATE_RANGE(agent, 8.0, 17.0, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 80, 90, 0, 45, 7.5, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopa_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1.5, 14.5, 2, -153, 90, -49, 1.5, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1.5, 14.5, 2, -153, 90, -49, 1.5, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } -unsafe extern "C" fn koopa_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn koopa_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 9.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 49.0, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 0, 30, 9.0, 0.0, 1.0, -1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 17.0, 49.0, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 0, 30, 9.0, 0.0, 1.0, -1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 90, 0, 60, 9.75, 0.0, 1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 90, 0, 60, 9.75, 0.0, 1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopa_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_atk_fall"), Hash40::new("top"), 0, 2.5, 0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_atk_fall"), Hash40::new("top"), 0, 2.5, 0, 0, 0, 0, 0.65, true); } frame(lua_state, 52.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_atk_fall"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_atk_fall"), false, false); } } -unsafe extern "C" fn koopa_landing_air_lw_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"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attackairn", koopa_attack_air_n_game) - .acmd("effect_attackairn", koopa_attack_air_n_effect) - .acmd("sound_attackairn", koopa_attack_air_n_sound) - .acmd("expression_attackairn", koopa_attack_air_n_expression) - .acmd("game_attackairf", koopa_attack_air_f_game) - .acmd("effect_attackairf", koopa_attack_air_f_effect) - .acmd("game_attackairb", koopa_attack_air_b_game) - .acmd("expression_attackairb", koopa_attack_air_b_expression) - .acmd("game_attackairhi", koopa_attack_air_hi_game) - .acmd("effect_attackairhi", koopa_attack_air_hi_effect) - .acmd("expression_attackairhi", koopa_attack_air_hi_expression) - .acmd("game_attackairlw", koopa_attack_air_lw_game) - .acmd("effect_attackairlw", koopa_attack_air_lw_effect) - .acmd("game_landingairlw", koopa_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/koopa/src/acmd/ground.rs b/fighters/koopa/src/acmd/ground.rs index 44ea21704c..5138a5d6bb 100644 --- a/fighters/koopa/src/acmd/ground.rs +++ b/fighters/koopa/src/acmd/ground.rs @@ -1,175 +1,170 @@ use super::*; -unsafe extern "C" fn koopa_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 3.5, 0.0, 11.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 4.0, 0.0, 8.6, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 18, 0, 25, 4.5, 0.0, 8.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 3.5, 0.0, 11.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 4.0, 0.0, 8.6, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 18, 0, 25, 4.5, 0.0, 8.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn koopa_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 14, -2, 10, -20, 0, 1.4, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 14, -2, 10, -20, 0, 1.4, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 16, -6, 10, -20, 0, 1.8, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 16, -6, 10, -20, 0, 1.8, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.7); } } -unsafe extern "C" fn koopa_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 5.0, 6.0, 0.0, -0.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 3.5, -5.0, 1.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 5.0, 6.0, 0.0, -0.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 3.5, -5.0, 1.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn koopa_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 21, -10, 25, 10, 0, 1.4, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 21, -10, 25, 10, 0, 1.4, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 23, -4, 25, 10, 0, 1.7, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 25, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 23, -4, 25, 10, 0, 1.7, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 25, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn koopa_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.7); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.7); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 14.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 14.0, 4.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 70, 0, 80, 6.0, 3.5, -0.6, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 80, 70, 0, 85, 5.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 80, 70, 0, 85, 4.5, 0.0, 4.0, 4.5, Some(0.0), Some(7.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 70, 0, 80, 6.0, 3.5, -0.6, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 80, 70, 0, 85, 5.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 80, 70, 0, 85, 4.5, 0.0, 4.0, 4.5, Some(0.0), Some(7.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopa_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), -2, 20, 5.5, 19, -8, -52, 1.6, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("koopa_scratch"), false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), -2, 20, 5.5, 19, -8, -52, 1.6, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + EffectModule::set_visible_kind(boma, Hash40::new("koopa_scratch"), false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4, 13, -30, 0, 0, 0, 2.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4, 13, -30, 0, 0, 0, 2.5, true); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 16.0); - if is_excute(fighter) { - EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("koopa_scratch"), true); + if is_excute(agent) { + EffectModule::set_visible_kind(boma, Hash40::new("koopa_scratch"), true); } frame(lua_state, 17.0); - if is_excute(fighter) { - if PostureModule::lr(fighter.module_accessor) > 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,140,0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,140,0.9, 0, 0, 0, 0, 0, 0, false); } else{ - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,-140,0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,-140,0.9, 0, 0, 0, 0, 0, 0, false); } - LAST_EFFECT_SET_RATE(fighter,1.5); + LAST_EFFECT_SET_RATE(agent,1.5); } } -unsafe extern "C" fn koopa_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = app::sv_math::rand(hash40("fighter"), 3) == 0; if play_vc { - PLAY_SE(fighter, Hash40::new("vc_koopa_attack07")); + PLAY_SE(agent, Hash40::new("vc_koopa_attack07")); } } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_smash_l02")); } - } -unsafe extern "C" fn koopa_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attack11", koopa_attack_11_game) - .acmd("effect_attack11", koopa_attack_11_effect) - .acmd("game_attack12", koopa_attack_12_game) - .acmd("effect_attack12", koopa_attack_12_effect) - .acmd("game_attackdash", koopa_attack_dash_game) - .acmd("effect_attackdash", koopa_attack_dash_effect) - .acmd("sound_attackdash", koopa_attack_dash_sound) - .acmd("expression_attackdash", koopa_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/koopa/src/acmd/mod.rs b/fighters/koopa/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/koopa/src/acmd/mod.rs +++ b/fighters/koopa/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/koopa/src/acmd/other.rs b/fighters/koopa/src/acmd/other.rs index fcd6ca9b5b..5c5f4ef0f2 100644 --- a/fighters/koopa/src/acmd/other.rs +++ b/fighters/koopa/src/acmd/other.rs @@ -1,265 +1,127 @@ 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_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(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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_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_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn koopa_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, 14.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 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_koopa_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_koopa_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, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); } } -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); - } -} - -unsafe extern "C" fn koopa_breath_max_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - //let mut halflife=30.0; - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 16.0, 55, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(weapon.module_accessor); - //halflife = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE) as f32 /2.0; - } - frame(lua_state, 11.0); - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 12.0, 55, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(weapon.module_accessor); - } -} - -unsafe extern "C" fn koopa_breath_max_effect(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - for _ in 0..100 { - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(weapon, Hash40::new("koopa_breath_m_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - wait(lua_state, 15.0); - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - } - wait(lua_state, 15.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn koopa_breath_end_game(weapon: &mut L2CAgentBase) { - frame(weapon.lua_state_agent, 1.0); - if is_excute(weapon) { - notify_event_msc_cmd!(weapon, Hash40::new_raw(0x199c462b5d)); - } -} +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("expression_landingheavy", expression_landingheavy); -unsafe extern "C" fn koopa_breath_end_effect(weapon: &mut L2CAgentBase) { - let lr = PostureModule::lr(weapon.module_accessor); - let pos = *PostureModule::pos(weapon.module_accessor); - EffectModule::req( - weapon.module_accessor, - Hash40::new("sys_damage_fire"), - &Vector3f{x: pos.x + 4.0*lr, y: pos.y, z:pos.z}, - &Vector3f::zero(), - 2.0, - 0, - -1, - false, - 0 - ); -} + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_dash", sound_dash); -pub fn install() { - smashline::Agent::new("koopa") - .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("expression_landingheavy", expression_landingheavy) - .acmd("game_turndash", koopa_turn_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("koopa_breath") - .acmd("game_max", koopa_breath_max_game) - .acmd("effect_max", koopa_breath_max_effect) - .acmd("game_end", koopa_breath_end_game) - .acmd("effect_end", koopa_breath_end_effect) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/koopa/src/acmd/smashes.rs b/fighters/koopa/src/acmd/smashes.rs index 02c9cfeeba..d4328c5099 100644 --- a/fighters/koopa/src/acmd/smashes.rs +++ b/fighters/koopa/src/acmd/smashes.rs @@ -1,241 +1,239 @@ use super::*; -unsafe extern "C" fn koopa_attack_s4_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(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) { let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_explosion_sign"), Hash40::new("haver"), &Vector3f::zero(), &Vector3f::zero(), 0.75, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER, eff_handle as u64); + VarModule::set_int64(agent.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER, eff_handle as u64); } frame(lua_state, 2.0); for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, 20, 0, 8, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, 20, 0, 8, 0, 0, 0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 6, 3, 6, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 6, 3, 6, 0, 0, 0, true, *EF_FLIP_YZ); } } } -unsafe extern "C" fn koopa_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 22.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::koopa::status::PUNCH_CAN_ZOOM); - let excellent = VarModule::is_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::koopa::status::PUNCH_CAN_ZOOM); + let excellent = VarModule::is_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); let damage = if excellent { 2.5 } else { 0.0 }; let attr = if excellent { Hash40::new("collision_attr_magic") } else { Hash40::new("collision_attr_normal") }; let sound = if excellent { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 8.0, 0.0, 8.5, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 6.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 8.0, 0.0, 8.5, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 6.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 40.0, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - SlowModule::clear_whole(fighter.module_accessor); - CameraModule::reset_all(fighter.module_accessor); - CAM_ZOOM_OUT(fighter); + FT_MOTION_RATE_RANGE(agent, 26.0, 40.0, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + SlowModule::clear_whole(boma); + CameraModule::reset_all(boma); + CAM_ZOOM_OUT(agent); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 85.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 85.0, 36.0); frame(lua_state, 85.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 12, 15, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 12, 15, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 13, -20, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); - let eff_handle = VarModule::get_int64(fighter.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 13, -20, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); + let eff_handle = VarModule::get_int64(agent.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER); EffectModule::set_scale(boma, eff_handle as u32, &Vector3f::zero()); - EFFECT_OFF_KIND(fighter,Hash40::new("sys_explosion_sign"), false, false); + EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 10, -26, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 10, -26, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handr"), 3, 0, 0, 0, 0, 0, 1.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("handr"), 3, 0, 0, 0, 0, 0, 1.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } frame(lua_state, 26.0); - if is_excute(fighter) { - SlowModule::clear_whole(fighter.module_accessor); - CameraModule::reset_all(fighter.module_accessor); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); + if is_excute(agent) { + SlowModule::clear_whole(boma); + CameraModule::reset_all(boma); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); } } -unsafe extern "C" fn koopa_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_nailswing02")); - PLAY_SE(fighter, Hash40::new("vc_koopa_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_nailswing02")); + PLAY_SE(agent, Hash40::new("vc_koopa_attack06")); } frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_smash_h01")); } } -unsafe extern "C" fn koopa_attack_s4_expression(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_attacks4(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); } frame(lua_state, 4.0); app::sv_animcmd::execute(lua_state, 4.0); if !WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK){ - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - let excellent = VarModule::is_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + let excellent = VarModule::is_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); if excellent { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_finish"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_finish"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackll"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackll"), 0); } } frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn koopa_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 8.0, 0.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 8.0, 0.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn koopa_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 40, 90, 0, 56, 6.0, 0.0, 0.0, 1.0, Some(5.3), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.5, 40, 90, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.5, 40, 90, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 40, 90, 0, 56, 6.0, 0.0, 0.0, 1.0, Some(5.3), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.5, 40, 90, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.5, 40, 90, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 27.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 27.0, 9.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 15.0, 40, 96, 0, 56, 6.0, 0.0, -0.6, 0.5, Some(4.5), Some(-0.6), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.5, 40, 96, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.5, 40, 96, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 15.0, 40, 96, 0, 56, 6.0, 0.0, -0.6, 0.5, Some(4.5), Some(-0.6), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 40, 96, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.5, 40, 96, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("effect_attacks4charge", koopa_attack_s4_hold_effect) - .acmd("game_attacks4", koopa_attack_s4_game) - .acmd("effect_attacks4", koopa_attack_s4_effect) - .acmd("sound_attacks4", koopa_attack_s4_sound) - .acmd("expression_attacks4", koopa_attack_s4_expression) - .acmd("game_attackhi4", koopa_attack_hi4_game) - .acmd("game_attacklw4", koopa_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopa/src/acmd/specials.rs b/fighters/koopa/src/acmd/specials.rs index df3c9872b1..d691a6846f 100644 --- a/fighters/koopa/src/acmd/specials.rs +++ b/fighters/koopa/src/acmd/specials.rs @@ -1,621 +1,650 @@ use super::*; -unsafe extern "C" fn koopa_special_n_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); +unsafe extern "C" fn effect_specialairnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn koopa_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 31.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 31.0, 16.0); } -unsafe extern "C" fn koopa_special_n_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 42.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 42.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); } frame(lua_state, 42.0); - FT_MOTION_RATE_RANGE(fighter, 42.0, 65.0, 21.0); + FT_MOTION_RATE_RANGE(agent, 42.0, 65.0, 21.0); frame(lua_state, 65.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_special_n_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - if fighter.is_motion(Hash40::new("special_n_max")){ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + if agent.is_motion(Hash40::new("special_n_max")){ + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } frame(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter,2.0,0.5,0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_explosion_sign"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("jaw"), 3, 1, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("jaw"), 3, 1, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_breath_m_fire"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("koopa_wait_breath"), Hash40::new("head"), -1.5, 3, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.8, 0.8); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_breath_m_fire"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("koopa_wait_breath"), Hash40::new("head"), -1.5, 3, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.8, 0.8); } frame(lua_state, 42.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_wait_breath"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_wait_breath"), false, false); } - } -unsafe extern "C" fn koopa_special_n_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); - PLAY_SE(fighter, Hash40::new("vc_koopa_furasleep")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + PLAY_SE(agent, Hash40::new("vc_koopa_furasleep")); } frame(lua_state, 21.0); - if is_excute(fighter) { - if fighter.is_motion(Hash40::new("special_n_max")) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_koopa_step_left_m")); + if is_excute(agent) { + if agent.is_motion(Hash40::new("special_n_max")) { + PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); } } frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_m_damage")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_koopa_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_koopa_attack06")); } } -unsafe extern "C" fn koopa_special_n_max_expression(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); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialnmax(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); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn koopa_special_s_squat_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 1, 2, 0, 0, 0, 0.8, false); +unsafe extern "C" fn effect_specialssquat(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 1, 2, 0, 0, 0, 0.8, false); } } -unsafe extern "C" fn koopa_special_s_throwlw_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 23, 16); + frame(lua_state, 18.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwlw_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 2.2, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter,0.8); + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 2.2, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent,0.8); } } -unsafe extern "C" fn koopa_special_s_throwlw_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_heavy_hit_m")); + wait(lua_state, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_heavy_hit_m")); } } -unsafe extern "C" fn koopa_special_s_throwlw_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowlw(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); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } -unsafe extern "C" fn koopa_special_s_throwf_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 23, 16); + frame(lua_state, 18.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwf_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn koopa_special_s_throwf_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + wait(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn koopa_special_s_throwf_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowf(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); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -unsafe extern "C" fn koopa_special_s_throwb_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 15); + frame(lua_state, 18.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); + CHECK_FINISH_CAMERA(agent, 20, 15); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + frame(lua_state, 19.0); + if is_excute(agent) { + REVERSE_LR(agent); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwb_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(fighter.lua_state_agent, 22.0); - if is_excute(fighter) { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + frame(lua_state, 22.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn koopa_special_s_throwb_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + wait(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn koopa_special_s_throwb_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowb(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); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -unsafe extern "C" fn koopa_special_s_jump_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, -1.0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, -1.0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn koopa_special_s_jump_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_s03")); +unsafe extern "C" fn sound_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_s03")); } - frame(fighter.lua_state_agent, 35.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_s04")); + frame(lua_state, 35.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_s04")); } } -unsafe extern "C" fn koopa_special_s_fall_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); +unsafe extern "C" fn effect_specialsfall(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn koopa_special_s_landing_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); } - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { + frame(lua_state, 1.0); + if is_excute(agent) { //CHECK_FINISH_CAMERA(fighter, 3, 9); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: -9.0, z: 0.0}); } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } - frame(fighter.lua_state_agent, 10.0); - FT_MOTION_RATE_RANGE(fighter,10.0,14.0,8.0); - frame(fighter.lua_state_agent, 14.0); - FT_MOTION_RATE_RANGE(fighter,14.0,26.0,16.0); - frame(fighter.lua_state_agent, 26.0); - FT_MOTION_RATE(fighter,1.0) + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent,10.0,14.0,8.0); + frame(lua_state, 14.0); + FT_MOTION_RATE_RANGE(agent,14.0,26.0,16.0); + frame(lua_state, 26.0); + FT_MOTION_RATE(agent,1.0) } -unsafe extern "C" fn koopa_special_s_landing_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialslanding(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn koopa_special_s_landing_sound(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_koopa_special_s04")); - PLAY_STATUS(fighter, Hash40::new("se_koopa_special_s05")); +unsafe extern "C" fn sound_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_koopa_special_s04")); + PLAY_STATUS(agent, Hash40::new("se_koopa_special_s05")); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); } - frame(fighter.lua_state_agent, 26.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); + frame(lua_state, 26.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); } } -unsafe extern "C" fn koopa_special_s_landing_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 23.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(lua_state, 23.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn koopa_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::set_consider_ground_friction(boma, true, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } - } -unsafe extern "C" fn koopa_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //crate::sv_animcmd::FT_DISABLE_CURRY_FACE(fighter, true); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 7); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 7); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 76.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn koopa_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 3.5, Some(0.0), Some(9.0), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 3.5, Some(0.0), Some(9.0), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } for _ in 0..10 { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 20, 0, 50, 4.3, 0.0, 9.5, 4.0, Some(0.0), Some(9.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 20, 0, 50, 4.3, 0.0, 9.5, 4.0, Some(0.0), Some(9.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 180, 0, 50, 5.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-4.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 180, 0, 50, 5.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-4.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1); } - } -unsafe extern "C" fn koopa_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 60, 0, 4.0, 0.0, 1.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 60, 0, 2.0, 0.0, 0.5, 22.5, Some(0.0), Some(9.5), Some(22.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 90, 100, 60, 0, 4.0, 0.0, 2.5, 13.0, Some(0.0), Some(7.5), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 60, 0, 4.0, 0.0, 1.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 60, 0, 2.0, 0.0, 0.5, 22.5, Some(0.0), Some(9.5), Some(22.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 90, 100, 60, 0, 4.0, 0.0, 2.5, 13.0, Some(0.0), Some(7.5), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_LW_FLAG1); } frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } - } -unsafe extern "C" fn koopa_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_LW_FLAG1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - } - -} - -pub fn install() { - smashline::Agent::new("koopa") - .acmd("effect_specialnstart", koopa_special_n_start_effect) - .acmd("effect_specialairnstart", koopa_special_n_start_effect) - .acmd("game_specialnend", koopa_special_n_end_game) - .acmd("game_specialairnend", koopa_special_n_end_game) - .acmd("game_specialnmax", koopa_special_n_max_game) - .acmd("game_specialairnmax", koopa_special_n_max_game) - .acmd("effect_specialnmax", koopa_special_n_max_effect) - .acmd("effect_specialairnmax", koopa_special_n_max_effect) - .acmd("sound_specialnmax", koopa_special_n_max_sound) - .acmd("sound_specialairnmax", koopa_special_n_max_sound) - .acmd("expression_specialnmax", koopa_special_n_max_expression) - .acmd("expression_specialairnmax", koopa_special_n_max_expression) - .acmd("effect_specialssquat", koopa_special_s_squat_effect) - .acmd("effect_specialairssquat", koopa_special_s_squat_effect) - .acmd("game_specialsthrowlw", koopa_special_s_throwlw_game) - .acmd("effect_specialsthrowlw", koopa_special_s_throwlw_effect) - .acmd("sound_specialsthrowlw", koopa_special_s_throwlw_sound) - .acmd("expression_specialsthrowlw", koopa_special_s_throwlw_expression) - .acmd("game_specialsthrowf", koopa_special_s_throwf_game) - .acmd("game_specialairsthrowf", koopa_special_s_throwf_game) - .acmd("effect_specialsthrowf", koopa_special_s_throwf_effect) - .acmd("effect_specialairsthrowf", koopa_special_s_throwf_effect) - .acmd("sound_specialsthrowf", koopa_special_s_throwf_sound) - .acmd("sound_specialairsthrowf", koopa_special_s_throwf_sound) - .acmd("expression_specialsthrowf", koopa_special_s_throwf_expression) - .acmd("expression_specialairsthrowf", koopa_special_s_throwf_expression) - .acmd("game_specialsthrowb", koopa_special_s_throwb_game) - .acmd("game_specialairsthrowb", koopa_special_s_throwb_game) - .acmd("effect_specialsthrowb", koopa_special_s_throwb_effect) - .acmd("effect_specialairsthrowb", koopa_special_s_throwb_effect) - .acmd("sound_specialsthrowb", koopa_special_s_throwb_sound) - .acmd("sound_specialairsthrowb", koopa_special_s_throwb_sound) - .acmd("expression_specialsthrowb", koopa_special_s_throwb_expression) - .acmd("expression_specialairsthrowb", koopa_special_s_throwb_expression) - .acmd("effect_specialsjump", koopa_special_s_jump_effect) - .acmd("sound_specialsjump", koopa_special_s_jump_sound) - .acmd("effect_specialsfall", koopa_special_s_fall_effect) - .acmd("game_specialslanding", koopa_special_s_landing_game) - .acmd("effect_specialslanding", koopa_special_s_landing_effect) - .acmd("sound_specialslanding", koopa_special_s_landing_sound) - .acmd("expression_specialslanding", koopa_special_s_landing_expression) - .acmd("game_specialhi", koopa_special_hi_game) - .acmd("expression_specialhi", koopa_special_hi_expression) - .acmd("game_specialairhi", koopa_special_air_hi_game) - .acmd("game_speciallw", koopa_special_lw_game) - .acmd("game_specialairlw", koopa_special_air_lw_game) - .install(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specialnstart", effect_specialairnstart); + agent.acmd("effect_specialairnstart", effect_specialairnstart); + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnmax", game_specialnmax); + agent.acmd("game_specialairnmax", game_specialnmax); + agent.acmd("effect_specialnmax", effect_specialnmax); + agent.acmd("effect_specialairnmax", effect_specialnmax); + agent.acmd("sound_specialnmax", sound_specialairnmax); + agent.acmd("sound_specialairnmax", sound_specialairnmax); + agent.acmd("expression_specialnmax", expression_specialnmax); + agent.acmd("expression_specialairnmax", expression_specialnmax); + + agent.acmd("effect_specialssquat", effect_specialssquat); + agent.acmd("effect_specialairssquat", effect_specialssquat); + + agent.acmd("game_specialsthrowlw", game_specialsthrowlw); + agent.acmd("effect_specialsthrowlw", effect_specialsthrowlw); + agent.acmd("sound_specialsthrowlw", sound_specialsthrowlw); + agent.acmd("expression_specialsthrowlw", expression_specialsthrowlw); + + agent.acmd("game_specialsthrowf", game_specialsthrowf); + agent.acmd("game_specialairsthrowf", game_specialsthrowf); + agent.acmd("effect_specialsthrowf", effect_specialsthrowf); + agent.acmd("effect_specialairsthrowf", effect_specialsthrowf); + agent.acmd("sound_specialsthrowf", sound_specialsthrowf); + agent.acmd("sound_specialairsthrowf", sound_specialsthrowf); + agent.acmd("expression_specialsthrowf", expression_specialsthrowf); + agent.acmd("expression_specialairsthrowf", expression_specialsthrowf); + + agent.acmd("game_specialsthrowb", game_specialsthrowb); + agent.acmd("game_specialairsthrowb", game_specialsthrowb); + agent.acmd("effect_specialsthrowb", effect_specialsthrowb); + agent.acmd("effect_specialairsthrowb", effect_specialsthrowb); + agent.acmd("sound_specialsthrowb", sound_specialsthrowb); + agent.acmd("sound_specialairsthrowb", sound_specialsthrowb); + agent.acmd("expression_specialsthrowb", expression_specialsthrowb); + agent.acmd("expression_specialairsthrowb", expression_specialsthrowb); + + agent.acmd("effect_specialsjump", effect_specialsjump); + agent.acmd("sound_specialsjump", sound_specialsjump); + + agent.acmd("effect_specialsfall", effect_specialsfall); + + agent.acmd("game_specialslanding", game_specialslanding); + agent.acmd("effect_specialslanding", effect_specialslanding); + agent.acmd("sound_specialslanding", sound_specialslanding); + agent.acmd("expression_specialslanding", expression_specialslanding); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/koopa/src/acmd/throws.rs b/fighters/koopa/src/acmd/throws.rs index 4b14d0e7d7..ea49eadcba 100644 --- a/fighters/koopa/src/acmd/throws.rs +++ b/fighters/koopa/src/acmd/throws.rs @@ -1,165 +1,164 @@ use super::*; -unsafe extern "C" fn koopa_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 koopa_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 koopa_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 8.0, -5.0, Some(0.0), Some(8.0), Some(-21.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 8.0, -5.0, Some(0.0), Some(8.0), Some(-21.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 koopa_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 77, 189, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 77, 189, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 21.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 100, 0, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 100, 0, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 49.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 40, 100, 80, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 40, 100, 80, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 57.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.0, 0, 100, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.0, 0, 100, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 10.0, 0, 100, 0, 0, 9.6, -0.5, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 0, 100, 0, 0, 9.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 10.0, 0, 100, 0, 0, 9.6, -0.5, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 0, 100, 0, 0, 9.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 36.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 0); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_catch", koopa_catch_game) - .acmd("game_catchdash", koopa_catch_dash_game) - .acmd("game_catchturn", koopa_catch_turn_game) - .acmd("game_throwhi", koopa_throw_hi_game) - .acmd("game_throwlw", koopa_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopa/src/acmd/tilts.rs b/fighters/koopa/src/acmd/tilts.rs index 47763d117d..84a2f84c3f 100644 --- a/fighters/koopa/src/acmd/tilts.rs +++ b/fighters/koopa/src/acmd/tilts.rs @@ -1,132 +1,131 @@ use super::*; -unsafe extern "C" fn koopa_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 5.5, 5.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 78, 0, 46, 4.0, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 5.5, 5.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 78, 0, 46, 4.0, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopa_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 100, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 6.5, 7.3, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 100, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 6.5, 7.3, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 17.1, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.1, 4.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 17.1); - FT_MOTION_RATE_RANGE(fighter, 17.1, 19.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.1, 19.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 54.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 19.0, 54.0, 16.0); frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("colonellm"), 4.0, 361, 100, 50, 0, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 361, 100, 50, 0, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 130, 100, 30, 0, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("colonellm"), 4.0, 361, 100, 50, 0, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 361, 100, 50, 0, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 130, 100, 30, 0, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("colonellm"), 6.0, 80, 80, 0, 65, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 85, 80, 0, 65, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 90, 80, 0, 65, 5.6, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("colonellm"), 6.0, 80, 80, 0, 65, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 85, 80, 0, 65, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 90, 80, 0, 65, 5.6, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopa_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 6, true); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attacks3", koopa_attack_s3_game) - .acmd("game_attacks3hi", koopa_attack_s3_game) - .acmd("game_attacks3lw", koopa_attack_s3_game) - .acmd("game_attackhi3", koopa_attack_hi3_game) - .acmd("game_attacklw3", koopa_attack_lw3_game) - .acmd("expression_attacklw3", koopa_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs new file mode 100644 index 0000000000..e16f34224d --- /dev/null +++ b/fighters/koopa/src/breath/acmd.rs @@ -0,0 +1,66 @@ +use super::*; + +unsafe extern "C" fn game_max(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //let mut halflife=30.0; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 55, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + //halflife = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE) as f32 /2.0; + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn effect_max(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..100 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("koopa_breath_m_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + wait(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + } + wait(lua_state, 15.0); + } +} + +unsafe extern "C" fn game_end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_end(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + let lr = PostureModule::lr(boma); + let pos = *PostureModule::pos(boma); + EffectModule::req( + boma, + Hash40::new("sys_damage_fire"), + &Vector3f{x: pos.x + 4.0*lr, y: pos.y, z:pos.z}, + &Vector3f::zero(), + 2.0, + 0, + -1, + false, + 0 + ); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_max", game_max); + agent.acmd("effect_max", effect_max); + + agent.acmd("game_end", game_end); + agent.acmd("effect_end", effect_end); +} diff --git a/fighters/koopa/src/breath/mod.rs b/fighters/koopa/src/breath/mod.rs new file mode 100644 index 0000000000..e36620a4b2 --- /dev/null +++ b/fighters/koopa/src/breath/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("koopa_breath"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopa/src/breath/status.rs b/fighters/koopa/src/breath/status.rs new file mode 100644 index 0000000000..fb50932cbd --- /dev/null +++ b/fighters/koopa/src/breath/status.rs @@ -0,0 +1,104 @@ +use super::*; +use globals::*; + +// FIREBREATH +unsafe extern "C" fn breath_move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { + let boma = weapon.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let is_fireball = WorkModule::get_float(owner_boma,*FIGHTER_KOOPA_STATUS_BREATH_WORK_FLOAT_GENE_ANGLE) > 360.0; + if (!is_fireball){ + return smashline::original_status(Main, weapon, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE)(weapon); + } + else{ + WorkModule::set_customize_no(weapon.module_accessor, 1, 0); + PostureModule::set_scale(weapon.module_accessor, 1.0, false); + + MotionModule::change_motion( + weapon.module_accessor, + Hash40::new("max"), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + let param_life = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("life")) as i32; + WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE); + + let param_hit_decrease = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("hit_frames")) as i32; + WorkModule::set_int(weapon.module_accessor, param_hit_decrease, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); + + KineticModule::enable_energy(weapon.module_accessor, *WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL); + let lr = PostureModule::lr(weapon.module_accessor); + let param_speed = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("max_speed")); + WorkModule::set_float(weapon.module_accessor, param_speed, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_FLOAT_SPEED_MUL); + + sv_kinetic_energy!( + set_speed, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + param_speed * lr, + 0.0 + ); + sv_kinetic_energy!( + set_stable_speed, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + -1.0, + -1.0 + ); + sv_kinetic_energy!( + set_accel, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + 0.0, + 0.0 + ); + + weapon.global_table[SUB_STATUS].assign(&L2CValue::Ptr(breath_move_max_substatus as *const () as _)); + weapon.fastshift(L2CValue::Ptr(breath_move_max_main_loop as *const () as _)); + } + 0.into() +} + +unsafe extern "C" fn breath_move_max_substatus(weapon: &mut L2CWeaponCommon, param_3: L2CValue) -> L2CValue { + if param_3.get_bool() { + WorkModule::dec_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + 0.into() +} + +unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { + if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) + { + let param_hit_decrease = WorkModule::get_int(weapon.module_accessor, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); + WorkModule::sub_int(weapon.module_accessor, param_hit_decrease,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + let life = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); + if life <= 0 { + EFFECT_OFF_KIND(weapon,Hash40::new("koopa_breath_m_fire"),false,false); + EFFECT_OFF_KIND(weapon,Hash40::new("sys_damage_fire_fly"),false,false); + AttackModule::clear_all(weapon.module_accessor); + + MotionModule::change_motion( + weapon.module_accessor, + Hash40::new("end"), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + StatusModule::change_status_force(weapon.module_accessor, WEAPON_KOOPA_BREATH_STATUS_KIND_NONE.into(), false.into()); + return 0.into(); + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main); +} diff --git a/fighters/koopa/src/lib.rs b/fighters/koopa/src/lib.rs index e9c1171598..5d33410eeb 100644 --- a/fighters/koopa/src/lib.rs +++ b/fighters/koopa/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod breath; use smash::{ lib::{ @@ -37,11 +41,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub const MAX_COOLDOWN : i32 = 900; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("koopa"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + breath::install(); } \ No newline at end of file diff --git a/fighters/koopa/src/opff.rs b/fighters/koopa/src/opff.rs index d83b95b8d3..2157bfa29f 100644 --- a/fighters/koopa/src/opff.rs +++ b/fighters/koopa/src/opff.rs @@ -180,8 +180,6 @@ pub unsafe fn koopa_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("koopa") - .on_line(Main, koopa_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopa_frame_wrapper); } diff --git a/fighters/koopa/src/status.rs b/fighters/koopa/src/status.rs deleted file mode 100644 index 197edae913..0000000000 --- a/fighters/koopa/src/status.rs +++ /dev/null @@ -1,63 +0,0 @@ -use super::*; -use globals::*; - -mod special_n; -mod special_s; - -// AGENT INIT AND CALLBACKS -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - //Remove fireball ready effect - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE]) || !sv_information::is_ready_go() { - EFFECT_OFF_KIND(fighter,Hash40::new("koopa_breath_m_fire"),false,false); - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_EFFECT_ID,0); - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); - } - true.into() -} - -extern "C" fn koopa_init(fighter: &mut L2CFighterCommon) { - unsafe { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } -} - -unsafe extern "C" fn attack_s4_charge_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); - return smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD)(fighter); -} - -// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A - -pub unsafe extern "C" fn exec_special_hi_a(fighter: &mut L2CFighterCommon) -> L2CValue { - if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_FALL && fighter.global_table[PREV_STATUS_KIND] == FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - } - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET) { - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); - return 0.into() - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET); - } - } - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); - return 0.into() -} - -pub fn install() { - smashline::Agent::new("koopa") - .on_start(koopa_init) - .status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_charge_exit) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, exec_special_hi_a) - .install(); - - special_n::install(); - special_s::install(); -} \ No newline at end of file diff --git a/fighters/koopa/src/status/attack_s4_hold.rs b/fighters/koopa/src/status/attack_s4_hold.rs new file mode 100644 index 0000000000..5d0fd55890 --- /dev/null +++ b/fighters/koopa/src/status/attack_s4_hold.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + +unsafe extern "C" fn attack_s4_hold_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); + return smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_exit); +} \ No newline at end of file diff --git a/fighters/koopa/src/status/mod.rs b/fighters/koopa/src/status/mod.rs new file mode 100644 index 0000000000..40ab5e6ae5 --- /dev/null +++ b/fighters/koopa/src/status/mod.rs @@ -0,0 +1,33 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_s; +mod special_hi; +mod attack_s4_hold; + +// AGENT INIT AND CALLBACKS +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + //Remove fireball ready effect + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, + *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE]) || !sv_information::is_ready_go() { + EFFECT_OFF_KIND(fighter,Hash40::new("koopa_breath_m_fire"),false,false); + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_EFFECT_ID,0); + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + attack_s4_hold::install(agent); +} \ No newline at end of file diff --git a/fighters/koopa/src/status/special_hi.rs b/fighters/koopa/src/status/special_hi.rs new file mode 100644 index 0000000000..4518ed5935 --- /dev/null +++ b/fighters/koopa/src/status/special_hi.rs @@ -0,0 +1,29 @@ +use super::*; + +// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A + +pub unsafe extern "C" fn special_hi_a_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_FALL && fighter.global_table[PREV_STATUS_KIND] == FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + } + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET) { + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); + return 0.into() + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET); + } + } + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, special_hi_a_exec); +} \ No newline at end of file diff --git a/fighters/koopa/src/status/special_n.rs b/fighters/koopa/src/status/special_n.rs index 04081d467a..6817cbe432 100644 --- a/fighters/koopa/src/status/special_n.rs +++ b/fighters/koopa/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; @@ -89,111 +90,8 @@ unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CVa } } -// FIREBREATH -unsafe extern "C" fn breath_move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { - let boma = weapon.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let is_fireball = WorkModule::get_float(owner_boma,*FIGHTER_KOOPA_STATUS_BREATH_WORK_FLOAT_GENE_ANGLE) > 360.0; - if (!is_fireball){ - return smashline::original_status(Main, weapon, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE)(weapon); - } - else{ - WorkModule::set_customize_no(weapon.module_accessor, 1, 0); - PostureModule::set_scale(weapon.module_accessor, 1.0, false); - - MotionModule::change_motion( - weapon.module_accessor, - Hash40::new("max"), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - let param_life = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("life")) as i32; - WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE); - - let param_hit_decrease = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("hit_frames")) as i32; - WorkModule::set_int(weapon.module_accessor, param_hit_decrease, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); - - KineticModule::enable_energy(weapon.module_accessor, *WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL); - let lr = PostureModule::lr(weapon.module_accessor); - let param_speed = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("max_speed")); - WorkModule::set_float(weapon.module_accessor, param_speed, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_FLOAT_SPEED_MUL); - - sv_kinetic_energy!( - set_speed, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - param_speed * lr, - 0.0 - ); - sv_kinetic_energy!( - set_stable_speed, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - -1.0, - -1.0 - ); - sv_kinetic_energy!( - set_accel, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - 0.0, - 0.0 - ); - - weapon.global_table[SUB_STATUS].assign(&L2CValue::Ptr(breath_move_max_substatus as *const () as _)); - weapon.fastshift(L2CValue::Ptr(breath_move_max_main_loop as *const () as _)); - } - 0.into() -} - -unsafe extern "C" fn breath_move_max_substatus(weapon: &mut L2CWeaponCommon, param_3: L2CValue) -> L2CValue { - if param_3.get_bool() { - WorkModule::dec_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - 0.into() -} - -unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { - if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) - { - let param_hit_decrease = WorkModule::get_int(weapon.module_accessor, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); - WorkModule::sub_int(weapon.module_accessor, param_hit_decrease,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - let life = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); - if life <= 0 { - EFFECT_OFF_KIND(weapon,Hash40::new("koopa_breath_m_fire"),false,false); - EFFECT_OFF_KIND(weapon,Hash40::new("sys_damage_fire_fly"),false,false); - AttackModule::clear_all(weapon.module_accessor); - - MotionModule::change_motion( - weapon.module_accessor, - Hash40::new("end"), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - StatusModule::change_status_force(weapon.module_accessor, WEAPON_KOOPA_BREATH_STATUS_KIND_NONE.into(), false.into()); - return 0.into(); - } - - 0.into() -} - -pub fn install() { - smashline::Agent::new("koopa") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec) - .status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_execstop) - .install(); - smashline::Agent::new("koopa_breath") - .status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); + agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_execstop); } \ No newline at end of file diff --git a/fighters/koopa/src/status/special_s.rs b/fighters/koopa/src/status/special_s.rs index 62b591abf2..d38fb22264 100644 --- a/fighters/koopa/src/status/special_s.rs +++ b/fighters/koopa/src/status/special_s.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; +// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S pub const SPECIAL_S_KIND_F: i32 = 1; pub const SPECIAL_S_KIND_B: i32 = 2; @@ -195,7 +195,6 @@ unsafe extern "C" fn special_s_kinetic_exec(fighter: &mut L2CFighterCommon) { ); } } - } unsafe extern "C" fn specials_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -472,17 +471,15 @@ unsafe extern "C" fn specials_landing_exec(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("koopa") - .status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_main) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exec) - .status(Exit, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exit) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_init) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_exec) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_FALL, specials_fall_init) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_init) - .status(Pre, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_pre) - .status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_main) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_main); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exec); + agent.status(Exit, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exit); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_init); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_exec); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_FALL, specials_fall_init); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_init); + agent.status(Pre, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_pre); + agent.status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_main); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_exec); } \ No newline at end of file diff --git a/fighters/koopajr/src/acmd/aerials.rs b/fighters/koopajr/src/acmd/aerials.rs index e537420269..2b61b91351 100644 --- a/fighters/koopajr/src/acmd/aerials.rs +++ b/fighters/koopajr/src/acmd/aerials.rs @@ -1,216 +1,211 @@ - use super::*; -unsafe extern "C" fn koopajr_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.5/(6.0-1.0)); + FT_MOTION_RATE(agent, 2.5/(6.0-1.0)); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 19.0/(35.0-20.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 19.0/(35.0-20.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopajr_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 2.0/(4.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 11.0, 361, 105, 0, 33, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 3.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 11.0, 361, 105, 0, 33, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 3.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 8.0, 48, 102, 0, 33, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 8.0, 48, 102, 0, 33, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopajr_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); } - } -unsafe extern "C" fn koopajr_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(11.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(11.0-1.0)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); // f9 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 13.0, 361, 96, 0, 30, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 2.2, 0.0, 0.0, 0.0, Some(-6.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 5.0, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 13.0, 361, 96, 0, 30, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 2.2, 0.0, 0.0, 0.0, Some(-6.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 5.0, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); // f12 ingame - FT_MOTION_RATE(fighter, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 10.0, 361, 101, 0, 20, 5.2, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 10.0, 361, 101, 0, 20, 5.2, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.6); // f18 ingame - FT_MOTION_RATE(fighter, 20.0/(29.0-15.6)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(29.0-15.6)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); // f38 ingame - FT_MOTION_RATE(fighter, 0.833); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.833); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopajr_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_HAMMER, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("neck"), 9.0, 74, 115, 0, 50, 3.0, 1.5, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("neck"), 9.0, 74, 115, 0, 50, 3.0, 1.5, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn koopajr_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn koopajr_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 38.0/(60.0-15.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.2, 0.0, 4.0, -2.0, Some(0.0), Some(4.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.0, 0.0, -2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 38.0/(60.0-15.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.2, 0.0, 4.0, -2.0, Some(0.0), Some(4.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.0, 0.0, -2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 1, 8.0, false); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 68.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn koopajr_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attackairn", koopajr_attack_air_n_game) - .acmd("game_attackairf", koopajr_attack_air_f_game) - .acmd("game_landingairf", koopajr_landing_air_f_game) - .acmd("game_attackairb", koopajr_attack_air_b_game) - .acmd("game_attackairhi", koopajr_attack_air_hi_game) - .acmd("expression_attackairhi", koopajr_attack_air_hi_expression) - .acmd("game_attackairlw", koopajr_attack_air_lw_game) - .acmd("game_landingairlw", koopajr_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/koopajr/src/acmd/ground.rs b/fighters/koopajr/src/acmd/ground.rs index 5619f2f919..4d88651030 100644 --- a/fighters/koopajr/src/acmd/ground.rs +++ b/fighters/koopajr/src/acmd/ground.rs @@ -1,90 +1,87 @@ - use super::*; -unsafe extern "C" fn koopajr_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn koopajr_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.3, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.4, 0.0, 6.3, 12.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 4.0, 0.0, 6.3, 17.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.3, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.4, 0.0, 6.3, 12.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 4.0, 0.0, 6.3, 17.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn koopajr_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 30, 10, 0, 50, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 34, 10, 0, 45, 4.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 30, 10, 0, 50, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 34, 10, 0, 45, 4.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 32, 10, 0, 40, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 32, 10, 0, 40, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 80, 0, 85, 5.0, 0.0, 8.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue3"), 4.0, 75, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 80, 0, 85, 5.0, 0.0, 8.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue3"), 4.0, 75, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attack11", koopajr_attack_11_game) - .acmd("game_attack12", koopajr_attack_12_game) - .acmd("game_attackdash", koopajr_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/koopajr/src/acmd/mod.rs b/fighters/koopajr/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/koopajr/src/acmd/mod.rs +++ b/fighters/koopajr/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/koopajr/src/acmd/other.rs b/fighters/koopajr/src/acmd/other.rs index d501e6c8a2..868f543737 100644 --- a/fighters/koopajr/src/acmd/other.rs +++ b/fighters/koopajr/src/acmd/other.rs @@ -1,229 +1,149 @@ - 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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_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(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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_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_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } -unsafe extern "C" fn special_hi_jr_escape_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhijrescape(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")); - if !WorkModule::is_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE) { 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); } } else { 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("koopajr") - .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("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("game_specialhijrescape", special_hi_jr_escape_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("game_dash", game_dash); + 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("game_specialhijrescape", game_specialhijrescape); } diff --git a/fighters/koopajr/src/acmd/smashes.rs b/fighters/koopajr/src/acmd/smashes.rs index 31706507e3..767b68ebb9 100644 --- a/fighters/koopajr/src/acmd/smashes.rs +++ b/fighters/koopajr/src/acmd/smashes.rs @@ -1,187 +1,181 @@ - use super::*; -unsafe extern "C" fn koopajr_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 3.5, 16.0, Some(0.0), Some(7.5), Some(17.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 4.5, 9.1, Some(0.0), Some(9.0), Some(10.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 3.5, 16.0, Some(0.0), Some(7.5), Some(17.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 4.5, 9.1, Some(0.0), Some(9.0), Some(10.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 4.5, 16.5, Some(0.0), Some(6.5), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 4.5, 16.5, Some(0.0), Some(6.5), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 6.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 10.0, -5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 5.5, -7.0, Some(0.0), Some(5.5), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 10.0, -5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 5.5, -7.0, Some(0.0), Some(5.5), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 120, 100, 18, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 190, 100, 20, 0, 3.0, 0.0, 21.0, -4.0, Some(0.0), Some(19.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.3, 140, 100, 50, 0, 4.5, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 18, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.3, 190, 100, 20, 0, 3.0, 0.0, 21.0, -4.0, Some(0.0), Some(19.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.3, 140, 100, 50, 0, 4.5, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 120, 100, 35, 0, 5.0, 0.0, 19.0, -4.0, Some(0.0), Some(17.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 120, 100, 35, 0, 5.0, 0.0, 19.0, -4.0, Some(0.0), Some(17.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 173, 0, 38, 6.0, 0.0, 24.5, -4.0, Some(0.0), Some(22.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 173, 0, 38, 6.0, 0.0, 24.5, -4.0, Some(0.0), Some(22.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.588); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.588); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, 12.5, Some(0.0), Some(6.5), Some(12.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, -12.0, Some(0.0), Some(6.5), Some(-12.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 44, 82, 0, 41, 4.5, 0.0, 3.5, 0.0, Some(0.0), Some(4.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, 12.5, Some(0.0), Some(6.5), Some(12.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, -12.0, Some(0.0), Some(6.5), Some(-12.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 44, 82, 0, 41, 4.5, 0.0, 3.5, 0.0, Some(0.0), Some(4.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.880); + FT_MOTION_RATE(agent, 0.880); } - } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attacks4hi", koopajr_attack_s4_hi_game) - .acmd("game_attacks4", koopajr_attack_s4_s_game) - .acmd("game_attacks4lw", koopajr_attack_s4_lw_game) - .acmd("game_attackhi4", koopajr_attack_hi4_game) - .acmd("game_attacklw4", koopajr_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopajr/src/acmd/specials.rs b/fighters/koopajr/src/acmd/specials.rs index 837fb651bc..1d574dea9f 100644 --- a/fighters/koopajr/src/acmd/specials.rs +++ b/fighters/koopajr/src/acmd/specials.rs @@ -1,38 +1,10 @@ - use super::*; -/* #[acmd_script( agent = "koopajr_remainclown", script = "game_specialhiclownfall" , category = ACMD_GAME , low_priority)] -unsafe fn koopajr_remainclown_special_hi_clownfall_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - frame(lua_state, 5.0); - if is_excute(weapon) { - ATTACK(weapon,0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE) - } -} - -#[acmd_script( agent = "koopajr_remainclown", script = "game_specialairhiclownfall" , category = ACMD_GAME , low_priority)] -unsafe fn koopajr_remainclown_special_air_hi_clownfall_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - frame(lua_state, 5.0); - if is_excute(weapon) { - ATTACK(weapon,0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE) - } - for _ in 0..30 { - wait(lua_state, 1.0); - if is_excute(weapon) { - } - } -} */ - -// ATTACK(weapon,0, 0, Hash40::new("top"), 13.0, 55, 70, 0, 85, 14.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB) - -unsafe extern "C" fn koopajr_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnshoot(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) { if ArticleModule::is_exist(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_CANNONBALL) { WorkModule::on_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL); } @@ -42,168 +14,146 @@ unsafe extern "C" fn koopajr_special_n_shoot_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_special_n_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { - EFFECT(fighter, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } else { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } } } -unsafe extern "C" fn koopajr_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { - ArticleModule::generate_article(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MECHAKOOPA, false, 0); - VarModule::on_flag(fighter.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); - } - } -} - -unsafe extern "C" fn koopajr_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn koopajr_special_s_spin_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 361, 65, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 361, 65, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn koopajr_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn koopajr_special_air_s_spin_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 361, 70, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 361, 70, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_NORMAL_GRAVITY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn koopajr_cannonball_hop_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let mut keep_hitbox = false; - - if WorkModule::is_flag(weapon.module_accessor, *WEAPON_KOOPAJR_CANNONBALL_INSTANCE_WORK_ID_FLAG_HIT_WALL) { - keep_hitbox = true; - PostureModule::reverse_lr(boma); - } - if is_excute(weapon) { - ATTACK(weapon,0,0,Hash40::new("top"),1.0,48,52,0,90,3.8,0.0,0.0,0.0,None,None,None,1.0,0.0,*ATTACK_SETOFF_KIND_THRU,*ATTACK_LR_CHECK_F,false,8,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_L,*COLLISION_SOUND_ATTR_PUNCH,*ATTACK_REGION_OBJECT); - } - frame(lua_state, 1.0); - if is_excute(weapon) { - if !keep_hitbox { - AttackModule::clear_all(boma); - } - } -} - -unsafe extern "C" fn game_specialhijrrise(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhijrrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_HI_SHOOT_FLAG_ACTION); } frame(lua_state, 13.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 game_specialhijrfall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhijrfall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { + ArticleModule::generate_article(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MECHAKOOPA, false, 0); + VarModule::on_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); + } } } -pub fn install() { - smashline::Agent::new("koopajr_cannonball") - .acmd("game_hop", koopajr_cannonball_hop_game) - .install(); - smashline::Agent::new("koopajr") - .acmd("game_specialnshoot", koopajr_special_n_shoot_game) - .acmd("game_specialairnshoot", koopajr_special_n_shoot_game) - .acmd("effect_specialnshoot", koopajr_special_n_shoot_effect) - .acmd("game_speciallw", koopajr_special_lw_game) - .acmd("game_specialairlw", koopajr_special_lw_game) - .acmd("game_specials", koopajr_special_s_game) - .acmd("game_specialsspin", koopajr_special_s_spin_game) - .acmd("game_specialairs", koopajr_special_air_s_game) - .acmd("game_specialairsspin", koopajr_special_air_s_spin_game) - .acmd("game_specialhijrrise", game_specialhijrrise) - .acmd("game_specialhijrfall", game_specialhijrfall) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("effect_specialnshoot", effect_specialnshoot); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsspin", game_specialsspin); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsspin", game_specialairsspin); + + agent.acmd("game_specialhijrrise", game_specialhijrrise); + agent.acmd("game_specialhijrfall", game_specialhijrfall); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/koopajr/src/acmd/throws.rs b/fighters/koopajr/src/acmd/throws.rs index 8061f75ede..a35eb65cc7 100644 --- a/fighters/koopajr/src/acmd/throws.rs +++ b/fighters/koopajr/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn koopajr_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 7.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.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(14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 koopajr_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -47,7 +46,7 @@ unsafe extern "C" fn koopajr_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -67,62 +66,62 @@ unsafe extern "C" fn koopajr_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 85, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 85, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 10); + CHECK_FINISH_CAMERA(agent, 20, 10); } frame(lua_state, 24.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn koopajr_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MAGICHAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 361, 100, 30, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_catch_only_all(fighter.module_accessor, true, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 361, 100, 30, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 50.0); - FT_MOTION_RATE_RANGE(fighter, 50.0, 78.0, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(fighter.module_accessor); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + FT_MOTION_RATE_RANGE(agent, 50.0, 78.0, 14.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 78.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_catch", koopajr_catch_game) - .acmd("game_catchdash", koopajr_catch_dash_game) - .acmd("game_catchturn", koopajr_catch_turn_game) - .acmd("game_throwb", koopajr_throw_b_game) - .acmd("game_throwlw", koopajr_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopajr/src/acmd/tilts.rs b/fighters/koopajr/src/acmd/tilts.rs index f80f63aa75..a75e9374df 100644 --- a/fighters/koopajr/src/acmd/tilts.rs +++ b/fighters/koopajr/src/acmd/tilts.rs @@ -1,118 +1,112 @@ - use super::*; -unsafe extern "C" fn koopajr_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 5.0, 8.5, 0.0, 0.0, Some(10.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 95, 75, 0, 90, 4.5, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 5.0, 8.5, 0.0, 0.0, Some(10.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 95, 75, 0, 90, 4.5, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn koopajr_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 6.0, 30, 60, 0, 77, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 5.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 6.0, 30, 60, 0, 77, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 5.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attacks3hi", koopajr_attack_s3_hi_game) - .acmd("game_attacks3", koopajr_attack_s3_s_game) - .acmd("game_attacks3lw", koopajr_attack_s3_lw_game) - .acmd("game_attackhi3", koopajr_attack_hi3_game) - .acmd("game_attacklw3", koopajr_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/koopajr/src/cannonball/acmd.rs b/fighters/koopajr/src/cannonball/acmd.rs new file mode 100644 index 0000000000..b0db2a6ff5 --- /dev/null +++ b/fighters/koopajr/src/cannonball/acmd.rs @@ -0,0 +1,25 @@ +use super::*; + +unsafe extern "C" fn game_hop(weapon: &mut L2CAgentBase) { + let lua_state = weapon.lua_state_agent; + let boma = weapon.boma(); + let mut keep_hitbox = false; + + if WorkModule::is_flag(weapon.module_accessor, *WEAPON_KOOPAJR_CANNONBALL_INSTANCE_WORK_ID_FLAG_HIT_WALL) { + keep_hitbox = true; + PostureModule::reverse_lr(boma); + } + if is_excute(weapon) { + ATTACK(weapon,0,0,Hash40::new("top"),1.0,48,52,0,90,3.8,0.0,0.0,0.0,None,None,None,1.0,0.0,*ATTACK_SETOFF_KIND_THRU,*ATTACK_LR_CHECK_F,false,8,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_L,*COLLISION_SOUND_ATTR_PUNCH,*ATTACK_REGION_OBJECT); + } + frame(lua_state, 1.0); + if is_excute(weapon) { + if !keep_hitbox { + AttackModule::clear_all(boma); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hop", game_hop); +} diff --git a/fighters/koopajr/src/cannonball/mod.rs b/fighters/koopajr/src/cannonball/mod.rs new file mode 100644 index 0000000000..842d91ff86 --- /dev/null +++ b/fighters/koopajr/src/cannonball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("koopajr_cannonball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopajr/src/lib.rs b/fighters/koopajr/src/lib.rs index 5537dac979..7b7974cbe1 100644 --- a/fighters/koopajr/src/lib.rs +++ b/fighters/koopajr/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod cannonball; +mod remainclown; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("koopajr"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + cannonball::install(); + remainclown::install(); } \ No newline at end of file diff --git a/fighters/koopajr/src/opff.rs b/fighters/koopajr/src/opff.rs index dcc467dcdf..fb44cd92f8 100644 --- a/fighters/koopajr/src/opff.rs +++ b/fighters/koopajr/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { if status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_N_HOLD { if frame > 16.0 { @@ -139,36 +138,6 @@ pub unsafe fn koopajr_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn koopajr_weapon_remainclown_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - if StatusModule::status_kind(boma) == *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_FALL - && AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - StatusModule::change_status_request_from_script(boma, *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_BURST, true); - } - } -} - -pub extern "C" fn koopajr_weapon_frame_wrapper(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - koopajr_weapon_frame(weapon) - } -} - -pub unsafe fn koopajr_weapon_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - //if let Some(info) = WeaponFrameInfo::weapon_update_and_get(weapon) { - // - //} -} - -pub fn install() { - smashline::Agent::new("koopajr") - .on_line(Main, koopajr_frame_wrapper) - .install(); - smashline::Agent::new("koopajr_remainclown") - .on_line(Main, koopajr_weapon_remainclown_frame) - .install(); - smashline::Agent::new("koopajr_cannonball") - .on_line(Main, koopajr_weapon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopajr_frame_wrapper); } diff --git a/fighters/koopajr/src/remainclown/mod.rs b/fighters/koopajr/src/remainclown/mod.rs new file mode 100644 index 0000000000..117f0d9088 --- /dev/null +++ b/fighters/koopajr/src/remainclown/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod opff; + +pub fn install() { + let agent = &mut Agent::new("koopajr_remainclown"); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopajr/src/remainclown/opff.rs b/fighters/koopajr/src/remainclown/opff.rs new file mode 100644 index 0000000000..2a161e8f20 --- /dev/null +++ b/fighters/koopajr/src/remainclown/opff.rs @@ -0,0 +1,18 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn koopajr_weapon_remainclown_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + if StatusModule::status_kind(boma) == *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_FALL + && AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + StatusModule::change_status_request_from_script(boma, *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_BURST, true); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopajr_weapon_remainclown_frame); +} diff --git a/fighters/koopajr/src/status.rs b/fighters/koopajr/src/status.rs deleted file mode 100644 index ea4bb8a732..0000000000 --- a/fighters/koopajr/src/status.rs +++ /dev/null @@ -1,53 +0,0 @@ -use super::*; - -mod special_s_jump; - -mod special_hi_escape; -mod special_hi_damage; - - -// Prevents sideB from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::koopajr::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -// Re-enables the ability to use sideB when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::koopajr::instance::DISABLE_SPECIAL_S); - } - true.into() -} - -extern "C" fn koopajr_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_KOOPAJR { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn koopajr_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() -} - -pub fn install() { - special_s_jump::install(); - special_hi_escape::install(); - special_hi_damage::install(); - smashline::Agent::new("koopajr") - .on_start(koopajr_init) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end) - .install(); -} \ No newline at end of file diff --git a/fighters/koopajr/src/status/mod.rs b/fighters/koopajr/src/status/mod.rs new file mode 100644 index 0000000000..b3984ef4a5 --- /dev/null +++ b/fighters/koopajr/src/status/mod.rs @@ -0,0 +1,41 @@ +use super::*; +use globals::*; +// status script import + +mod special_s_jump; +mod special_hi_escape; +mod special_hi_damage; +mod rebirth; + +// Prevents sideB from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::koopajr::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +// Re-enables the ability to use sideB when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::koopajr::instance::DISABLE_SPECIAL_S); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s_jump::install(agent); + special_hi_escape::install(agent); + special_hi_damage::install(agent); + rebirth::install(agent); +} \ No newline at end of file diff --git a/fighters/koopajr/src/status/rebirth.rs b/fighters/koopajr/src/status/rebirth.rs new file mode 100644 index 0000000000..5c3ecc9e75 --- /dev/null +++ b/fighters/koopajr/src/status/rebirth.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn koopajr_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end); +} \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_hi_damage.rs b/fighters/koopajr/src/status/special_hi_damage.rs index 040570b760..98931276fb 100644 --- a/fighters/koopajr/src/status/special_hi_damage.rs +++ b/fighters/koopajr/src/status/special_hi_damage.rs @@ -1,7 +1,4 @@ use super::*; -use globals::*; -// status script import - // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END @@ -21,8 +18,6 @@ pub unsafe extern "C" fn special_hi_damage_end_main(fighter: &mut L2CFighterComm 1.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Main, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END, special_hi_damage_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END, special_hi_damage_end_main); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_hi_escape.rs b/fighters/koopajr/src/status/special_hi_escape.rs index 73b8ec961a..104d76b9bd 100644 --- a/fighters/koopajr/src/status/special_hi_escape.rs +++ b/fighters/koopajr/src/status/special_hi_escape.rs @@ -1,17 +1,12 @@ use super::*; -use globals::*; -// status script import - -// FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE // +// FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE -pub unsafe extern "C" fn pre_special_hi_escape(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_escape_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_ESCAPE_AIR); return 1.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, pre_special_hi_escape) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, special_hi_escape_pre); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_s_jump.rs b/fighters/koopajr/src/status/special_s_jump.rs index 109267b312..6e659b85af 100644 --- a/fighters/koopajr/src/status/special_s_jump.rs +++ b/fighters/koopajr/src/status/special_s_jump.rs @@ -1,7 +1,4 @@ use super::*; -use globals::*; -// status script import - // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP @@ -14,8 +11,6 @@ pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Init, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/aerials.rs b/fighters/krool/src/acmd/aerials.rs index ff57b697c4..02b3974db6 100644 --- a/fighters/krool/src/acmd/aerials.rs +++ b/fighters/krool/src/acmd/aerials.rs @@ -1,235 +1,234 @@ use super::*; -unsafe extern "C" fn krool_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 93, 0, 40, 9.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 93, 0, 40, 9.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 120, 0, 13, 8.5, 0.8, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 120, 0, 13, 8.5, 0.8, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn krool_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 6.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 6.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 11.5, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 10.5, 12.0, Some(0.0), Some(7.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 11.5, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 10.5, 12.0, Some(0.0), Some(7.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 30, 4.7, 0.0, 15.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 85, 0, 30, 6.0, 0.0, 11.0, 6.0, Some(0.0), Some(8.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 30, 4.7, 0.0, 15.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 85, 0, 30, 6.0, 0.0, 11.0, 6.0, Some(0.0), Some(8.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn krool_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.867); + FT_MOTION_RATE(agent, 0.867); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("armr"), 19.0, 270, 80, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 19.0, 270, 80, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 19.0, 270, 58, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 19.0, 270, 58, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn krool_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn krool_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 13, -1, 180, 0, 239, 1.8, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 13, -1, 180, 0, 239, 1.8, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn krool_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - SET_SPEED_EX(fighter, 0, 2.1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 85, 60, 0, 84, 8.6, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + SET_SPEED_EX(agent, 0, 2.1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 85, 60, 0, 84, 8.6, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 52, 0, 85, 6.2, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 52, 0, 85, 6.2, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 95.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 krool_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 7.0, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.5, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.0, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 7.0, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.5, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.0, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn krool_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -2, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -2, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 18, 0, 90, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_COLOR(fighter, 3, 0.4, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 21.5, 0, 90, 0, 0, 1.8, true, *EF_FLIP_YZ, 1); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 18, 0, 90, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_COLOR(agent, 3, 0.4, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 21.5, 0, 90, 0, 0, 1.8, true, *EF_FLIP_YZ, 1); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -6, 0, 0, 0, 0, 2.3, false, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -6, 0, 0, 0, 0, 2.3, false, 1); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attackairn", krool_attack_air_n_game) - .acmd("game_attackairf", krool_attack_air_f_game) - .acmd("game_attackairb", krool_attack_air_b_game) - .acmd("expression_attackairb", krool_attack_air_b_expression) - .acmd("effect_attackairb", krool_attack_air_b_effect) - .acmd("game_attackairhi", krool_attack_air_hi_game) - .acmd("game_attackairlw", krool_attack_air_lw_game) - .acmd("effect_attackairlw", krool_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/krool/src/acmd/ground.rs b/fighters/krool/src/acmd/ground.rs index 24394a6532..734a278411 100644 --- a/fighters/krool/src/acmd/ground.rs +++ b/fighters/krool/src/acmd/ground.rs @@ -1,22 +1,22 @@ use super::*; -unsafe extern "C" fn krool_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(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) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 7.0, 8.5, 8.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.8, 0.0, 10.2, 18.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.8, 0.0, 10.2, 18.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); // Jab lock Hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 30, 0, 20 , 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 30, 0, 20 , 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } @@ -24,67 +24,67 @@ unsafe extern "C" fn krool_attack_11_game(fighter: &mut L2CAgentBase) { //WorkModule::on_flag(FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART) } -unsafe extern "C" fn krool_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 8.0, 8.0, 8.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 9.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 9.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 8.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 5.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 5.5, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 8.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 5.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 5.5, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn krool_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - 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); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("krool_scratch"), Hash40::new("krool_scratch"), Hash40::new("top"), 0, 13, 13, -8, 60, -127, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP_ALPHA(agent, Hash40::new("krool_scratch"), Hash40::new("krool_scratch"), Hash40::new("top"), 0, 13, 13, -8, 60, -127, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); } } -unsafe extern "C" fn krool_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(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) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 10.0, 10.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 6.0, 0.0, 11.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 6.0, 0.0, 11.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_13_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -104,63 +104,61 @@ unsafe extern "C" fn krool_attack_13_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 45, 70, 0, 60, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 45, 70, 0, 60, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } wait(lua_state, 2.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 45, 48, 0, 80, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 45, 48, 0, 80, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); JostleModule::set_status(boma, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attack11", krool_attack_11_game) - .acmd("game_attack12", krool_attack_12_game) - .acmd("effect_attack12", krool_attack_12_effect) - .acmd("game_attack13", krool_attack_13_game) - .acmd("effect_attack13", krool_attack_13_effect) - .acmd("game_attackdash", krool_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/krool/src/acmd/mod.rs b/fighters/krool/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/krool/src/acmd/mod.rs +++ b/fighters/krool/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/other.rs b/fighters/krool/src/acmd/other.rs index c87c0e3ec6..0e6ac06f4e 100644 --- a/fighters/krool/src/acmd/other.rs +++ b/fighters/krool/src/acmd/other.rs @@ -1,263 +1,163 @@ - 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_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_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(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_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_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_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) - && !fighter.is_status(*FIGHTER_STATUS_KIND_JUMP_SQUAT) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) + && !agent.is_status(*FIGHTER_STATUS_KIND_JUMP_SQUAT) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_krool_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_krool_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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 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); - } -} - -unsafe extern "C" fn krool_ironball_shoot_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"), 13.0, 60, 92, 0, 18, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn krool_ironball_spit_shoot_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"), 17.0, 60, 87, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn krool_appeal_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } } -unsafe extern "C" fn krool_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 43, 30, 0, 3.5, 0.0, 3.5, -8.5, Some(0.0), Some(3.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 43, 30, 0, 3.5, 0.0, 3.5, -8.5, Some(0.0), Some(3.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("krool_ironball") - .acmd("game_shoot", krool_ironball_shoot_game) - .acmd("game_spitshoot", krool_ironball_spit_shoot_game) - .install(); - smashline::Agent::new("krool") - .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("expression_landingheavy", expression_landingheavy) - .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("game_appealsl", krool_appeal_s_game) - .acmd("game_appealsr", krool_appeal_s_game) - .acmd("game_appeallwr", krool_appeal_lw_game) - .acmd("game_appeallwl", krool_appeal_lw_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("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_dash", game_dash); + 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("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("game_appeallwl", game_appeallw); } diff --git a/fighters/krool/src/acmd/smashes.rs b/fighters/krool/src/acmd/smashes.rs index d25cc5fdbf..ccd5feb0e3 100644 --- a/fighters/krool/src/acmd/smashes.rs +++ b/fighters/krool/src/acmd/smashes.rs @@ -1,167 +1,164 @@ use super::*; -unsafe extern "C" fn krool_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } - ATTACK(fighter, 1, 1, Hash40::new("bust"), 17.0, 83, 90, 0, 31, 8.0, 7.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 1, Hash40::new("bust"), 17.0, 83, 90, 0, 31, 8.0, 7.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("bust"), 8.0, 83, 84, 0, 32, 6.5, 7.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("bust"), 8.0, 83, 84, 0, 32, 6.5, 7.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 8.0, 361, 45, 0, 60, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 8.0, 361, 45, 0, 60, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 3.0, 290, 5, 0, 80, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 3.0, 290, 5, 0, 80, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 3.0, 361, 20, 0, 30, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 3.0, 361, 20, 0, 30, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 5.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 2.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 5.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 2.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let top_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; ModelModule::joint_global_position(boma, Hash40::new("top"), top_pos, false); let hip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; @@ -174,70 +171,70 @@ unsafe extern "C" fn krool_attack_lw4_game(fighter: &mut L2CAgentBase) { &Vector2f::zero(), ground, true).is_null() { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, -1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 4.5, -2.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 11.0, -6.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, -1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 4.5, -2.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 11.0, -6.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 7.5, 10.5, Some(0.0), Some(7.5), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 7.5, 10.5, Some(0.0), Some(7.5), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 85, 30, 0, 80, 6.0, 0.0, 5.0, 15.5, Some(0.0), Some(5.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 85, 30, 0, 80, 6.0, 0.0, 5.0, 15.5, Some(0.0), Some(5.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 35, 3, 90, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 35, 3, 90, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true, 0.4); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attacks4hi", krool_attack_s4_hi_game) - .acmd("game_attacks4", krool_attack_s4_s_game) - .acmd("game_attacks4lw", krool_attack_s4_lw_game) - .acmd("game_attackhi4", krool_attack_hi4_game) - .acmd("game_attacklw4", krool_attack_lw4_game) - .acmd("effect_attacklw4", krool_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/krool/src/acmd/specials.rs b/fighters/krool/src/acmd/specials.rs index 0882c86db0..b22fa6505f 100644 --- a/fighters/krool/src/acmd/specials.rs +++ b/fighters/krool/src/acmd/specials.rs @@ -1,229 +1,227 @@ use super::*; use std::convert::TryInto; -unsafe extern "C" fn krool_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 25.0, 16.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); + FT_MOTION_RATE_RANGE(agent, 1.0, 25.0, 16.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if boma.is_button_on(Buttons::AttackRaw) || boma.is_button_on(Buttons::Guard) { - VarModule::on_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); + VarModule::on_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); } } frame(lua_state, 26.0); - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - FT_MOTION_RATE_RANGE(fighter, 26.0, 37.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + FT_MOTION_RATE_RANGE(agent, 26.0, 37.0, 1.0); } else { - FT_MOTION_RATE_RANGE(fighter, 26.0, 30.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 26.0, 30.0, 5.0); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } } frame(lua_state, 37.0); - FT_MOTION_RATE_RANGE(fighter, 37.0, 70.0, 30.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 37.0, 70.0, 30.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } - } -unsafe extern "C" fn krool_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 31.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT(fighter, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn krool_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n08")); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n07")); + PLAY_SE(agent, Hash40::new("se_krool_special_n07")); } - else if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n01")); + else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + PLAY_SE(agent, Hash40::new("se_krool_special_n01")); } } frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n09")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n09")); } } -unsafe extern "C" fn krool_special_n_fire_expression(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_specialnfire(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); ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); } - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 89.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn krool_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - CATCH(fighter, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(18.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 9.5, 10.7, Some(0.0), Some(9.5), Some(20.5), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 160, 100, 50, 0, 9.0, 0.0, 9.0, 22.0, Some(0.0), Some(9.0), Some(27.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + CATCH(agent, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(18.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 9.5, 10.7, Some(0.0), Some(9.5), Some(20.5), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 160, 100, 50, 0, 9.0, 0.0, 9.0, 22.0, Some(0.0), Some(9.0), Some(27.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } else { - SEARCH(fighter, 0, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(60.0), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true); + SEARCH(agent, 0, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(60.0), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true); } } - } -unsafe extern "C" fn krool_special_n_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); +unsafe extern "C" fn effect_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 2.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.75); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); } } wait(lua_state, 10.0); } -unsafe extern "C" fn krool_special_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 180); + if is_excute(agent) { + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 180); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 0.0, 361, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 0.0, 361, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_CROWN, false, 0); VisibilityModule::set_int64(boma, Hash40::new("crown").hash as i64, Hash40::new("crown_hide").hash as i64); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn krool_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); for _ in 0..50 { wait(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn krool_special_hi_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_h02")); } } -unsafe extern "C" fn krool_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK) { - if fighter.is_motion(Hash40::new("special_air_hi")) { + if agent.is_motion(Hash40::new("special_air_hi")) { ArticleModule::change_motion(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, Hash40::new("fly_air"), false, 0.0); } else { ArticleModule::change_motion(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, Hash40::new("fly"), false, 0.0); @@ -232,246 +230,192 @@ unsafe extern "C" fn krool_special_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn krool_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_krool_special_h01")); - PLAY_SE(fighter, Hash40::new("se_common_swing_08")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_krool_special_h01")); + PLAY_SE(agent, Hash40::new("se_common_swing_08")); } } -unsafe extern "C" fn krool_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jet"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let charge = (VarModule::get_int(boma.object(), vars::krool::instance::SPECIAL_HI_FUEL)); if charge >= 35 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn krool_backpack_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack_start"), Hash40::new("backpack"), 0, 5, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - -} - -unsafe extern "C" fn krool_backpack_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let krool = utils::util::get_battle_object_from_accessor(owner_boma); - let damage = 3.0 + (VarModule::get_int(krool, vars::krool::instance::SPECIAL_HI_FUEL) as f32 * 0.158).clamp(0.0, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("wingl1"), damage, 80, 30, 0, 90, 4.5, 2.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn krool_backpack_effect_fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - -} - -unsafe extern "C" fn krool_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); } frame(lua_state, 7.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 - && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 + && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { - let damage = VarModule::get_float(fighter.battle_object, vars::krool::instance::STORED_DAMAGE) / 5.0; - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0 + damage, 50, 90, 0, 50, 10.5, 0.0, 10.75, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + let damage = VarModule::get_float(agent.battle_object, vars::krool::instance::STORED_DAMAGE) / 5.0; + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0 + damage, 50, 90, 0, 50, 10.5, 0.0, 10.75, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 69, 90, 0, 70, 9.0, 0.0, 10.0, 4.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 69, 90, 0, 70, 9.0, 0.0, 10.0, 4.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { AttackModule::clear_all(boma); } } frame(lua_state, 33.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn krool_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_success_body"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_success_body_l"), true, true); - EFFECT(fighter, Hash40::new("krool_counter_success"), Hash40::new("top"), 0, 3.25, 0.75, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_success_body"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_success_body_l"), true, true); + EFFECT(agent, Hash40::new("krool_counter_success"), Hash40::new("top"), 0, 3.25, 0.75, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - let charged = VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + if is_excute(agent) { + let charged = VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 12, 6, 0, 0, 0, 0.9, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 12, 6, 0, 0, 0, 0.9, false); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack_body_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack"), Hash40::new("top"), 6, 12, 15, -90, 30, 0, 0.4, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack_body_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack"), Hash40::new("top"), 6, 12, 15, -90, 30, 0, 0.4, false); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack2"), Hash40::new("top"), 6, 12, 4, 0, 25, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack2"), Hash40::new("top"), 6, 12, 4, 0, 25, 0, 1, false); } } else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack_body"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack"), Hash40::new("top"), -6, 12, 15, -90, -30, 0, 0.4, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack_body"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack"), Hash40::new("top"), -6, 12, 15, -90, -30, 0, 0.4, false); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack2"), Hash40::new("top"), -6, 12, 4, 0, -25, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack2"), Hash40::new("top"), -6, 12, 4, 0, -25, 0, 1, false); } } } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_attack2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_attack2"), false, true); } } -unsafe extern "C" fn krool_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l01")); - PLAY_SE(fighter, Hash40::new("vc_krool_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_l01")); + PLAY_SE(agent, Hash40::new("vc_krool_special_l01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_smash_h01")); - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l02")); - PLAY_SE(fighter, Hash40::new("se_krool_special_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_smash_h01")); + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + PLAY_SE(agent, Hash40::new("se_krool_special_l02")); + PLAY_SE(agent, Hash40::new("se_krool_special_l05")); } } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_l03")); } } -unsafe extern "C" fn krool_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -pub fn install() { - smashline::Agent::new("krool_backpack") - .acmd("effect_start", krool_backpack_start_effect) - .acmd("game_fly", krool_backpack_fly_game) - .acmd("game_flywind", krool_backpack_fly_game) - .acmd("effect_fly", krool_backpack_effect_fly) - .install(); - smashline::Agent::new("krool") - .acmd("game_specialnfire", krool_special_n_fire_game) - .acmd("game_specialairnfire", krool_special_n_fire_game) - .acmd("effect_specialnfire", krool_special_n_fire_effect) - .acmd("effect_specialairnfire", krool_special_n_fire_effect) - .acmd("sound_specialnfire", krool_special_n_fire_sound) - .acmd("sound_specialairnfire", krool_special_n_fire_sound) - .acmd("expression_specialnfire", krool_special_n_fire_expression) - .acmd("expression_specialairnfire", krool_special_n_fire_expression) - .acmd("game_specialnloop", krool_special_n_loop_game) - .acmd("game_specialairnloop", krool_special_n_loop_game) - .acmd("effect_specialnloop", krool_special_n_loop_effect) - .acmd("effect_specialairnloop", krool_special_n_loop_effect) - .acmd("game_specialsthrow", krool_special_special_s_game) - .acmd("game_specialairsthrow", krool_special_special_s_game) - .acmd("effect_specialhistart", krool_special_hi_start_effect) - .acmd("sound_specialhistart", krool_special_hi_start_sound) - .acmd("sound_specialairhistart", krool_special_hi_start_sound) - .acmd("game_specialhi", krool_special_hi_game) - .acmd("effect_specialhi", krool_special_hi_effect) - .acmd("sound_specialhi", krool_special_hi_sound) - .acmd("expression_specialhi", krool_special_hi_expression) - .acmd("game_speciallw", krool_special_lw_game) - .acmd("game_specialairlw", krool_special_lw_game) - .acmd("effect_speciallw", krool_special_lw_effect) - .acmd("effect_specialairlw", krool_special_lw_effect) - .acmd("sound_speciallw", krool_special_lw_sound) - .acmd("sound_specialairlw", krool_special_lw_sound) - .acmd("expression_speciallw", krool_special_lw_expression) - .acmd("expression_specialairlw", krool_special_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialnfire", sound_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialnfire); + agent.acmd("expression_specialnfire", expression_specialnfire); + agent.acmd("expression_specialairnfire", expression_specialnfire); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnloop", game_specialnloop); + agent.acmd("effect_specialnloop", effect_specialnloop); + agent.acmd("effect_specialairnloop", effect_specialnloop); + + agent.acmd("game_specialsthrow", game_specials); + agent.acmd("game_specialairsthrow", game_specials); + + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("sound_specialhistart", sound_specialhistart); + agent.acmd("sound_specialairhistart", sound_specialhistart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/throws.rs b/fighters/krool/src/acmd/throws.rs index 37db3c4b14..1868957b9e 100644 --- a/fighters/krool/src/acmd/throws.rs +++ b/fighters/krool/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn krool_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.4, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(15.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.4, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(15.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 krool_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn krool_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -64,205 +63,209 @@ unsafe extern "C" fn krool_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 1.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 1.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 6.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 50, 0, 70, 6.0, 0.0, 3.0, 21.0, Some(0.0), Some(3.0), Some(23.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 6.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 7.0, 361, 50, 0, 70, 6.0, 0.0, 3.0, 21.0, Some(0.0), Some(3.0), Some(23.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 24, 0); + CHECK_FINISH_CAMERA(agent, 24, 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn krool_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 35, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 35, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 31, 2); + CHECK_FINISH_CAMERA(agent, 31, 2); } frame(lua_state, 32.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn krool_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 90, 50, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 90, 50, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - CHECK_FINISH_CAMERA(fighter, 3, 10); + CHECK_FINISH_CAMERA(agent, 3, 10); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO));; + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO));; } frame(lua_state, 55.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_GROUND); - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_GROUND); + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND); } } -unsafe extern "C" fn krool_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 270, 30, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 270, 30, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: 6.868900}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); //WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KROOL_STATUS_THROW_LW_FLAG_BURY); } frame(lua_state, 54.0); { - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } } -unsafe extern "C" fn krool_special_n_spit_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnspitf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT_TYPE_DECIDE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 38.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 38.0, 16.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); } } -unsafe extern "C" fn krool_special_n_spit_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnspitb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 50.0, 23.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 50.0, 23.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_catch", krool_catch_game) - .acmd("game_catchdash", krool_catch_dash_game) - .acmd("game_catchturn", krool_catch_turn_game) - .acmd("game_throwf", krool_throw_f_game) - .acmd("game_throwb", krool_throw_b_game) - .acmd("game_throwhi", krool_throw_hi_game) - .acmd("game_throwlw", krool_throw_lw_game) - .acmd("game_specialnspitf", krool_special_n_spit_f_game) - .acmd("game_specialairnspitf", krool_special_n_spit_f_game) - .acmd("game_specialnspitb", krool_special_n_spit_b_game) - .acmd("game_specialairnspitb", krool_special_n_spit_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_specialnspitf", game_specialnspitf); + agent.acmd("game_specialairnspitf", game_specialnspitf); + + agent.acmd("game_specialnspitb", game_specialnspitb); + agent.acmd("game_specialairnspitb", game_specialnspitb); } diff --git a/fighters/krool/src/acmd/tilts.rs b/fighters/krool/src/acmd/tilts.rs index 6cddbcd10e..95479495ce 100644 --- a/fighters/krool/src/acmd/tilts.rs +++ b/fighters/krool/src/acmd/tilts.rs @@ -1,340 +1,335 @@ - use super::*; -unsafe extern "C" fn krool_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 7.0, 14.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 7.0, 14.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn krool_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 11, 5, 30, -49, -19, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 10, 5, -15, -48, -124, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 11, 5, 30, -49, -19, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 10, 5, -15, -48, -124, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 6, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 6, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s01")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s02")); - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s02")); + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } wait(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_attackhard_s02")); - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s03")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_attackhard_s02")); + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s03")); } } -unsafe extern "C" fn krool_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 2.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 2.0, 5.0); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 4.0, 2.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + FT_MOTION_RATE_RANGE(agent, 2.0, 4.0, 2.0); + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 4.0, 2.2, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0 + damage, 84, 63, 0, 76, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 5.0, 7.5, 2.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 4.0, 2.2, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0 + damage, 84, 63, 0, 76, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 5.0, 7.5, 2.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.05 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, 2.2, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0 + damage, 84, 49, 0, 60, 5.0, 7.0, 2.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, 2.2, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0 + damage, 84, 49, 0, 60, 5.0, 7.0, 2.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 38.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 38.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn krool_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_h01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } wait(lua_state, 1.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_attackhard_h01")); - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_h02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_attackhard_h01")); + PLAY_SE(agent, Hash40::new("se_krool_attackhard_h02")); } } -unsafe extern "C" fn krool_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); // ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0 + damage, 270, 35, 0, 100, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0 + damage, 270, 35, 0, 100, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // air-only - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0 + damage, 361, 85, 0, 40, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, shieldstun); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0 + damage, 361, 85, 0, 40, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, shieldstun); } frame(lua_state, 14.0); - if is_excute(fighter) { - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.05 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); // ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 100, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0 + damage, 85, 25, 0, 100, 5.0, 0.0, 3.5, 10.0, Some(0.0), Some(3.5), Some(23.0), hitlag * 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 100, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0 + damage, 85, 25, 0, 100, 5.0, 0.0, 3.5, 10.0, Some(0.0), Some(3.5), Some(23.0), hitlag * 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 30, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 30, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 2, shieldstun); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 2, shieldstun); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn krool_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_l01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_l02")); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attacks3hi", krool_attack_s3_hi_game) - .acmd("effect_attacks3hi", krool_attack_s3_hi_effect) - .acmd("game_attacks3", krool_attack_s3_s_game) - .acmd("effect_attacks3", krool_attack_s3_effect) - .acmd("game_attacks3lw", krool_attack_s3_lw_game) - .acmd("effect_attacks3lw", krool_attack_s3_lw_effect) - .acmd("sound_attacks3hi", krool_attack_s3_sound) - .acmd("sound_attacks3", krool_attack_s3_sound) - .acmd("sound_attacks3lw", krool_attack_s3_sound) - .acmd("game_attackhi3", krool_attack_hi3_game) - .acmd("sound_attackhi3", krool_attack_hi3_sound) - .acmd("game_attacklw3", krool_attack_lw3_game) - .acmd("effect_attacklw3", krool_attack_lw3_effect) - .acmd("sound_attacklw3", krool_attack_lw3_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("sound_attacks3hi", sound_attacks3); + agent.acmd("sound_attacks3", sound_attacks3); + agent.acmd("sound_attacks3lw", sound_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); } diff --git a/fighters/krool/src/backpack/acmd.rs b/fighters/krool/src/backpack/acmd.rs new file mode 100644 index 0000000000..e0f164ed88 --- /dev/null +++ b/fighters/krool/src/backpack/acmd.rs @@ -0,0 +1,54 @@ +use super::*; + +unsafe extern "C" fn effect_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack_start"), Hash40::new("backpack"), 0, 5, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let krool = utils::util::get_battle_object_from_accessor(owner_boma); + let damage = 3.0 + (VarModule::get_int(krool, vars::krool::instance::SPECIAL_HI_FUEL) as f32 * 0.158).clamp(0.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("wingl1"), damage, 80, 30, 0, 90, 4.5, 2.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_start", effect_start); + agent.acmd("game_fly", game_fly); + agent.acmd("game_flywind", game_fly); + agent.acmd("effect_fly", effect_fly); +} \ No newline at end of file diff --git a/fighters/krool/src/backpack/mod.rs b/fighters/krool/src/backpack/mod.rs new file mode 100644 index 0000000000..1f86844df9 --- /dev/null +++ b/fighters/krool/src/backpack/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("krool_backpack"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/krool/src/ironball/acmd.rs b/fighters/krool/src/ironball/acmd.rs new file mode 100644 index 0000000000..9a02f76aef --- /dev/null +++ b/fighters/krool/src/ironball/acmd.rs @@ -0,0 +1,24 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 60, 92, 0, 18, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_spitshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 87, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 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_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_spitshoot", game_spitshoot); +} \ No newline at end of file diff --git a/fighters/krool/src/ironball/mod.rs b/fighters/krool/src/ironball/mod.rs new file mode 100644 index 0000000000..24b84d67ab --- /dev/null +++ b/fighters/krool/src/ironball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("krool_ironball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/krool/src/lib.rs b/fighters/krool/src/lib.rs index 443a84d310..c02ac04ea8 100644 --- a/fighters/krool/src/lib.rs +++ b/fighters/krool/src/lib.rs @@ -2,6 +2,19 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod opff; +pub mod status; + +// articles + +mod backpack; +mod ironball; + +pub mod vtable_hook; +pub use status::krool_belly_damage_hook_impl; + use smash::{ lib::{ L2CValue, @@ -31,20 +44,20 @@ use utils::{ ext::*, consts::*, }; - use smashline::*; -pub mod acmd; -pub mod status; -pub mod opff; -pub mod vtable_hook; -pub use status::krool_belly_damage_hook_impl; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); - use opff::*; + let agent = &mut Agent::new("krool"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + backpack::install(); + ironball::install(); // prevents shield break on belly + use opff::*; skyline::patching::Patch::in_text(0xc04f00).data(0x1400001Eu32); } \ No newline at end of file diff --git a/fighters/krool/src/opff.rs b/fighters/krool/src/opff.rs index 74f34eca88..baa1954f04 100644 --- a/fighters/krool/src/opff.rs +++ b/fighters/krool/src/opff.rs @@ -117,8 +117,6 @@ pub unsafe fn krool_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("krool") - .on_line(Main, krool_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, krool_frame_wrapper); } \ No newline at end of file diff --git a/fighters/krool/src/status.rs b/fighters/krool/src/status/attack_lw4.rs similarity index 54% rename from fighters/krool/src/status.rs rename to fighters/krool/src/status/attack_lw4.rs index 93d85f9547..b7eb5b2339 100644 --- a/fighters/krool/src/status.rs +++ b/fighters/krool/src/status/attack_lw4.rs @@ -1,10 +1,6 @@ use super::*; -use globals::*; -mod special_hi; -mod special_lw; - -// FIGHTER_STATUS_KIND_ATTACK_LW4 // +// FIGHTER_STATUS_KIND_ATTACK_LW4 pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); @@ -14,10 +10,10 @@ pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CV fighter.status_ThrowKirby_Uniq(L2CValue::Bool(false)); } fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(krool_attack_lw4_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) } -pub unsafe extern "C" fn krool_attack_lw4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_lw4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !CancelModule::is_enable_cancel(fighter.module_accessor) && !WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) && !MotionModule::is_end(fighter.module_accessor) { @@ -69,56 +65,7 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo 0.into() } -// handle damage to belly -#[no_mangle] -pub unsafe extern "C" fn krool_belly_damage_hook_impl(damage: f32, fighter: *mut Fighter, unk: bool) { - let mut battle_object = &mut (*fighter).battle_object; - let boma = battle_object.module_accessor; - let mut waist = WorkModule::get_float(boma, 0x4d); // WAIST_LIFE - - // play belly flash - WorkModule::on_flag(boma, 0x200000e3); // *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_WAIST_HIT_FLASH - WorkModule::set_int(boma, 0x1e, 0x100000c1); // *FIGHTER_KROOL_INSTANCE_WORK_ID_INT_WAIST_HIT_FLASH_COUNT - - // store incoming damage - let stored_damage = VarModule::get_float(battle_object, vars::krool::instance::STORED_DAMAGE); - VarModule::set_float(battle_object, vars::krool::instance::STORED_DAMAGE, f32::min(stored_damage + damage, 45.0)); - - if damage > ParamModule::get_float(battle_object, ParamType::Agent, "param_waist.deplete_damage_min") { - // decrease belly health - waist -= 1.0; - WorkModule::set_float(boma, waist, 0x4d); - - // critical zoom if out of health - if WorkModule::get_float(boma, 0x4d) <= 0.0 { - MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_SOUND, Hash40::new("sound_waistbreak"), -1); - } - else { - let krool = utils::util::get_fighter_common_from_accessor(&mut (*boma)); - PLAY_SE(krool, Hash40::new("se_krool_damage_clack")); - } - } - else { - let krool = utils::util::get_fighter_common_from_accessor(&mut (*boma)); - PLAY_SE(krool, Hash40::new("se_krool_special_n11")); //s07 l01, l02 l05 - } - - // disable belly for the rest of the move - WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); -} - -// handle toggling belly on/off -// #[no_mangle] -// pub unsafe extern "C" fn krool_belly_toggle_hook(ctx: &mut skyline::hooks::InlineCtx) { -// *ctx.registers[0].x.as_mut() = 0; // bool for toggle -// // ...as_mut() &= logic -// } - -pub fn install() { - special_hi::install(); - special_lw::install(); - smashline::Agent::new("krool") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } \ No newline at end of file diff --git a/fighters/krool/src/status/mod.rs b/fighters/krool/src/status/mod.rs new file mode 100644 index 0000000000..ce211810af --- /dev/null +++ b/fighters/krool/src/status/mod.rs @@ -0,0 +1,58 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; +mod special_lw; +mod attack_lw4; + +// handle damage to belly +#[no_mangle] +pub unsafe extern "C" fn krool_belly_damage_hook_impl(damage: f32, fighter: *mut Fighter, unk: bool) { + let mut battle_object = &mut (*fighter).battle_object; + let boma = battle_object.module_accessor; + let mut waist = WorkModule::get_float(boma, 0x4d); // WAIST_LIFE + + // play belly flash + WorkModule::on_flag(boma, 0x200000e3); // *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_WAIST_HIT_FLASH + WorkModule::set_int(boma, 0x1e, 0x100000c1); // *FIGHTER_KROOL_INSTANCE_WORK_ID_INT_WAIST_HIT_FLASH_COUNT + + // store incoming damage + let stored_damage = VarModule::get_float(battle_object, vars::krool::instance::STORED_DAMAGE); + VarModule::set_float(battle_object, vars::krool::instance::STORED_DAMAGE, f32::min(stored_damage + damage, 45.0)); + + if damage > ParamModule::get_float(battle_object, ParamType::Agent, "param_waist.deplete_damage_min") { + // decrease belly health + waist -= 1.0; + WorkModule::set_float(boma, waist, 0x4d); + + // critical zoom if out of health + if WorkModule::get_float(boma, 0x4d) <= 0.0 { + MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_SOUND, Hash40::new("sound_waistbreak"), -1); + } + else { + let krool = utils::util::get_fighter_common_from_accessor(&mut (*boma)); + PLAY_SE(krool, Hash40::new("se_krool_damage_clack")); + } + } + else { + let krool = utils::util::get_fighter_common_from_accessor(&mut (*boma)); + PLAY_SE(krool, Hash40::new("se_krool_special_n11")); //s07 l01, l02 l05 + } + + // disable belly for the rest of the move + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); +} + +// handle toggling belly on/off +// #[no_mangle] +// pub unsafe extern "C" fn krool_belly_toggle_hook(ctx: &mut skyline::hooks::InlineCtx) { +// *ctx.registers[0].x.as_mut() = 0; // bool for toggle +// // ...as_mut() &= logic +// } + +pub fn install(agent: &mut Agent) { + special_hi::install(agent); + special_lw::install(agent); + attack_lw4::install(agent); +} \ No newline at end of file diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index 9aaaccb7d6..f2f3b8c051 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -1,6 +1,8 @@ use super::*; use std::convert::TryInto; +// FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START + unsafe extern "C" fn special_hi_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -213,7 +215,6 @@ unsafe extern "C" fn special_hi_change_motion(fighter: &mut L2CFighterCommon, mo else { MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } - } // FUN_710001ea30 @@ -330,7 +331,6 @@ unsafe extern "C" fn special_hi_set_physics(fighter: &mut L2CFighterCommon) { sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); } - } //FUN_71000210d0 @@ -472,7 +472,6 @@ unsafe extern "C" fn special_hi_lean_physics(fighter: &mut L2CFighterCommon) { let speed_x = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); } - } //FUN_710001e090 @@ -524,12 +523,10 @@ unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, moti } -pub fn install() { - smashline::Agent::new("krool") - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_main) - .status(Exit, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_exit) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_end_main) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_main); + agent.status(Exit, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_exit); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_end_main); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_main); } \ No newline at end of file diff --git a/fighters/krool/src/status/special_lw.rs b/fighters/krool/src/status/special_lw.rs index 63dda58ade..0890529970 100644 --- a/fighters/krool/src/status/special_lw.rs +++ b/fighters/krool/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main_old(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); @@ -107,15 +109,10 @@ unsafe extern "C" fn special_lw_change_motion(fighter: &mut L2CFighterCommon) { MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); } } - } -pub fn install() { - smashline::Agent::new("krool") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main_old) - .install(); - smashline::Agent::new("krool") - .status(Pre, statuses::krool::SPECIAL_LW_GUT, special_lw_pre) - .status(Main, statuses::krool::SPECIAL_LW_GUT, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main_old); + agent.status(Pre, statuses::krool::SPECIAL_LW_GUT, special_lw_pre); + agent.status(Main, statuses::krool::SPECIAL_LW_GUT, special_lw_main); } \ No newline at end of file diff --git a/fighters/link/src/acmd/aerials.rs b/fighters/link/src/acmd/aerials.rs index f005c2e166..dec1ff4c2f 100644 --- a/fighters/link/src/acmd/aerials.rs +++ b/fighters/link/src/acmd/aerials.rs @@ -1,272 +1,266 @@ - use super::*; -unsafe extern "C" fn attack_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.574/(7.0-1.0)); + FT_MOTION_RATE(agent, 2.574/(7.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 15, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 15, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 15, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 15, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); frame(lua_state, 13.5); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 8.0/(20.0-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(20.0-15.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 120, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 120, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter,Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent,Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 13); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 13); } frame(lua_state, 22.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn attack_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 10.0/(14.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 70, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 366, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0/(14.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 70, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 366, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.4/(10.0/1.0)); + FT_MOTION_RATE(agent, 5.4/(10.0/1.0)); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 15.0, 85, 92, 0, 25, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 15.0, 85, 92, 0, 25, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 13.0, 85, 85, 0, 22, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_POWER(fighter, 0, 13); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 13.0, 85, 85, 0, 22, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_POWER(agent, 0, 13); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairhi (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } - } -unsafe extern "C" fn attack_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.0, 3.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 270, 38, 0, 30, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 65, 98, 0, 42, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 270, 38, 0, 30, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 65, 98, 0, 42, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 34.0/(65.0-20.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 65, 100, 0, 41, 3.5, 1.0, -0.5, 0.0, Some(1.0), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 34.0/(65.0-20.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 65, 100, 0, 41, 3.5, 1.0, -0.5, 0.0, Some(1.0), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairlw (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } - } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attackairn", attack_air_n) - .acmd("game_attackairf", attack_air_f) - .acmd("effect_attackairf", attack_air_f_effect) - .acmd("expression_attackairf", attack_air_f_expression) - .acmd("game_attackairb", attack_air_b) - .acmd("game_attackairhi", attack_air_hi) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", attack_air_lw) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/link/src/acmd/ground.rs b/fighters/link/src/acmd/ground.rs index ac423ef9a3..f0869261f8 100644 --- a/fighters/link/src/acmd/ground.rs +++ b/fighters/link/src/acmd/ground.rs @@ -1,101 +1,100 @@ - use super::*; -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 25, 0, 25, 2.5, 0.0, 3.0, 18.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 25, 0, 25, 2.5, 0.0, 3.0, 18.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn attack_12 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn attack_13 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let nodes = ["head", "bust", "waist", "arml", "shoulderl", "armr", "shoulderr"]; // nodes that become intangible during the attack frame(lua_state, 7.0); - if is_excute(fighter) { - for node in nodes { HIT_NODE(fighter, Hash40::new(node), *HIT_STATUS_INVINCIBLE); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 55, 0, 80, 3.5, 0.0, 4.0, 6.0, Some(0.0), Some(12.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + for node in nodes { HIT_NODE(agent, Hash40::new(node), *HIT_STATUS_INVINCIBLE); } + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 55, 0, 80, 3.5, 0.0, 4.0, 6.0, Some(0.0), Some(12.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 65, 30, 0, 80, 6.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(5.75), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 65, 30, 0, 80, 6.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(5.75), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - for node in nodes { HIT_NODE(fighter, Hash40::new(node), *HIT_STATUS_NORMAL); } + for node in nodes { HIT_NODE(agent, Hash40::new(node), *HIT_STATUS_NORMAL); } } } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("shield"), 0, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("shield"), 0, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9, 2, 0, 180, 0, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9, 2, 0, 180, 0, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9.2, -1.0, 0, 0, 45, 0.85, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9.2, -1.0, 0, 0, 45, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); } frame(lua_state, 34.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } @@ -117,44 +116,43 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_walk_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attack11", attack_11) - .acmd("game_attack12", attack_12) - .acmd("game_attack13", attack_13) - .acmd("game_attackdash", game_attackdash) - .acmd("effect_attackdash", effect_attackdash) - .acmd("sound_attackdash", sound_attackdash) - .acmd("expression_attackdash", expression_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/link/src/acmd/mod.rs b/fighters/link/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/link/src/acmd/mod.rs +++ b/fighters/link/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/link/src/acmd/other.rs b/fighters/link/src/acmd/other.rs index 6e99afee43..bcdba4e8e9 100644 --- a/fighters/link/src/acmd/other.rs +++ b/fighters/link/src/acmd/other.rs @@ -1,250 +1,126 @@ - -use smash::app::sv_animcmd::THROW_ITEM_arg3; - 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_link_rnd_futtobi01"), Hash40::new("seq_link_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_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_link_rnd_futtobi01"), Hash40::new("seq_link_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_link_rnd_futtobi01"), Hash40::new("seq_link_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_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(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_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_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_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_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_link_rnd_futtobi01"), Hash40::new("seq_link_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_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn appeal_hi_l(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn appeal_hi_r(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -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_link_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_link_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_link_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_link_step_left_l")); } } -unsafe extern "C" fn link_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 link_boomerang_fly_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"), 10.0, 80, 29, 0, 91, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 37, 0, 74, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 44, 0, 55, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn link_boomerang_turn_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"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 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_KICK, *ATTACK_REGION_OBJECT); - } - -} - -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("link") - .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("game_appealhil", appeal_hi_l) - .acmd("game_appealhir", appeal_hi_r) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", link_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("link_boomerang") - .acmd("game_fly", link_boomerang_fly_game) - .acmd("game_turn", link_boomerang_turn_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("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/link/src/acmd/smashes.rs b/fighters/link/src/acmd/smashes.rs index 4193723dcf..b72756fdc1 100644 --- a/fighters/link/src/acmd/smashes.rs +++ b/fighters/link/src/acmd/smashes.rs @@ -1,149 +1,144 @@ - use super::*; -unsafe extern "C" fn game_attacks4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - FT_MOTION_RATE(fighter, 6.0/(14.0-10.0)); + FT_MOTION_RATE(agent, 6.0/(14.0-10.0)); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 60, 12, 0, 45, 3.0, 0.0, 8.5, 6.0, Some(0.0), Some(8.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 60, 12, 0, 45, 3.0, 0.0, 8.5, 6.0, Some(0.0), Some(8.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if DamageModule::damage(boma, 0)==0.0 { ArticleModule::generate_article(boma,*FIGHTER_LINK_GENERATE_ARTICLE_SWORD_BEAM, false, 0); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn attack_s4_2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 50, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 50, 100, 0, 30, 3.0, 0.0, 9.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 50, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 50, 100, 0, 30, 3.0, 0.0, 9.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.0, 135, 100, 45, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.0, 135, 100, 45, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 3.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 3.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 3.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 3.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 3.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 3.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 3.0, 135, 100, 40, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 3.0, 135, 100, 40, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 11.0, 80, 96, 0, 60, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 90, 96, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 90, 96, 0, 60, 4.5, 0.0, 11.0, -0.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 11.0, 80, 96, 0, 60, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 90, 96, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 90, 96, 0, 60, 4.5, 0.0, 11.0, -0.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_lw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 75, 88, 0, 40, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 14.0, 75, 88, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 75, 88, 0, 40, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 14.0, 75, 88, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 30, 60, 0, 80, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 30, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 30, 60, 0, 80, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 30, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 12.0/(56.0-38.0)); + FT_MOTION_RATE(agent, 12.0/(56.0-38.0)); } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attacks4s2", attack_s4_2) - .acmd("game_attackhi4", attack_hi4) - .acmd("game_attacklw4", attack_lw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4s2", game_attacks4s2); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/link/src/acmd/specials.rs b/fighters/link/src/acmd/specials.rs index e9421e56d7..6fc96cb308 100644 --- a/fighters/link/src/acmd/specials.rs +++ b/fighters/link/src/acmd/specials.rs @@ -1,280 +1,275 @@ - use super::*; -unsafe extern "C" fn special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 7.0/(3.75-0.0)); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 7.0/(3.75-0.0)); frame(lua_state, 3.75); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } - } -unsafe extern "C" fn special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.75, true); - FLASH(fighter, 1, 0.6, 0, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.75, true); + FLASH(agent, 1, 0.6, 0, 0.1); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 11, 0, -10, -120, 0, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 11, 0, -10, -120, 0, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 10, 180, 0, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 10, 180, 0, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, -250, 5, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, -250, 5, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, 0, 5, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, 0, 5, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 0, -100, 10, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 0, -100, 10, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 44.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 5, 0, 0, 0, 0); - AFTER_IMAGE_OFF(fighter, 6); - EFFECT_OFF_KIND(fighter, Hash40::new("link_kaiten"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FLASH_FRM(agent, 5, 0, 0, 0, 0); + AFTER_IMAGE_OFF(agent, 6); + EFFECT_OFF_KIND(agent, Hash40::new("link_kaiten"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 47.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 52.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); - } -} - -unsafe extern "C" fn special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - FLASH(fighter, 1, 0.6, 0, 0.1); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 18, 0, 0, -90, 25, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, -20, -150, 30, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 17, 0, 0, -120, 20, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, 25, -170, 15, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE_OFF(fighter, 4); - } - frame(lua_state, 53.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 5, 0, 0, 0, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("link_kaiten"), false, false); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } } -unsafe extern "C" fn special_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 107, 0, 6.0, 0.0, 10.0, 14.5, Some(0.0), Some(10.0), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 107, 0, 6.0, 0.0, 10.0, 14.5, Some(0.0), Some(10.0), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.0, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.0, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 107, 0, 6.0, 0.0, 6.0, 15.0, Some(0.0), Some(7.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 107, 0, 6.0, 0.0, 6.0, 15.0, Some(0.0), Some(7.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.5, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.5, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 83, 100, 71, 0, 6.0, 0.0, 10.0, 15.0, Some(0.0), Some(10.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 83, 100, 71, 0, 6.0, 0.0, 10.0, 15.0, Some(0.0), Some(10.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 150, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 150, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 69, 100, 62, 0, 7.0, 0.0, 14.0, 12.5, Some(0.0), Some(12.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 69, 100, 62, 0, 7.0, 0.0, 14.0, 12.5, Some(0.0), Some(12.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 160, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 160, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 7.5, 14.0, Some(0.0), Some(9.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 7.5, 14.0, Some(0.0), Some(9.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 13.0, 15.5, Some(0.0), Some(12.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 13.0, 15.5, Some(0.0), Some(12.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 49.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 19.0, 12.5, Some(0.0), Some(14.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 19.0, 12.5, Some(0.0), Some(14.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_specialhi", special_hi) - .acmd("effect_specialhi", special_hi_effect) - .acmd("effect_specialairhi", special_air_hi_effect) - .acmd("game_specialairhi", special_air_hi) - .install(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + FLASH(agent, 1, 0.6, 0, 0.1); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 18, 0, 0, -90, 25, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, -20, -150, 30, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 17, 0, 0, -120, 20, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, 25, -170, 15, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 42.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 44.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + } + frame(lua_state, 49.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE_OFF(agent, 4); + } + frame(lua_state, 53.0); + if is_excute(agent) { + FLASH_FRM(agent, 5, 0, 0, 0, 0); + EFFECT_OFF_KIND(agent, Hash40::new("link_kaiten"), false, false); + } + frame(lua_state, 54.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); } diff --git a/fighters/link/src/acmd/throws.rs b/fighters/link/src/acmd/throws.rs index 669e850519..2565004ec5 100644 --- a/fighters/link/src/acmd/throws.rs +++ b/fighters/link/src/acmd/throws.rs @@ -1,104 +1,99 @@ - use super::*; -unsafe extern "C" fn catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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, 8.0, 0.0, Some(0.0), Some(8.0), Some(8.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(8.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 catch_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 catch_turn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-13.85), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-13.85), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.5, 110, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.5, 110, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -18.0, 12.0); + CHECK_FINISH_CAMERA(agent, -18.0, 12.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.25); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_catch", catch) - .acmd("game_catchdash", catch_dash) - .acmd("game_catchturn", catch_turn) - .acmd("game_throwb", game_throwb) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/link/src/acmd/tilts.rs b/fighters/link/src/acmd/tilts.rs index 8b37f9adc4..b092cd32a6 100644 --- a/fighters/link/src/acmd/tilts.rs +++ b/fighters/link/src/acmd/tilts.rs @@ -1,105 +1,101 @@ - use super::*; -unsafe extern "C" fn attack_s3_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 8.0/(13.0-3.0)); + FT_MOTION_RATE(agent, 8.0/(13.0-3.0)); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0/(16.0-15.0)); + FT_MOTION_RATE(agent, 2.0/(16.0-15.0)); frame(lua_state, 15.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 35, 90, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 14.0, 361, 86, 0, 55, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 35, 90, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 14.0, 361, 86, 0, 55, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_hi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 85, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 4.25, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 95, 105, 0, 40, 3.5, 8.5, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 85, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 4.25, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 95, 105, 0, 40, 3.5, 8.5, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_lw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.69/(11.0-1.0)); + FT_MOTION_RATE(agent, 7.69/(11.0-1.0)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 80, 30, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 80, 30, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 280, 43, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 280, 43, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn expression_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attacks3", attack_s3_s) - .acmd("game_attackhi3", attack_hi3) - .acmd("game_attacklw3", attack_lw3) - .acmd("expression_attacklw3", expression_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/link/src/boomerang/acmd.rs b/fighters/link/src/boomerang/acmd.rs new file mode 100644 index 0000000000..16533cbf0d --- /dev/null +++ b/fighters/link/src/boomerang/acmd.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 29, 0, 91, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 37, 0, 74, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 44, 0, 55, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_turn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_turn", game_turn); +} diff --git a/fighters/link/src/boomerang/mod.rs b/fighters/link/src/boomerang/mod.rs new file mode 100644 index 0000000000..40fc9ca15a --- /dev/null +++ b/fighters/link/src/boomerang/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("link_boomerang"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/link/src/lib.rs b/fighters/link/src/lib.rs index 5537dac979..b326cc8906 100644 --- a/fighters/link/src/lib.rs +++ b/fighters/link/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod boomerang; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("link"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + boomerang::install(); } \ No newline at end of file diff --git a/fighters/link/src/opff.rs b/fighters/link/src/opff.rs index e220267689..b6ab0306e9 100644 --- a/fighters/link/src/opff.rs +++ b/fighters/link/src/opff.rs @@ -3,8 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - - unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { if situation_kind == *SITUATION_KIND_AIR { @@ -147,8 +145,7 @@ pub unsafe fn link_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("link") - .on_line(Main, link_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, link_frame_wrapper); } diff --git a/fighters/link/src/status/mod.rs b/fighters/link/src/status/mod.rs new file mode 100644 index 0000000000..7b4efcde17 --- /dev/null +++ b/fighters/link/src/status/mod.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_hi; + +pub unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_hi::install(agent); +} \ No newline at end of file diff --git a/fighters/link/src/status/special_hi.rs b/fighters/link/src/status/special_hi.rs new file mode 100644 index 0000000000..c16ce12db2 --- /dev/null +++ b/fighters/link/src/status/special_hi.rs @@ -0,0 +1,385 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + } + let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 + } else { + 0 as u64 + }; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + 0, + 0, + 0, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + let rslash_landing_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_landing_frame")); + WorkModule::set_float(fighter.module_accessor, rslash_landing_frame as f32, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let rslash_charge_spd = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); + + MotionModule::set_rate(fighter.module_accessor, rslash_charge_spd); + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if !StatusModule::is_changing(fighter.module_accessor) { + if MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); + return 1.into(); + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { + if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), + L2CValue::Bool(true) + ); + return 1.into(); + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), + L2CValue::Bool(false) + ); + return 1.into(); + } + } + } + else if !link_situation_helper(fighter).get_bool() || fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if !link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { + return 0.into(); + } + } + else if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { + return 0.into(); + } + } + if StatusModule::is_changing(fighter.module_accessor) { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + } + return fighter.fastshift(L2CValue::Ptr(sub_specialhi_Main as *const () as _)); + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_GROUND)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_start"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); + } + 0.into() +} + +unsafe extern "C" fn sub_specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { + if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), + L2CValue::Bool(true) + ); + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + } + else { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X) { + if KineticModule::get_kinetic_type(fighter.module_accessor) == *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI { + let rslash_end_air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_accel_x_mul")); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI, rslash_end_air_accel_x_mul); + app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); + let rslash_air_max_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_air_max_x_mul")); + let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let rslash_end_air_max_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_max_x")); + let mul_x_speed_max = ((rslash_end_air_max_x / air_speed_x_stable) / rslash_air_max_x_mul); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, mul_x_speed_max); + app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); + return 0.into() + } + } + return 0.into() + } + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + } + } + 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD + +pub unsafe extern "C" fn special_hi_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_hold"), 0.0, 1.0, false, 0.0, false, false); + if !StopModule::is_stop(fighter.module_accessor) { + sub_special_hi_hold(fighter, L2CValue::Bool(false)); + } + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_hold as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_hold_main_loop as *const () as _)) +} + +unsafe extern "C" fn sub_special_hi_hold(fighter: &mut L2CFighterCommon, arg2: L2CValue) -> L2CValue { + if !arg2.get_bool() { + return 0.into(); + } + let rslash_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); + WorkModule::add_float(fighter.module_accessor, 1.0 / rslash_charge_spd_div, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + let rslash_hold_frame_max = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_hold_frame")); + if !MotionModule::is_end(fighter.module_accessor) { + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + let frame = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + if frame < rslash_hold_frame_max as f32 { + return 0.into(); + } + } + } + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, true); + 1.into() +} + +unsafe extern "C" fn special_hi_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); + return 1.into(); + } + 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // + +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.55; + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if !StatusModule::is_changing(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); + return 0.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_main); + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); +} \ No newline at end of file diff --git a/fighters/link/src/status.rs b/fighters/link/src/status/special_n.rs similarity index 61% rename from fighters/link/src/status.rs rename to fighters/link/src/status/special_n.rs index 28934252d9..835cb63d1b 100644 --- a/fighters/link/src/status.rs +++ b/fighters/link/src/status/special_n.rs @@ -1,401 +1,8 @@ use super::*; -use globals::*; -// status script import + +// FIGHTER_STATUS_KIND_SPECIAL_N -// FIGHTER_STATUS_KIND_SPECIAL_HI // - -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - } - let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 - } else { - 0 as u64 - }; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - 0, - 0, - 0, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - let rslash_landing_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_landing_frame")); - WorkModule::set_float(fighter.module_accessor, rslash_landing_frame as f32, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let rslash_charge_spd = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); - - MotionModule::set_rate(fighter.module_accessor, rslash_charge_spd); - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if !StatusModule::is_changing(fighter.module_accessor) { - if MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); - return 1.into(); - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { - if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), - L2CValue::Bool(true) - ); - return 1.into(); - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), - L2CValue::Bool(false) - ); - return 1.into(); - } - } - } - else if !link_situation_helper(fighter).get_bool() || fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if !link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { - return 0.into(); - } - } - else if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { - return 0.into(); - } - } - if StatusModule::is_changing(fighter.module_accessor) { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - } - return fighter.fastshift(L2CValue::Ptr(sub_specialhi_Main as *const () as _)); - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_GROUND)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_start"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); - } - 0.into() -} - -unsafe extern "C" fn sub_specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { - if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), - L2CValue::Bool(true) - ); - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - } - else { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X) { - if KineticModule::get_kinetic_type(fighter.module_accessor) == *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI { - let rslash_end_air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_accel_x_mul")); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI, rslash_end_air_accel_x_mul); - app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); - let rslash_air_max_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_air_max_x_mul")); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let rslash_end_air_max_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_max_x")); - let mul_x_speed_max = ((rslash_end_air_max_x / air_speed_x_stable) / rslash_air_max_x_mul); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, mul_x_speed_max); - app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); - return 0.into() - } - } - return 0.into() - } - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - } - } - 0.into() -} - -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD - -pub unsafe extern "C" fn special_hi_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_hold"), 0.0, 1.0, false, 0.0, false, false); - if !StopModule::is_stop(fighter.module_accessor) { - sub_special_hi_hold(fighter, L2CValue::Bool(false)); - } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_hold as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_hold_main_loop as *const () as _)) -} - -unsafe extern "C" fn sub_special_hi_hold(fighter: &mut L2CFighterCommon, arg2: L2CValue) -> L2CValue { - if !arg2.get_bool() { - return 0.into(); - } - let rslash_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); - WorkModule::add_float(fighter.module_accessor, 1.0 / rslash_charge_spd_div, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - let rslash_hold_frame_max = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_hold_frame")); - if !MotionModule::is_end(fighter.module_accessor) { - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - let frame = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - if frame < rslash_hold_frame_max as f32 { - return 0.into(); - } - } - } - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, true); - 1.into() -} - -unsafe extern "C" fn special_hi_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); - return 1.into(); - } - 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - } - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.55; - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if !StatusModule::is_changing(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); - return 0.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - return 0.into() -} - -unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} - -// FIGHTER_STATUS_KIND_SPECIAL_N // - -pub unsafe extern "C" fn special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE); @@ -431,10 +38,10 @@ pub unsafe extern "C" fn special_n(fighter: &mut L2CFighterCommon) -> L2CValue { } } } - fighter.sub_shift_status_main(L2CValue::Ptr(special_n_Main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) } -unsafe extern "C" fn special_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { let cat2 = fighter.global_table[0x21].get_int() as i32; let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; @@ -769,10 +376,10 @@ unsafe extern "C" fn sub_special_n_common(fighter: &mut L2CFighterCommon) -> L2C } else if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + fighter.fastshift(L2CValue::Ptr(special_n_main_loop as *const () as _)) } else { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + fighter.fastshift(L2CValue::Ptr(special_n_main_loop as *const () as _)) } } else { @@ -999,13 +606,6 @@ unsafe extern "C" fn special_n_helper(fighter: &mut L2CFighterCommon) { ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_FIRST), true); } -pub fn install() { - smashline::Agent::new("link") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, specialhi) - .status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_main) - .status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end) - .status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, specialhi_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/aerials.rs b/fighters/littlemac/src/acmd/aerials.rs index e374a0ae0b..e42fb8a949 100644 --- a/fighters/littlemac/src/acmd/aerials.rs +++ b/fighters/littlemac/src/acmd/aerials.rs @@ -1,46 +1,43 @@ use super::*; -unsafe extern "C" fn littlemac_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 361, 140, 0, 18, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 361, 140, 0, 18, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.0, 30, 128, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.0, 30, 128, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn littlemac_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("littlemac_attack_line_glove"), Hash40::new("top"), 0, 13, -1, 55, 0, 0, 0.8, true, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("littlemac_attack_line_glove"), Hash40::new("top"), 0, 13, -1, 55, 0, 0, 0.8, true, 1); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -52,126 +49,123 @@ unsafe extern "C" fn littlemac_attack_air_n_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 6.5, 3, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 6.5, 3, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn littlemac_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.476); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.476); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 5.0, 50, 110, 0, 60, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 5.0, 50, 110, 0, 60, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn littlemac_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn littlemac_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 354, 75, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 354, 75, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.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 littlemac_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 4.25, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 4.25, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.25); - FT_MOTION_RATE_RANGE(fighter, 4.25, 4.75, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 4.25, 4.75, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.75); - FT_MOTION_RATE_RANGE(fighter, 4.75, 6.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 4.75, 6.0, 1.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.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 littlemac_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.25); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("littlemac_attack_arc_weak"), Hash40::new("top"), -3, 9.5, 2, -10, -80, -100, 0.8, true, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("littlemac_attack_arc_weak"), Hash40::new("top"), -3, 9.5, 2, -10, -80, -100, 0.8, true, 1); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -183,72 +177,71 @@ unsafe extern "C" fn littlemac_attack_air_hi_effect(fighter: &mut L2CAgentBase) 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_RATE(fighter, 0.9); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn littlemac_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.25); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn littlemac_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 270, 80, 0, 15, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 270, 80, 0, 15, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 9.0, 270, 65, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 9.0, 270, 65, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn littlemac_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 12, 0, 90, 0, -4, 0.85, true, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 12, 0, 90, 0, -4, 0.85, true, 0.2); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -260,25 +253,27 @@ unsafe extern "C" fn littlemac_attack_air_lw_effect(fighter: &mut L2CAgentBase) 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -4, -2, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -4, -2, 0, 0, 0, 0, 0.9, true); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attackairn", littlemac_attack_air_n_game) - .acmd("effect_attackairn", littlemac_attack_air_n_effect) - .acmd("game_attackairf", littlemac_attack_air_f_game) - .acmd("expression_attackairf", littlemac_attack_air_f_expression) - .acmd("game_attackairb", littlemac_attack_air_b_game) - .acmd("game_attackairhi", littlemac_attack_air_hi_game) - .acmd("effect_attackairhi", littlemac_attack_air_hi_effect) - .acmd("expression_attackairhi", littlemac_attack_air_hi_expression) - .acmd("game_attackairlw", littlemac_attack_air_lw_game) - .acmd("effect_attackairlw", littlemac_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/littlemac/src/acmd/ground.rs b/fighters/littlemac/src/acmd/ground.rs index 5191099e9d..508252544c 100644 --- a/fighters/littlemac/src/acmd/ground.rs +++ b/fighters/littlemac/src/acmd/ground.rs @@ -1,222 +1,217 @@ use super::*; -unsafe extern "C" fn littlemac_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.5, 88, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 83, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.5, 78, 25, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 10, 0, 27, 2.5, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.5, 88, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 83, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.5, 78, 25, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 10, 0, 27, 2.5, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_MIDDLE), false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn littlemac_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); - VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); + VarModule::off_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 3.0, 88, 55, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 83, 55, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 3.0, 78, 55, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 2.5, 0.0, 4.5, 5.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 3.0, 88, 55, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 83, 55, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 3.0, 78, 55, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 2.5, 0.0, 4.5, 5.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 21.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); } - } -unsafe extern "C" fn littlemac_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 1.0); } frame(lua_state, 4.0); - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - let is_dle = VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); + if is_excute(agent) { + let is_dle = VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); let angle = if is_dle { 70 } else { 62 }; let bkb = if is_dle { 62 } else { 70 }; let kbg = if is_dle { 40 } else { 88 }; let hitlag = if is_dle { 1.5 } else { 1.0 }; let sdi = if is_dle { 0.6 } else { 1.0 }; let collision_attr = if is_dle { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, angle, kbg, 0, bkb, 3.2, 2.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, angle, kbg, 0, bkb, 3.5, 0.0, 8.0, 6.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, angle, kbg, 0, bkb, 3.2, 2.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle, kbg, 0, bkb, 3.5, 0.0, 8.0, 6.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); if is_dle { - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 2.5); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 2.5); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { if is_training_mode() { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT) { + FLASH(agent, 1, 0, 0.05, 0.7); } else { - FLASH(fighter, 0, 0.24, 0.8, 0.7); + FLASH(agent, 0, 0.24, 0.8, 0.7); } } } else { - EFFECT(fighter, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 5, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.43, 1, 0.3); + EFFECT(agent, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 5, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.43, 1, 0.3); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - EFFECT(fighter, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 1, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.43, 1, 0.3); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + EFFECT(agent, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 1, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.43, 1, 0.3); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 10, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.7); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 10, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_level_up"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_level_up"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - if is_training_mode() && !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - COL_NORMAL(fighter); + if is_excute(agent) { + if is_training_mode() && !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + COL_NORMAL(agent); } - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc_glove_b"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc_glove_b"), true, true); } } -unsafe extern "C" fn littlemac_attack_13_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) || is_training_mode()) { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n02")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n03")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n02")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n03")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")) }; } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_littlemac_rnd_combo03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_littlemac_rnd_combo03")); } - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_m")); + PLAY_SE(agent, Hash40::new("se_littlemac_swing_m")); } } -unsafe extern "C" fn littlemac_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 10.0, 55, 70, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 10.0, 55, 70, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 88, 50, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 88, 50, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_dash_expression(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_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn expression_attackdash(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_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); if !WorkModule::is_flag(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLAG_ATTACK_HIT) { - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attack11", littlemac_attack_11_game) - .acmd("game_attack12", littlemac_attack_12_game) - .acmd("game_attack13", littlemac_attack_13_game) - .acmd("effect_attack13", littlemac_attack_13_effect) - .acmd("sound_attack13", littlemac_attack_13_sound) - .acmd("game_attackdash", littlemac_attack_dash_game) - .acmd("expression_attackdash", littlemac_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/littlemac/src/acmd/mod.rs b/fighters/littlemac/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/littlemac/src/acmd/mod.rs +++ b/fighters/littlemac/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/other.rs b/fighters/littlemac/src/acmd/other.rs index db62ee19dd..35dd284fda 100644 --- a/fighters/littlemac/src/acmd/other.rs +++ b/fighters/littlemac/src/acmd/other.rs @@ -1,188 +1,111 @@ - 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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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(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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_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_littlemac_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_littlemac_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, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_littlemac_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_littlemac_step_left_m")); } } -unsafe extern "C" fn littlemac_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, 16.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("littlemac") - .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", littlemac_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_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); } diff --git a/fighters/littlemac/src/acmd/smashes.rs b/fighters/littlemac/src/acmd/smashes.rs index 7b463a02eb..ac0cbfa0c8 100644 --- a/fighters/littlemac/src/acmd/smashes.rs +++ b/fighters/littlemac/src/acmd/smashes.rs @@ -1,268 +1,263 @@ use smash::app::sv_animcmd::get_value_float; use super::*; -unsafe extern "C" fn littlemac_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 16.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 14.0, 15.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + frame(lua_state, 15.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc"), true, true); + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn littlemac_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 15.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 14.0, 16.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + frame(lua_state, 16.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); - } - frame(lua_state, 12.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, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); + LAST_EFFECT_SET_RATE(agent, 1.5); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); } } -unsafe extern "C" fn littlemac_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 18.0, 5, 21, 0, 72, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 7.5, 3.0, Some(0.0), Some(8.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 18.0, 5, 21, 0, 72, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 7.5, 3.0, Some(0.0), Some(8.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 21.0, 86, 76, 0, 40, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 85, 76, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 21.0, 86, 76, 0, 40, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 85, 76, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_spark"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_attack_spark2"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_spark"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_attack_spark2"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 13.5, -4.0, 4, 60, 110, 0.8, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 0.8, 0.7); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 13.5, -4.0, 4, 60, 110, 0.8, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 0.8, 0.7); } } -unsafe extern "C" fn littlemac_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn littlemac_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 4.5, 4, 20, -50, -30, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 4.5, 4, 20, -50, -30, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 2, 6, -2, 30, 130, 10, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 2, 6, -2, 30, 130, 10, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } else { frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 5, 4, 20, -40, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 5, 4, 20, -40, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 6, -2, 30, 130, 10, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 6, -2, 30, 130, 10, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attacks4hi", littlemac_attack_s4_hi_game) - .acmd("effect_attacks4hi", littlemac_attack_s4_hi_effect) - .acmd("game_attacks4", littlemac_attack_s4_s_game) - .acmd("effect_attacks4", littlemac_attack_s4_s_effect) - .acmd("game_attacks4lw", littlemac_attack_s4_lw_game) - .acmd("game_attackhi4", littlemac_attack_hi4_game) - .acmd("effect_attackhi4", littlemac_attack_hi4_effect) - .acmd("game_attacklw4", littlemac_attack_lw4_game) - .acmd("effect_attacklw4", littlemac_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/littlemac/src/acmd/specials.rs b/fighters/littlemac/src/acmd/specials.rs index 3d983a1f51..ee68323d6a 100644 --- a/fighters/littlemac/src/acmd/specials.rs +++ b/fighters/littlemac/src/acmd/specials.rs @@ -1,364 +1,359 @@ use super::*; -unsafe extern "C" fn littlemac_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_CHECK_DASH); } } -unsafe extern "C" fn littlemac_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(39.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 39.0, 8.0); frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn littlemac_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) && (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) && (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let mut meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); let meter_lvl = if meter < 40.0 { 0 } else if meter >= 40.0 && meter < 100.0 { 1 } else { 2 }; - let damage = (if meter_lvl == 2 { 25.0 } else { 10.0 + meter / 8.0 }) * if fighter.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; - let angle = if fighter.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; - let bkb = if fighter.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; + let damage = (if meter_lvl == 2 { 25.0 } else { 10.0 + meter / 8.0 }) * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; + let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; + let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; let hitlag = if meter_lvl == 0 { 1.0 } else if meter_lvl == 1 { 1.2 } else { 1.5 }; - let shield_damage = if fighter.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; + let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; let sfx_lvl = if meter_lvl == 0 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_L }; let sound_attr = if meter_lvl == 0 { *COLLISION_SOUND_ATTR_PUNCH } else if meter_lvl == 1 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_KICK }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 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_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); if meter_lvl == 2 { AttackModule::set_damage_shake_scale(boma, 0.67); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_RESET_KO_GAUGE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_KO_GRAVITY); } - } -unsafe extern "C" fn littlemac_special_n2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); - if is_excute(fighter) { + if is_excute(agent) { let size = if meter < 40.0 { 0.5 } else if meter >= 40.0 && meter < 100.0 { 0.7 } else { 1.0 }; - EFFECT_FLW_POS(fighter, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); + EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("littlemac_ko_uppercut_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if meter >= 40.0 { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); } } } frame(lua_state, 8.0); let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(0.0, 90.0, 0.0), if meter == 100.0 { 0.3 } else { 0.0 }, false, 0, 0, 0, 0, 0, false, false); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, handle as u32, 1.5); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if meter == 100.0 { EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); } if meter < 40.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 10.5, 1.0, 4, 30, 110, 0.8, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.7, 0.7, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 10.5, 1.0, 4, 30, 110, 0.8, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.7, 0.7, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_ko_uppercut"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); } - } -unsafe extern "C" fn littlemac_special_n2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn2(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 (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_littlemac_rnd_special_n2")); - PLAY_SE(fighter, Hash40::new("se_littlemac_special_n03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_littlemac_rnd_special_n2")); + PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); } else { if (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) < 40.0) { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_attack06")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_attack07")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l01")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l01")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_attack06")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_attack07")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l01")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l01")) }; } else { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n02")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n03")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n02")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n03")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")) }; } } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal04")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal04")); } else if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R)) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal05")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal05")); } else if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal06")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal06")); } } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); } - } -unsafe extern "C" fn littlemac_special_n2_expression(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_specialn2(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); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); - QUAKE(fighter, if meter < 40.0 {*CAMERA_QUAKE_KIND_M} else { *CAMERA_QUAKE_KIND_L }); + QUAKE(agent, if meter < 40.0 {*CAMERA_QUAKE_KIND_M} else { *CAMERA_QUAKE_KIND_L }); let rumble = if meter < 100.0 { Hash40::new("rbkind_nohitl") } else { Hash40::new("rbkind_nohitll") }; ControlModule::set_rumble(boma, rumble, 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_elecattack"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } - } -unsafe extern "C" fn littlemac_special_s_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.1, 0.0, 7.4, 3.0, 0.0, 7.4, 3.2, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.1, 0.0, 7.4, 3.0, 0.0, 7.4, 3.2, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 23, 0, 3.0, 0.0, 0.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 23, 0, 3.0, 0.0, 0.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.2, 0.0, 8.6, -3.0, 0.0, 9.0, 3.4, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.2, 0.0, 8.6, -3.0, 0.0, 9.0, 3.4, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } wait(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_air_s_blow_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsblow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 68, 0, 75, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 68, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 68, 0, 75, 3.5, 0.0, 4.5, 5.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 68, 0, 75, 5.0, 0.0, 18.0, 5.0, Some(0.0), Some(10.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 68, 0, 75, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 68, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 68, 0, 75, 3.5, 0.0, 4.5, 5.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 68, 0, 75, 5.0, 0.0, 18.0, 5.0, Some(0.0), Some(10.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.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 littlemac_special_air_s_blow_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc2_aura"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc2"), Hash40::new("top"), 1, 8.5, -1.5, 0, -20, -110, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_attack_arc2_splash"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); +unsafe extern "C" fn effect_specialairsblow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc2_aura"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc2"), Hash40::new("top"), 1, 8.5, -1.5, 0, -20, -110, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_attack_arc2_splash"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_joltblow"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_joltblow"), false, false); EffectModule::enable_sync_init_pos_last(boma); } } -unsafe extern "C" fn littlemac_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 103, 100, 185, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 95, 100, 180, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 103, 100, 185, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 95, 100, 180, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 50, 0, 40, 6.5, 0.0, 26.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 0, 180, 0, 3.0, 0.0, 18.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 50, 0, 40, 6.5, 0.0, 26.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 0, 180, 0, 3.0, 0.0, 18.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 23.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 23.0, 3.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.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); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 197, 0, 45, 6.5, 0.0, 26.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 197, 0, 45, 6.5, 0.0, 26.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -367,7 +362,7 @@ unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -375,31 +370,31 @@ unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_specialnstart", littlemac_special_n_start_game) - .acmd("game_specialairnstart", littlemac_special_n_start_game) - .acmd("game_specialncancel", littlemac_special_n_cancel_game) - .acmd("game_specialairncancel", littlemac_special_n_cancel_game) - .acmd("effect_specialncancel", littlemac_special_n_cancel_effect) - .acmd("effect_specialairncancel", littlemac_special_n_cancel_effect) - .acmd("sound_specialncancel", littlemac_special_n_cancel_sound) - .acmd("sound_specialairncancel", littlemac_special_n_cancel_sound) - .acmd("expression_specialncancel", littlemac_special_n_cancel_expression) - .acmd("expression_specialairncancel", littlemac_special_n_cancel_expression) - .acmd("game_specialn2", littlemac_special_n2_game) - .acmd("game_specialairn2", littlemac_special_n2_game) - .acmd("effect_specialn2", littlemac_special_n2_effect) - .acmd("effect_specialairn2", littlemac_special_n2_effect) - .acmd("sound_specialn2", littlemac_special_n2_sound) - .acmd("sound_specialairn2", littlemac_special_n2_sound) - .acmd("expression_specialn2", littlemac_special_n2_expression) - .acmd("expression_specialairn2", littlemac_special_n2_expression) - .acmd("game_specialsjump", littlemac_special_s_jump_game) - .acmd("game_specialairsblow", littlemac_special_air_s_blow_game) - .acmd("effect_specialairsblow", littlemac_special_air_s_blow_effect) - .acmd("game_specialhistart", littlemac_special_hi_start_game) - .acmd("game_specialairhistart", littlemac_special_air_hi_start_game) - .acmd("game_specialhi", littlemac_special_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialncancel", game_specialncancel); + agent.acmd("game_specialairncancel", game_specialncancel); + agent.acmd("effect_specialncancel", effect_specialncancel); + agent.acmd("effect_specialairncancel", effect_specialncancel); + agent.acmd("sound_specialncancel", sound_specialncancel); + agent.acmd("sound_specialairncancel", sound_specialncancel); + agent.acmd("expression_specialncancel", expression_specialncancel); + agent.acmd("expression_specialairncancel", expression_specialncancel); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + + agent.acmd("game_specialsjump", game_specialsjump); + agent.acmd("game_specialairsblow", game_specialairsblow); + agent.acmd("effect_specialairsblow", effect_specialairsblow); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialhi", game_specialhi); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/throws.rs b/fighters/littlemac/src/acmd/throws.rs index 1f953359fd..ee6d66a161 100644 --- a/fighters/littlemac/src/acmd/throws.rs +++ b/fighters/littlemac/src/acmd/throws.rs @@ -1,176 +1,177 @@ use super::*; -unsafe extern "C" fn littlemac_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 littlemac_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 littlemac_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 littlemac_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 10.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 10.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 18, 3); + CHECK_FINISH_CAMERA(agent, 18, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 10.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 0, 60, 4.0, 0.0, 10.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 0, 60, 4.0, 0.0, 10.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 8); + CHECK_FINISH_CAMERA(agent, 11, 8); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn littlemac_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 90, 35, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 90, 35, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 14.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 14.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 11); + CHECK_FINISH_CAMERA(agent, 13, 11); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 85, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 85, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 100, 0, 60, 4.0, 0.0, 7.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 0, 60, 4.0, 0.0, 7.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 10, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_catch", littlemac_catch_game) - .acmd("game_catchdash", littlemac_catch_dash_game) - .acmd("game_catchturn", littlemac_catch_turn_game) - .acmd("game_throwf", littlemac_throw_f_game) - .acmd("game_throwb", littlemac_throw_b_game) - .acmd("game_throwhi", littlemac_throw_hi_game) - .acmd("game_throwlw", littlemac_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/littlemac/src/acmd/tilts.rs b/fighters/littlemac/src/acmd/tilts.rs index b281ebd735..29702fec5f 100644 --- a/fighters/littlemac/src/acmd/tilts.rs +++ b/fighters/littlemac/src/acmd/tilts.rs @@ -1,107 +1,104 @@ use super::*; -unsafe extern "C" fn littlemac_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 367, 100, 40, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 30, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 30, 100, 30, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 30, 100, 40, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("arml"), 4.0, 359, 100, 40, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 4.0, 20, 100, 45, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 367, 100, 40, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 30, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 30, 100, 30, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 30, 100, 40, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("arml"), 4.0, 359, 100, 40, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("hip"), 4.0, 20, 100, 45, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 4.0, 3.7, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 40, 130, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 4.0, 3.7, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 8.0, 40, 130, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 100, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 7.0, 100, 80, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 100, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 7.0, 100, 80, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn littlemac_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 45, 0, 75, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 72, 4.0, 4.4, 0.2, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 7.0, 70, 45, 0, 75, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 45, 0, 75, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 72, 4.0, 4.4, 0.2, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 7.0, 70, 45, 0, 75, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 1.7); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 1.7); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn littlemac_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7.5, -5.5, 25, 0, 0, 0.9, false); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, -7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7.5, -5.5, 25, 0, 0, 0.9, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, -7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2, 10.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2, 10.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attacks3", littlemac_attack_s3_game) - .acmd("game_attackhi3", littlemac_attack_hi3_game) - .acmd("game_attacklw3", littlemac_attack_lw3_game) - .acmd("effect_attacklw3", littlemac_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/littlemac/src/lib.rs b/fighters/littlemac/src/lib.rs index a08c069cc9..df03f89185 100644 --- a/fighters/littlemac/src/lib.rs +++ b/fighters/littlemac/src/lib.rs @@ -3,8 +3,10 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + mod vtable_hook; use smash::{ @@ -37,9 +39,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("littlemac"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/littlemac/src/opff.rs b/fighters/littlemac/src/opff.rs index 5aa9a9934b..0ec66fdd4b 100644 --- a/fighters/littlemac/src/opff.rs +++ b/fighters/littlemac/src/opff.rs @@ -146,8 +146,7 @@ pub unsafe fn littlemac_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("littlemac") - .on_line(Main, littlemac_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, littlemac_frame_wrapper); } diff --git a/fighters/littlemac/src/status.rs b/fighters/littlemac/src/status.rs deleted file mode 100644 index cbee494e62..0000000000 --- a/fighters/littlemac/src/status.rs +++ /dev/null @@ -1,35 +0,0 @@ -use super::*; - -mod special_n; -mod special_s; -mod special_hi; -mod special_lw; -mod special_lw_cancel; - -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::KO_MOTION_AIRTIME); - } - true.into() -} - -unsafe extern "C" fn littlemac_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_LITTLEMAC { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -pub fn install() { - special_n::install(); - special_s::install(); - special_hi::install(); - special_lw::install(); - special_lw_cancel::install(); - smashline::Agent::new("littlemac") - .on_start(littlemac_init) - .install(); -} \ No newline at end of file diff --git a/fighters/littlemac/src/status/mod.rs b/fighters/littlemac/src/status/mod.rs new file mode 100644 index 0000000000..7858fa8f42 --- /dev/null +++ b/fighters/littlemac/src/status/mod.rs @@ -0,0 +1,32 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; +mod special_lw_cancel; + +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::KO_MOTION_AIRTIME); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_lw_cancel::install(agent); +} \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_hi.rs b/fighters/littlemac/src/status/special_hi.rs index 87ad6554ae..16c86070ce 100644 --- a/fighters/littlemac/src/status/special_hi.rs +++ b/fighters/littlemac/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP @@ -8,8 +7,6 @@ unsafe extern "C" fn special_hi_jump_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_super_jump_punch_main as *const () as _)) } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_lw.rs b/fighters/littlemac/src/status/special_lw.rs index c2728fb61b..3948cfed13 100644 --- a/fighters/littlemac/src/status/special_lw.rs +++ b/fighters/littlemac/src/status/special_lw.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW unsafe extern "C" fn special_lw_old_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START); @@ -201,11 +202,9 @@ unsafe extern "C" fn special_lw_substatus(fighter: &mut L2CFighterCommon, param_ return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_old_pre) - .status(Init, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_LW_HIT, special_lw_hit_init) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_old_pre); + agent.status(Init, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_LW_HIT, special_lw_hit_init); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_main); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_lw_cancel.rs b/fighters/littlemac/src/status/special_lw_cancel.rs index 28a9f57d29..adbae515d2 100644 --- a/fighters/littlemac/src/status/special_lw_cancel.rs +++ b/fighters/littlemac/src/status/special_lw_cancel.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::littlemac::SPECIAL_LW_CANCEL unsafe extern "C" fn special_lw_cancel_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -163,15 +164,12 @@ unsafe extern "C" fn special_lw_jump_cancel_end(fighter: &mut L2CFighterCommon) return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_pre) - .status(Main, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_main) - .status(End, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_end) - .install(); - smashline::Agent::new("littlemac") - .status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_pre) - .status(Main, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_main) - .status(End, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_pre); + agent.status(Main, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_main); + agent.status(End, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_end); + + agent.status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_pre); + agent.status(Main, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_main); + agent.status(End, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_end); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_n.rs b/fighters/littlemac/src/status/special_n.rs index f21086406e..60004880f7 100644 --- a/fighters/littlemac/src/status/special_n.rs +++ b/fighters/littlemac/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -166,11 +167,9 @@ unsafe extern "C" fn special_n2_end(fighter: &mut L2CFighterCommon) -> L2CValue return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_main) - .status(End, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_main); + agent.status(End, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_end); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_s.rs b/fighters/littlemac/src/status/special_s.rs index 3ed456ce1d..4715e53fc7 100644 --- a/fighters/littlemac/src/status/special_s.rs +++ b/fighters/littlemac/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP @@ -160,11 +159,9 @@ unsafe extern "C" fn special_s_blow_end_main_loop(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_main) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_main); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_main); } \ No newline at end of file diff --git a/fighters/lucario/src/acmd/aerials.rs b/fighters/lucario/src/acmd/aerials.rs index ebdce0fe74..7915ce378e 100644 --- a/fighters/lucario/src/acmd/aerials.rs +++ b/fighters/lucario/src/acmd/aerials.rs @@ -1,94 +1,79 @@ - use super::*; -unsafe extern "C" fn lucario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 4.0, 365, 100, 42, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("legl"), 4.0, 365, 100, 42, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 8.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handr"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("legl"), 8.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 3.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 12.0, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.5, 60, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 6.7, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 8.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.5, 60, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 6.7, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - -} - -unsafe extern "C" fn lucario_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } @@ -105,140 +90,140 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 9.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.6, 361, 100, 0, 30, 5.2, 0.0, 11.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 100, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.6, 361, 100, 0, 30, 5.2, 0.0, 11.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 100, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.1, 65, 77, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.1, 65, 77, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 4.0, 4.0); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 10.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 10.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.4, 80, 80, 0, 30, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(12.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 90, 100, 0, 40, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(20.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.4, 80, 80, 0, 30, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(12.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 90, 100, 0, 40, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(20.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 8.0, 4.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucario_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn lucario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 8.0, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - let attack_air_lw_speed = fighter.get_float(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_ATTACK_AIR_LW_SPEED); + if is_excute(agent) { + let attack_air_lw_speed = agent.get_float(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_ATTACK_AIR_LW_SPEED); let curr_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * PostureModule::lr(boma); - SET_SPEED_EX(fighter, curr_speed_x, attack_air_lw_speed, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - fighter.on_flag(*FIGHTER_LUCARIO_ATTACK_AIR_STATUS_WORK_ID_FLAG_DEC_SPEED); + SET_SPEED_EX(agent, curr_speed_x, attack_air_lw_speed, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + agent.on_flag(*FIGHTER_LUCARIO_ATTACK_AIR_STATUS_WORK_ID_FLAG_DEC_SPEED); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 100, 30, 0, 20, 3.8, 0.0, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 50, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 150, 100, 25, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 100, 30, 0, 20, 3.8, 0.0, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 50, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 150, 100, 25, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 5.8, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 4.6, 0.0, 4.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 5.8, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 4.6, 0.0, 4.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attackairn", lucario_attack_air_n_game) - .acmd("game_attackairf", lucario_attack_air_f_game) - .acmd("expression_attackairf", lucario_attack_air_f_expression) - .acmd("expression_attackairf", expression_attackairf) - .acmd("game_attackairb", lucario_attack_air_b_game) - .acmd("game_attackairhi", lucario_attack_air_hi_game) - .acmd("expression_attackairhi", lucario_attack_air_hi_expression) - .acmd("game_attackairlw", lucario_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/lucario/src/acmd/ground.rs b/fighters/lucario/src/acmd/ground.rs index ccdfe26b90..e894ca0e8d 100644 --- a/fighters/lucario/src/acmd/ground.rs +++ b/fighters/lucario/src/acmd/ground.rs @@ -1,105 +1,103 @@ - use super::*; -unsafe extern "C" fn lucario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 6.0); - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 3.0, 60, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 60, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handl"), 3.0, 70, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 3.0, 60, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 60, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handl"), 3.0, 70, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // jab lock - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("arml"), 3.0, 361, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 3.0, 361, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("arml"), 3.0, 361, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("handl"), 3.0, 361, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // jab lock - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucario_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 120, 0, 30, 5.5, 0.0, 8.0, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 5.0, 55, 120, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 120, 0, 30, 5.5, 0.0, 8.0, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("footr"), 5.0, 55, 120, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attackdash", lucario_attack_dash_game) - .acmd("game_attack11", lucario_attack_11_game) - .acmd("game_attack12", lucario_attack_12_game) - .acmd("game_attack13", lucario_attack_13_game) - .install(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 7.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/lucario/src/acmd/mod.rs b/fighters/lucario/src/acmd/mod.rs index a878968545..d8a22387b4 100644 --- a/fighters/lucario/src/acmd/mod.rs +++ b/fighters/lucario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; -mod tilts; mod throws; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - ground::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucario/src/acmd/other.rs b/fighters/lucario/src/acmd/other.rs index d502b84510..8cda1da185 100644 --- a/fighters/lucario/src/acmd/other.rs +++ b/fighters/lucario/src/acmd/other.rs @@ -1,330 +1,257 @@ - 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_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(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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_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_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_lucario_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucario_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, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucario_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucario_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucario_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucario_step_left_m")); } } -unsafe extern "C" fn 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, 12.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); } } -unsafe extern "C" fn game_cliffattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_cliffattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 45, 20, 0, 90, 5.0, 0.0, 5.0, 5.2, Some(0.0), Some(5.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 45, 20, 0, 90, 5.0, 0.0, 5.0, 5.2, Some(0.0), Some(5.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_catchattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 361, 100, 40, 0, 5.5, 0.0, 8.0, 9.0, None, None, None, 2.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 361, 100, 40, 0, 5.5, 0.0, 8.0, 9.0, None, None, None, 2.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_slipattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_slipattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, 8.5, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, 8.5, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, -5.5, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, -5.5, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_downattackd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_downattackd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_downattacku(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_downattacku(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *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_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_appealhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("lucario") - .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("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("game_cliffattack", game_cliffattack) - .acmd("game_catchattack", game_catchattack) - .acmd("game_slipattack", game_slipattack) - .acmd("game_downattackd", game_downattackd) - .acmd("game_downattacku", game_downattacku) - .acmd("game_appealhil", game_appealhi) - .acmd("game_appealhir", game_appealhi) - .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("game_dash", game_dash); + 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("game_cliffattack", game_cliffattack); + + agent.acmd("game_catchattack", game_catchattack); + + agent.acmd("game_slipattack", game_slipattack); + + agent.acmd("game_downattackd", game_downattackd); + agent.acmd("game_downattacku", game_downattacku); + + agent.acmd("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); } diff --git a/fighters/lucario/src/acmd/smashes.rs b/fighters/lucario/src/acmd/smashes.rs index 9e7af7d98d..410a5c4f8c 100644 --- a/fighters/lucario/src/acmd/smashes.rs +++ b/fighters/lucario/src/acmd/smashes.rs @@ -1,96 +1,92 @@ - use super::*; -unsafe extern "C" fn lucario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 106, 0, 40, 5.7, 0.0, 8.0, 11.7, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 106, 0, 40, 5.7, 0.0, 8.0, 11.7, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 106, 0, 40, 3.3, 0.0, 8.0, 18.2, Some(0.0), Some(8.0), Some(6.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 106, 0, 40, 3.3, 0.0, 8.0, 18.2, Some(0.0), Some(8.0), Some(6.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.6, 85, 100, 100, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.6, 112, 100, 100, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.6, 85, 100, 100, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.6, 112, 100, 100, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.9, 80, 120, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.9, 80, 120, 0, 70, 5.0, 3.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.9, 80, 120, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.9, 80, 120, 0, 70, 5.0, 3.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 9, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 9, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_hattack_c"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_hattack_c"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_appeal_hadou"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_appeal_hadou"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); } - } -unsafe extern "C" fn sound_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("vc_lucario_attack05")); - PLAY_SE(fighter, Hash40::new("se_lucario_attackair_n")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("vc_lucario_attack05")); + PLAY_SE(agent, Hash40::new("se_lucario_attackair_n")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucario_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucario_smash_h01")); } } -unsafe extern "C" fn expression_attackhi4(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_attackhi4(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); } // frame(lua_state, 12.0); // execute(lua_state, 12.0); @@ -98,54 +94,54 @@ unsafe extern "C" fn expression_attackhi4(fighter: &mut L2CAgentBase) { // slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); // } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn lucario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 19.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 19.0, 7.0); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, 15.0, Some(0.0), Some(6.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, -15.0, Some(0.0), Some(6.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, 15.0, Some(0.0), Some(6.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, -15.0, Some(0.0), Some(6.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attacks4", lucario_attack_s4_s_game) - .acmd("game_attackhi4", lucario_attack_hi4_game) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("sound_attackhi4", sound_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", lucario_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index 7322f78c87..5aace0059d 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -1,81 +1,158 @@ - use super::*; -unsafe extern "C" fn lucario_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + } +} + +unsafe extern "C" fn effect_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 35.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); + } +} + +unsafe extern "C" fn expression_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 35.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + } +} + +unsafe extern "C" fn effect_specialairnbomb(agent: &mut L2CAgentBase) {} + +unsafe extern "C" fn sound_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); + } +} + +unsafe extern "C" fn expression_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 35.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 5.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_generatable(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG) { ArticleModule::generate_article(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG, false, 0); } } - } -unsafe extern "C" fn lucario_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 5.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_generatable(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG) { ArticleModule::generate_article(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG, false, 0); } } } -unsafe extern "C" fn lucario_special_air_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { // able to angle sideB dunk based on stick position on f22 - let throw_angle_min = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "force_palm_air.throw_angle_min") as u64; - let throw_angle_max = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "force_palm_air.throw_angle_max") as u64; - let kb_angle = if VarModule::get_float(fighter.object(), vars::lucario::status::AURA_OVERRIDE) > 0.0 - && fighter.stick_y() < 0.25 { - let angle = (270.0 + PostureModule::lr(boma) * fighter.stick_x().atan2(-fighter.stick_y()).to_degrees()) as u64; + let throw_angle_min = ParamModule::get_int(agent.battle_object, ParamType::Agent, "force_palm_air.throw_angle_min") as u64; + let throw_angle_max = ParamModule::get_int(agent.battle_object, ParamType::Agent, "force_palm_air.throw_angle_max") as u64; + let kb_angle = if VarModule::get_float(agent.object(), vars::lucario::status::AURA_OVERRIDE) > 0.0 + && agent.stick_y() < 0.25 { + let angle = (270.0 + PostureModule::lr(boma) * agent.stick_x().atan2(-agent.stick_y()).to_degrees()) as u64; angle.clamp(throw_angle_min, throw_angle_max) } else { 270 as u64 @@ -83,516 +160,405 @@ unsafe extern "C" fn lucario_special_air_s_throw_game(fighter: &mut L2CAgentBase // calculate angle to rotate Lucario's model based on knockback angle let rot = 270 - kb_angle; - VarModule::set_int(fighter.battle_object, vars::lucario::status::FORCE_PALM_ROT_ANGLE, rot as i32); + VarModule::set_int(agent.battle_object, vars::lucario::status::FORCE_PALM_ROT_ANGLE, rot as i32); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, kb_angle, 66, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, kb_angle, 66, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); + CHECK_FINISH_CAMERA(agent, 15, 0); + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 25.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + AttackModule::clear_all(boma); } frame(lua_state, 55.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - KineticModule::resume_energy_all(fighter.module_accessor); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::resume_energy_all(boma); } } -unsafe extern "C" fn game_specialsthrow(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 52, 86, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 52, 86, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 0); + CHECK_FINISH_CAMERA(agent, 15, 0); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); } frame(lua_state, 29.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn lucario_special_air_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_catch"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialairsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_catch"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_bflash_l"), Hash40::new("handl"), 0.5, 0, 0, 0, 0, 180, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucario_bflash_r"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_bflash_l"), Hash40::new("handl"), 0.5, 0, 0, 0, 0, 180, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("lucario_bflash_r"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn lucario_special_air_s_throw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_005")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_005")); let curr_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_CURR_AURAPOWER); let middle_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_SE_MIDDLE_AURAPOWER); let high_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_SE_HIGH_AURAPOWER); if curr_aurapower < middle_aurapower { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_s")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_s")); } else if curr_aurapower < high_aurapower { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_m")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_m")); } else { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_l")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_l")); } } } -unsafe extern "C" fn lucario_special_air_s_throw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 23.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_impact"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_impact"), 0); } frame(lua_state, 66.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn lucario_special_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); - frame(lua_state, 21.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); - } - -} - -unsafe extern "C" fn lucario_special_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } - } -unsafe extern "C" fn lucario_special_air_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } - } -unsafe extern "C" fn lucario_special_air_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_GRAVITY_ONOFF); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); - } - -} - -unsafe extern "C" fn lucario_special_hi_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhimove(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 0.5, 367, 100, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 0.5, 367, 100, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GroundModule::set_passable_check(boma, true); } - } -unsafe extern "C" fn lucario_special_hi_move_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhimove(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } } -unsafe extern "C" fn lucario_special_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 6.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 lucario_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_AIR_END_CONTROL_X); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - -} - -unsafe extern "C" fn game_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 37.0); - if is_excute(fighter) { - ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(fighter.battle_object, MeterModule::meter_per_level(fighter.battle_object)); - let frames = 120.max(VarModule::get_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); - } -} - -unsafe extern "C" fn effect_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 35.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sound_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_013")); - } -} - -unsafe extern "C" fn expression_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn game_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 37.0); - if is_excute(fighter) { - ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(fighter.battle_object, MeterModule::meter_per_level(fighter.battle_object)); - let frames = 120.max(VarModule::get_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); - } -} - -unsafe extern "C" fn effect_specialairnbomb(fighter: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn sound_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_013")); - } -} - -unsafe extern "C" fn expression_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.67, 0, 0.78, 0.31); - FLASH(fighter, 1, 1, 1, 0.75); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); - // EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -20, 0, 0, 0, 1.0, true); - // LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 0.67, 0, 0.78, 0.31); + FLASH(agent, 1, 1, 1, 0.75); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); + // EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -20, 0, 0, 0, 1.0, true); + // LAST_EFFECT_SET_RATE(agent, 0.4); } wait(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 2.0); } - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + COL_NORMAL(agent); + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn sound_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucario_special_l02")); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucario_special_l02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucario_special_l03_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucario_special_l03_s")); } } -unsafe extern "C" fn expression_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 57.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.67, 0, 0.78, 0.31); - FLASH(fighter, 1, 1, 1, 0.75); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); - // EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 19, -12, 45, 0, 0, 1.0, true); - // LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 0.67, 0, 0.78, 0.31); + FLASH(agent, 1, 1, 1, 0.75); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); + // EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 19, -12, 45, 0, 0, 1.0, true); + // LAST_EFFECT_SET_RATE(agent, 0.4); } wait(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 2.0); } - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + COL_NORMAL(agent); + AFTER_IMAGE_OFF(agent, 4); } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_specials", lucario_special_s_game) - .acmd("game_specialairs", lucario_special_air_s_game) - .acmd("game_specialairsthrow", lucario_special_air_s_throw_game) - .acmd("game_specialsthrow", game_specialsthrow) - .acmd("effect_specialairsthrow", lucario_special_air_s_throw_effect) - .acmd("sound_specialairsthrow", lucario_special_air_s_throw_sound) - .acmd("expression_specialairsthrow", lucario_special_air_s_throw_expression) - .acmd("game_specialhi", lucario_special_hi_l_game) - .acmd("game_specialhi", lucario_special_hi_r_game) - .acmd("game_specialairhi", lucario_special_air_hi_l_game) - .acmd("game_specialairhi", lucario_special_air_hi_r_game) - .acmd("game_specialhimove", lucario_special_hi_move_game) - .acmd("expression_specialhimove", lucario_special_hi_move_expression) - .acmd("game_specialhiend", lucario_special_hi_end_game) - .acmd("game_specialairhiend", lucario_special_air_hi_end_game) - .acmd("game_specialnbomb", game_specialnbomb) - .acmd("effect_specialnbomb", effect_specialnbomb) - .acmd("sound_specialnbomb", sound_specialnbomb) - .acmd("expression_specialnbomb", expression_specialnbomb) - .acmd("game_specialairnbomb", game_specialairnbomb) - .acmd("effect_specialairnbomb", effect_specialairnbomb) - .acmd("sound_specialairnbomb", sound_specialairnbomb) - .acmd("expression_specialairnbomb", expression_specialairnbomb) - .acmd("game_speciallw", game_speciallw) - .acmd("effect_speciallw", effect_speciallw) - .acmd("sound_speciallw", sound_speciallw) - .acmd("sound_specialairlw", sound_speciallw) - .acmd("expression_speciallw", expression_speciallw) - .acmd("expression_specialairlw", expression_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("effect_specialairlw", effect_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnbomb", game_specialnbomb); + agent.acmd("effect_specialnbomb", effect_specialnbomb); + agent.acmd("sound_specialnbomb", sound_specialnbomb); + agent.acmd("expression_specialnbomb", expression_specialnbomb); + agent.acmd("game_specialairnbomb", game_specialairnbomb); + agent.acmd("effect_specialairnbomb", effect_specialairnbomb); + agent.acmd("sound_specialairnbomb", sound_specialairnbomb); + agent.acmd("expression_specialairnbomb", expression_specialairnbomb); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsthrow", game_specialairsthrow); + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("effect_specialairsthrow", effect_specialairsthrow); + agent.acmd("sound_specialairsthrow", sound_specialairsthrow); + agent.acmd("expression_specialairsthrow", expression_specialairsthrow); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialhimove", game_specialhimove); + agent.acmd("expression_specialhimove", expression_specialhimove); + agent.acmd("game_specialhiend", game_specialhiend); + agent.acmd("game_specialairhiend", game_specialairhiend); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/lucario/src/acmd/throws.rs b/fighters/lucario/src/acmd/throws.rs index 094ecc39f1..f60c8a22db 100644 --- a/fighters/lucario/src/acmd/throws.rs +++ b/fighters/lucario/src/acmd/throws.rs @@ -1,189 +1,189 @@ - use super::*; -unsafe extern "C" fn lucario_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 lucario_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 lucario_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 40, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 40, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 5, 0); + CHECK_FINISH_CAMERA(agent, 5, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 2.0, y: -4.0, z: 0.0}); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 60, 5.5, 0.0, 8.5, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 60, 5.5, 0.0, 8.5, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 18, 5); + CHECK_FINISH_CAMERA(agent, 18, 5); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 10.0, y: 0.0, z: 0.0}); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 60, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 60, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 78, 110, 0, 75, 5.0, 0.0, 13.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 78, 110, 0, 75, 5.0, 0.0, 13.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 5, 7); + CHECK_FINISH_CAMERA(agent, 5, 7); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 3.0, y: 2.0, z: 0.0}); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 30, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 75, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 30, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 75, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 8, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: -3.0, z: 0.0}); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_catch", lucario_catch_game) - .acmd("game_catchdash", lucario_catch_dash_game) - .acmd("game_catchturn", lucario_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwf", game_throwf) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/lucario/src/acmd/tilts.rs b/fighters/lucario/src/acmd/tilts.rs index 91ed4e9388..ae0486e0a3 100644 --- a/fighters/lucario/src/acmd/tilts.rs +++ b/fighters/lucario/src/acmd/tilts.rs @@ -1,106 +1,105 @@ - use super::*; -unsafe extern "C" fn lucario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); // GROUND ONLY - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 361, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 361, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // AIR ONLY - ATTACK(fighter, 4, 0, Hash40::new("shoulderl"), 4.0, 366, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 4.0, 366, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderl"), 4.0, 366, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 4.0, 366, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 1, Hash40::new("shoulderl"), 6.0, 361, 105, 0, 57, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("shoulderr"), 6.0, 361, 105, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 5.5, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("shoulderl"), 6.0, 361, 105, 0, 57, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("shoulderr"), 6.0, 361, 105, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 5.5, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 96, 100, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 96, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 96, 100, 0, 60, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 96, 100, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 96, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 96, 100, 0, 60, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -30, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -30, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -110, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -110, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn lucario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 4.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 105, 0, 45, 4.0, 0.0, 2.8, 9.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 105, 0, 45, 4.0, 0.0, 2.8, 9.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attacks3", lucario_attack_s3_s_game) - .acmd("game_attacks3lw", lucario_attack_s3_s_game) - .acmd("game_attacks3hi", lucario_attack_s3_s_game) - .acmd("game_attackhi3", lucario_attack_hi3_game) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", lucario_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/lucario/src/auraball/mod.rs b/fighters/lucario/src/auraball/mod.rs new file mode 100644 index 0000000000..74472bf692 --- /dev/null +++ b/fighters/lucario/src/auraball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod status; + +pub fn install() { + let agent = &mut Agent::new("lucario_auraball"); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucario/src/auraball/status.rs b/fighters/lucario/src/auraball/status.rs new file mode 100644 index 0000000000..12caa5e386 --- /dev/null +++ b/fighters/lucario/src/auraball/status.rs @@ -0,0 +1,92 @@ +use super::*; +use globals::*; + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT + +pub unsafe extern "C" fn shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP, VarModule::is_flag(owner_module_accessor.object(), vars::lucario::instance::IS_POWERED_UP)); + //println!("lucario_auraball is_powered_up: {}", VarModule::is_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP)); + smashline::original_status(Pre, fighter, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT)(fighter) +} + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_START + +// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +// pub unsafe fn auraball_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("start"), 0.0, 1.0, false, 0.0, false, false); +// auraball_set_scale(fighter); +// fighter.fastshift(L2CValue::Ptr(auraball_start_main_loop as *const () as _)) +// } + +// unsafe extern "C" fn auraball_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// return 0.into(); +// } + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE + +// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +// pub unsafe fn auraball_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// let motion_kind = if charge_frame >= max_charge_frame {Hash40::new("charge_max")} else {Hash40::new("charge")}; +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge"), 0.0, 1.0, false, 0.0, false, false); +// auraball_set_scale(fighter); +// fighter.fastshift(L2CValue::Ptr(auraball_charge_main_loop as *const () as _)) +// } + +// unsafe extern "C" fn auraball_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// let motion_kind = MotionModule::motion_kind(fighter.module_accessor); +// if motion_kind != hash40("charge") { +// return 0.into(); +// } +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// if charge_frame >= max_charge_frame { +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge_max"), 0.0, 1.0, false, 0.0, false, false); +// } +// return 0.into(); +// } + +// unsafe extern "C" fn auraball_set_scale(fighter: &mut L2CFighterCommon) { +// let original_size = fighter.get_param_float("param_auraball", "original_size"); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let charge_ratio = (charge_frame as f32) / (max_charge_frame as f32); +// println!("charge_ratio: {}", charge_ratio); + +// let mut hvar4 = ""; +// let mut min_scale = 0.0; +// let mut max_scale = 0.0; +// if StatusModule::status_kind(fighter.module_accessor) == *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT { +// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale_shoot"); +// hvar4 = "charge_max_scale_shoot"; +// } else { +// hvar4 = "charge_max_scale_mid"; +// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale"); +// if 1.0 <= charge_ratio { +// println!("if conditional"); +// max_scale = fighter.get_param_float("param_auraball", "charge_max_scale"); +// let fvar9 = fighter.get_param_float("param_auraball", "charge_max_scale_mid"); +// fighter.set_float(fvar9 / max_scale, *WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_EFFECT_JOINT_SCALE); +// hvar4 = "charge_max_scale"; +// } +// } +// max_scale = fighter.get_param_float("param_auraball", hvar4); + +// let work_scale = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_SCALE); +// let work_aurapower = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_AURAPOWER); +// let scale_mul = fighter.get_param_float("param_auraball", "scale_mul"); +// let scale_add = fighter.get_param_float("param_auraball", "scale_add"); + +// let scale = work_scale * (1.0 / original_size) * +// ((charge_ratio * max_scale + (1.0 - charge_ratio) * min_scale) * work_aurapower * scale_mul + scale_add); +// println!("scale: {}, work_scale: {}, original_size: {}, charge_ratio: {}, max_scale: {}, min_scale: {}, work_aurapower: {}, scale_mul: {}, scale_add: {}", +// scale, work_scale, original_size, charge_ratio, max_scale, min_scale, work_aurapower, scale_mul, scale_add); +// PostureModule::set_scale(fighter.module_accessor, scale, false); + +// } + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, shoot_pre); +} \ No newline at end of file diff --git a/fighters/lucario/src/lib.rs b/fighters/lucario/src/lib.rs index 5537dac979..5329f81e88 100644 --- a/fighters/lucario/src/lib.rs +++ b/fighters/lucario/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod auraball; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucario"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + auraball::install(); } \ No newline at end of file diff --git a/fighters/lucario/src/opff.rs b/fighters/lucario/src/opff.rs index 9da33e47fa..2b0074f728 100644 --- a/fighters/lucario/src/opff.rs +++ b/fighters/lucario/src/opff.rs @@ -367,9 +367,7 @@ unsafe fn magic_series(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo } } -pub fn install() { - smashline::Agent::new("lucario") - .on_line(Main, lucario_frame_wrapper) - .on_line(Main, lucario_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lucario_frame_wrapper); + agent.on_line(Main, lucario_meter); } \ No newline at end of file diff --git a/fighters/lucario/src/status/attack_air.rs b/fighters/lucario/src/status/attack_air.rs index 40270449dd..17dcfa4c60 100644 --- a/fighters/lucario/src/status/attack_air.rs +++ b/fighters/lucario/src/status/attack_air.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -// status script import + +// FIGHTER_STATUS_KIND_ATTACK_AIR pub unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { // if under USpecial penalty and next status would have been landing, use special landing instead @@ -86,9 +86,7 @@ unsafe extern "C" fn status_AttackAir_Main_lucario(fighter: &mut L2CFighterCommo return false.into(); } -pub fn install() { - smashline::Agent::new("lucario") - .status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status/attack_hi4.rs b/fighters/lucario/src/status/attack_hi4.rs index 1e5c93f8e4..24661f6660 100644 --- a/fighters/lucario/src/status/attack_hi4.rs +++ b/fighters/lucario/src/status/attack_hi4.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -// status script import + +// FIGHTER_STATUS_KIND_ATTACK_HI4 pub unsafe extern "C" fn attack_hi4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -90,9 +90,8 @@ unsafe extern "C" fn attack_hi_set_kinetic(fighter: &mut L2CFighterCommon) { // KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); } } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_main) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status.rs b/fighters/lucario/src/status/mod.rs similarity index 69% rename from fighters/lucario/src/status.rs rename to fighters/lucario/src/status/mod.rs index 5838faff52..ee0517bebd 100644 --- a/fighters/lucario/src/status.rs +++ b/fighters/lucario/src/status/mod.rs @@ -1,6 +1,7 @@ use super::*; use globals::*; // status script import + mod attack_air; mod attack_hi4; mod special_hi; @@ -15,21 +16,6 @@ extern "C" { fn store_event_table(event: *const app::LinkEvent) -> L2CValue; } -extern "C" fn lucario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_LUCARIO { - return; - } - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - MeterModule::reset(fighter.battle_object); - MeterModule::set_meter_cap(fighter.object(), 2); - MeterModule::set_meter_per_level(fighter.object(), 100.0); - MeterModule::add(fighter.battle_object, dbg!(MeterModule::meter_per_level(fighter.battle_object))); - VarModule::off_flag(fighter.battle_object, vars::lucario::instance::METER_IS_BURNOUT); - } -} - unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::lucario::instance::DISABLE_SPECIAL_LW) { false.into() @@ -107,20 +93,30 @@ pub unsafe extern "C" fn pre_run(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Run() } -pub fn install() { - attack_air::install(); - attack_hi4::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); - smashline::Agent::new("lucario") - .on_start(lucario_init) - .status(Main, *FIGHTER_STATUS_KIND_SHIELD_BREAK_FLY, shield_break_fly_main) - .status(Main, *FIGHTER_STATUS_KIND_DEAD, dead_main) - .status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main) - .status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk) - .status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash) - .status(Pre, *FIGHTER_STATUS_KIND_RUN, pre_run) - .install(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + MeterModule::reset(fighter.battle_object); + MeterModule::set_meter_cap(fighter.object(), 2); + MeterModule::set_meter_per_level(fighter.object(), 100.0); + MeterModule::add(fighter.battle_object, dbg!(MeterModule::meter_per_level(fighter.battle_object))); + VarModule::off_flag(fighter.battle_object, vars::lucario::instance::METER_IS_BURNOUT); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + attack_hi4::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); + + agent.status(Main, *FIGHTER_STATUS_KIND_SHIELD_BREAK_FLY, shield_break_fly_main); + agent.status(Main, *FIGHTER_STATUS_KIND_DEAD, dead_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk); + agent.status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash); + agent.status(Pre, *FIGHTER_STATUS_KIND_RUN, pre_run); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_hi.rs b/fighters/lucario/src/status/special_hi.rs index be13247618..3e2aa86c50 100644 --- a/fighters/lucario/src/status/special_hi.rs +++ b/fighters/lucario/src/status/special_hi.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND @@ -340,10 +338,8 @@ unsafe extern "C" fn lucario_special_hi_get_vec(_fighter: &mut L2CFighterCommon, vec } -pub fn install() { - smashline::Agent::new("lucario") - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH, lucario_special_hi_rush_main) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH_END, lucario_special_hi_rush_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH, lucario_special_hi_rush_main); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH_END, lucario_special_hi_rush_end_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_lw.rs b/fighters/lucario/src/status/special_lw.rs index ff4a577a97..5acdd280b3 100644 --- a/fighters/lucario/src/status/special_lw.rs +++ b/fighters/lucario/src/status/special_lw.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -// status script import -unsafe extern "C" fn lucario_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -31,7 +31,7 @@ unsafe extern "C" fn lucario_special_lw_pre(fighter: &mut L2CFighterCommon) -> L return 0.into(); } -unsafe extern "C" fn lucario_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_lw") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); @@ -39,14 +39,14 @@ unsafe extern "C" fn lucario_special_lw_main(fighter: &mut L2CFighterCommon) -> if !fighter.is_situation(*SITUATION_KIND_GROUND) { VarModule::on_flag(fighter.object(), vars::lucario::instance::DISABLE_SPECIAL_LW); } - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_lw_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn lucario_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { special_lw_set_kinetic(fighter); @@ -135,10 +135,8 @@ unsafe extern "C" fn special_lw_set_kinetic(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_main) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index 02524ca156..440e1d07d9 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -1,105 +1,17 @@ use super::*; -use globals::*; -// status script import // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT -pub unsafe extern "C" fn lucario_special_n_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP); smashline::original_status(Pre, fighter, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT)(fighter) } -unsafe extern "C" fn lucario_special_n_shoot_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_shoot_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT - -pub unsafe extern "C" fn auraball_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP, VarModule::is_flag(owner_module_accessor.object(), vars::lucario::instance::IS_POWERED_UP)); - println!("lucario_auraball is_powered_up: {}", VarModule::is_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP)); - smashline::original_status(Pre, fighter, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT)(fighter) -} - -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_START - -// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// pub unsafe fn auraball_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("start"), 0.0, 1.0, false, 0.0, false, false); -// auraball_set_scale(fighter); -// fighter.fastshift(L2CValue::Ptr(auraball_start_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn auraball_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// return 0.into(); -// } - -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE - -// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// pub unsafe fn auraball_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// let motion_kind = if charge_frame >= max_charge_frame {Hash40::new("charge_max")} else {Hash40::new("charge")}; -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge"), 0.0, 1.0, false, 0.0, false, false); -// auraball_set_scale(fighter); -// fighter.fastshift(L2CValue::Ptr(auraball_charge_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn auraball_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// let motion_kind = MotionModule::motion_kind(fighter.module_accessor); -// if motion_kind != hash40("charge") { -// return 0.into(); -// } -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// if charge_frame >= max_charge_frame { -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge_max"), 0.0, 1.0, false, 0.0, false, false); -// } -// return 0.into(); -// } - -// unsafe extern "C" fn auraball_set_scale(fighter: &mut L2CFighterCommon) { -// let original_size = fighter.get_param_float("param_auraball", "original_size"); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let charge_ratio = (charge_frame as f32) / (max_charge_frame as f32); -// println!("charge_ratio: {}", charge_ratio); - -// let mut hvar4 = ""; -// let mut min_scale = 0.0; -// let mut max_scale = 0.0; -// if StatusModule::status_kind(fighter.module_accessor) == *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT { -// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale_shoot"); -// hvar4 = "charge_max_scale_shoot"; -// } else { -// hvar4 = "charge_max_scale_mid"; -// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale"); -// if 1.0 <= charge_ratio { -// println!("if conditional"); -// max_scale = fighter.get_param_float("param_auraball", "charge_max_scale"); -// let fvar9 = fighter.get_param_float("param_auraball", "charge_max_scale_mid"); -// fighter.set_float(fvar9 / max_scale, *WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_EFFECT_JOINT_SCALE); -// hvar4 = "charge_max_scale"; -// } -// } -// max_scale = fighter.get_param_float("param_auraball", hvar4); - -// let work_scale = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_SCALE); -// let work_aurapower = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_AURAPOWER); -// let scale_mul = fighter.get_param_float("param_auraball", "scale_mul"); -// let scale_add = fighter.get_param_float("param_auraball", "scale_add"); - -// let scale = work_scale * (1.0 / original_size) * -// ((charge_ratio * max_scale + (1.0 - charge_ratio) * min_scale) * work_aurapower * scale_mul + scale_add); -// println!("scale: {}, work_scale: {}, original_size: {}, charge_ratio: {}, max_scale: {}, min_scale: {}, work_aurapower: {}, scale_mul: {}, scale_add: {}", -// scale, work_scale, original_size, charge_ratio, max_scale, min_scale, work_aurapower, scale_mul, scale_add); -// PostureModule::set_scale(fighter.module_accessor, scale, false); - -// } - // FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -115,7 +27,7 @@ unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LUCARIO_AURABALL_TRANSITION_TERM_ID_START_HOLD); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LUCARIO_AURABALL_TRANSITION_TERM_ID_START_SHOOT); } - lucario_special_n_joint_translate(fighter); + special_n_joint_translate(fighter); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) } @@ -159,11 +71,11 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); + special_n_save_charge_status(fighter); 0.into() } -pub unsafe extern "C" fn lucario_special_n_joint_translate(fighter: &mut L2CFighterCommon) { +pub unsafe extern "C" fn special_n_joint_translate(fighter: &mut L2CFighterCommon) { let havel = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; let haver = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; ModelModule::joint_global_position( @@ -191,7 +103,7 @@ pub unsafe extern "C" fn lucario_special_n_joint_translate(fighter: &mut L2CFigh // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD -unsafe extern "C" fn lucario_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); @@ -215,10 +127,10 @@ unsafe extern "C" fn lucario_special_n_hold_main(fighter: &mut L2CFighterCommon) MotionModule::set_rate(fighter.module_accessor, rate); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_n_hold_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_hold_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) && StatusModule::is_situation_changed(fighter.module_accessor) { special_n_set_kinetic(fighter); @@ -247,23 +159,23 @@ unsafe extern "C" fn lucario_special_n_hold_main_loop(fighter: &mut L2CFighterCo 0.into() } -unsafe extern "C" fn lucario_special_n_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX -unsafe extern "C" fn lucario_special_n_max_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_n_max") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_max") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); special_n_set_kinetic(fighter); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_n_max_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_max_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) && StatusModule::is_situation_changed(fighter.module_accessor) { special_n_set_kinetic(fighter); @@ -287,8 +199,8 @@ unsafe extern "C" fn lucario_special_n_max_main_loop(fighter: &mut L2CFighterCom 0.into() } -unsafe extern "C" fn lucario_special_n_max_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_max_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } @@ -413,7 +325,7 @@ unsafe extern "C" fn special_n_set_kinetic(fighter: &mut L2CFighterCommon) { } } -pub unsafe extern "C" fn lucario_special_n_save_charge_status(fighter: &mut L2CFighterCommon) { +pub unsafe extern "C" fn special_n_save_charge_status(fighter: &mut L2CFighterCommon) { let curr_status = StatusModule::status_kind(fighter.module_accessor); let next_status = fighter.global_table[STATUS_KIND].get_i32(); let is_kirby = fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_KIRBY; @@ -454,21 +366,15 @@ pub unsafe extern "C" fn lucario_special_n_save_charge_status(fighter: &mut L2CF } else { EffectModule::remove_common(fighter.module_accessor, Hash40::new("charge_max")); } - } -pub fn install() { - smashline::Agent::new("lucario_auraball") - .status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, auraball_shoot_pre) - .install(); - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_pre) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_main) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_main) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_pre); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_end); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, special_n_max_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, special_n_max_end); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_s.rs b/fighters/lucario/src/status/special_s.rs index a087880c61..010f51a614 100644 --- a/fighters/lucario/src/status/special_s.rs +++ b/fighters/lucario/src/status/special_s.rs @@ -1,8 +1,6 @@ use super::*; -use globals::*; -// status script import -// FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW // +// FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW unsafe extern "C" fn special_s_throw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -186,9 +184,7 @@ unsafe extern "C" fn special_s_throw_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(special_s_throw_main_loop as *const () as _)) } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_pre) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_pre); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_main); } \ No newline at end of file diff --git a/fighters/lucas/src/acmd/aerials.rs b/fighters/lucas/src/acmd/aerials.rs index ddddf8fea6..05b46e9590 100644 --- a/fighters/lucas/src/acmd/aerials.rs +++ b/fighters/lucas/src/acmd/aerials.rs @@ -1,560 +1,558 @@ - use super::*; -unsafe extern "C" fn lucas_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (6.0-1.0)/2.5); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); MotionModule::set_rate(boma, (23.0-6.0)/11.5); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } frame(lua_state, 23.0); MotionModule::set_rate(boma, (26.0-23.0)/1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 1.5, 0.0, 4.5, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 9.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 1.5, 0.0, 4.5, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 9.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 4.0); MotionModule::set_rate(boma, (72.0-30.0)/31.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 69.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 lucas_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 0.9, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 0.9, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 4.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 4.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1.5, 4.0, 0, -90, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1.5, 4.0, 0, -90, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_n_sound (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 26.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackhard_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackhard_s01")); } } -unsafe extern "C" fn lucas_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, 6.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, -4.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 3.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, 6.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, -4.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 3.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_landing_air_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.5); +unsafe extern "C" fn effect_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn lucas_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, 2.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 55, 93, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 55, 93, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toel"), 10.0, 45, 115, 0, 30, 5.0, 3.0, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 55, 93, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 55, 93, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toel"), 10.0, 45, 115, 0, 30, 5.0, 3.0, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 55, 94, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 55, 94, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toel"), 8.0, 55, 93, 0, 36, 4.0, 3.0, 0.4, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 55, 94, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 55, 94, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toel"), 8.0, 55, 93, 0, 36, 4.0, 3.0, 0.4, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucas_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("legl"), 9.2, -2.0, 0.0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("legl"), 9.2, -2.0, 0.0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - //ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.5, 8.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.5, 8.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 280, 90, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - //ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 280, 100, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 285, 80, 0, 30, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 15.0, 300, 57, 0, 20, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 280, 90, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 280, 100, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 285, 80, 0, 30, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 15.0, 300, 57, 0, 20, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, (32.0-21.0)/17.0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucas_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("kneer"), 6.5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("kneer"), 6.5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8.0, -0.2, 0, 155, 90, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 0.95); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.7, -2.0, 0, 0, 90, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8.0, -0.2, 0, 155, 90, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 0.95); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.7, -2.0, 0, 0, 90, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("kneer"), 7, 0, 0, 0, 90, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("kneer"), 7, 0, 0, 0, 90, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk_lw"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk_lw"), false, false); } } -unsafe extern "C" fn lucas_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn lucas_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 70, 100, 0, 20, 5.74, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 70, 100, 0, 20, 5.74, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucas_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.3, 7.8, -2.0, -55, -128, -62, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.4); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.3, 7.8, -2.0, -55, -128, -62, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.4); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1.05, 14.5, 2.0, 0, 0, 0, 1.31, 0, 0, 0, 0, 0, 0, true, 0.7); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1.05, 14.5, 2.0, 0, 0, 0, 1.31, 0, 0, 0, 0, 0, 0, true, 0.7); } } -unsafe extern "C" fn lucas_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn lucas_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -4.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -4.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); } - } -unsafe extern "C" fn lucas_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, -3, 0.0, 0, 0, 0, 0.81, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, -3, 0.0, 0, 0, 0, 0.81, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.55, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.55, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.6, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.64, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.64, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l05")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l01")); } wait(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l04")); } - } -unsafe extern "C" fn lucas_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn lucas_attack_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("shoot"), false, 0.0); } frame(lua_state, 4.0); MotionModule::set_rate(boma, (6.0-4.0)/4.0); frame(lua_state, 5.0); //6 - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - fighter.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + agent.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 5.5); //8 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, -1.0, -3.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, -1.0, -3.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); } frame(lua_state, 6.0); MotionModule::set_rate(boma, 1.0); // sets rest of move back to normal rate on frame 6 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, 0.0, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); - fighter.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, 0.0, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + agent.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn lucas_attack_air_catch_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 3.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn lucas_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("air_catch_landing"), false, -1.0); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 9.0);//10 + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 9.0);//10 frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attackairn", lucas_attack_air_n_game) - .acmd("effect_attackairn", lucas_attack_air_n_effect) - .acmd("sound_attackairn", lucas_attack_air_n_sound) - .acmd("game_landingairn", lucas_landing_air_n_game) - .acmd("effect_landingairn", lucas_landing_air_n_effect) - .acmd("game_attackairf", lucas_attack_air_f_game) - .acmd("effect_attackairf", lucas_attack_air_f_effect) - .acmd("game_attackairb", lucas_attack_air_b_game) - .acmd("effect_attackairb", lucas_attack_air_b_effect) - .acmd("expression_attackairb", lucas_attack_air_b_expression) - .acmd("game_attackairhi", lucas_attack_air_hi_game) - .acmd("effect_attackairhi", lucas_attack_air_hi_effect) - .acmd("expression_attackairhi", lucas_attack_air_hi_expression) - .acmd("game_attackairlw", lucas_attack_air_lw_game) - .acmd("effect_attackairlw", lucas_attack_air_lw_effect) - .acmd("sound_attackairlw", lucas_attack_air_lw_sound) - .acmd("expression_attackairlw", lucas_attack_air_lw_expression) - .acmd("game_aircatch", lucas_attack_air_catch_game) - .acmd("expression_aircatch", lucas_attack_air_catch_expression) - .acmd("game_aircatchlanding", lucas_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("game_landingairn", game_landingairn); + agent.acmd("effect_landingairn", effect_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("expression_aircatch", expression_aircatch); + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/lucas/src/acmd/ground.rs b/fighters/lucas/src/acmd/ground.rs index 0d6a284b63..06dfa6f2c0 100644 --- a/fighters/lucas/src/acmd/ground.rs +++ b/fighters/lucas/src/acmd/ground.rs @@ -1,220 +1,215 @@ - use super::*; -unsafe extern "C" fn lucas_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn lucas_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 5.5, 3.5, -12, -35, 20, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 5.5, 3.5, -12, -35, 20, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, 0.0, 1.0, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, 0.0, 1.0, 0, 0, 0, 0.3, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucas_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 5.5, 5.5, 10, -20, 185, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 5.5, 5.5, 10, -20, 185, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, -1.0, 0.0, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, -1.0, 0.0, 0, 0, 0, 0.3, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 48, 80, 0, 60, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 3.2, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 5.0, 6.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 48, 80, 0, 60, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 3.2, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 5.0, 6.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.0, 8.0, -28, -45, 30, 1.0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.0, 8.0, -28, -45, 30, 1.0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 5.0, -0.75, 0.0, 0, 0, 0, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 5.0, -0.75, 0.0, 0, 0, 0, 0.4, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 83, 68, 0, 70, 5.8, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 83, 68, 0, 60, 4.5, 0.0, 5.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 83, 68, 0, 70, 5.8, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 83, 68, 0, 60, 4.5, 0.0, 5.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 45, 4.8, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 90, 0, 35, 3.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 45, 4.8, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 90, 0, 35, 3.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn lucas_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0.2, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0.2, 0, 0, 0, 0.8, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 5, 11.0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 5, 11.0, 0, 0, 0, 0.65, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } - } -unsafe extern "C" fn lucas_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackdash")); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_left_m")); } - } -unsafe extern "C" fn lucas_attack_dash_expression(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_INTP, *SLOPE_STATUS_TOP, 4); +unsafe extern "C" fn expression_attackdash(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_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attack11", lucas_attack_11_game) - .acmd("effect_attack11", lucas_attack_11_effect) - .acmd("game_attack12", lucas_attack_12_game) - .acmd("effect_attack12", lucas_attack_12_effect) - .acmd("game_attack13", lucas_attack_13_game) - .acmd("effect_attack13", lucas_attack_13_effect) - .acmd("game_attackdash", lucas_attack_dash_game) - .acmd("effect_attackdash", lucas_attack_dash_effect) - .acmd("sound_attackdash", lucas_attack_dash_sound) - .acmd("expression_attackdash", lucas_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/lucas/src/acmd/mod.rs b/fighters/lucas/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/lucas/src/acmd/mod.rs +++ b/fighters/lucas/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucas/src/acmd/other.rs b/fighters/lucas/src/acmd/other.rs index 4feeec0a33..75bad3a063 100644 --- a/fighters/lucas/src/acmd/other.rs +++ b/fighters/lucas/src/acmd/other.rs @@ -1,319 +1,142 @@ - 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_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(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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_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_lucas_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucas_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, 13.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_right_l")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_left_l")); } } -unsafe extern "C" fn lucas_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, 11.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 lucas_pkfire_shoot_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"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn lucas_pkfire_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - for i in 1..=50 { - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_bullet_ed"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - } - wait(lua_state, 8.0); - } -} - -unsafe extern "C" fn lucas_pkfire_pillar_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"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - //} - //wait(lua_state, 10.0); - //if is_excute(fighter) { - // AttackModule::clear_all(boma); - // AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); - //} } -unsafe extern "C" fn lucas_pkfire_pillar_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); - EFFECT(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - /* - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - } - */ -} - -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 lucas_pkfire_pillar_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_s")); - } -} - -unsafe extern "C" fn lucas_appeal_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - if fighter.is_button_on(Buttons::AppealHi) { - StatusModule::change_status_request_from_script(fighter.module_accessor, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); + if is_excute(agent) { + if agent.is_button_on(Buttons::AppealHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); } } } -unsafe extern "C" fn lucas_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - if fighter.is_button_on(Buttons::Guard) && is_training_mode() { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if agent.is_button_on(Buttons::Guard) && is_training_mode() { + let charge_time = ParamModule::get_int(agent.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } } } -unsafe extern "C" fn lucas_pkthunder_game_move(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"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} +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); -unsafe extern "C" fn lucas_pkthunder_game_move_child(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - AttackModule::set_attack_composition_speed(boma, 1, true); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -pub fn install() { - smashline::Agent::new("lucas_pkthunder") - .acmd("game_move", lucas_pkthunder_game_move) - .acmd("game_movechild", lucas_pkthunder_game_move_child) - .install(); - smashline::Agent::new("lucas_pkfire") - .acmd("game_shoot", lucas_pkfire_shoot_game) - .acmd("effect_shoot", lucas_pkfire_shoot_effect) - .acmd("game_pillar", lucas_pkfire_pillar_game) - .acmd("effect_pillar", lucas_pkfire_pillar_effect) - .acmd("sound_pillar", lucas_pkfire_pillar_sound) - .install(); - smashline::Agent::new("lucas") - .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", lucas_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealhir", lucas_appeal_hi_game) - .acmd("game_appealhil", lucas_appeal_hi_game) - .acmd("game_appeallwr", lucas_appeal_lw_game) - .acmd("game_appeallwl", lucas_appeal_lw_game) - .install(); + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhir); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwr); } diff --git a/fighters/lucas/src/acmd/smashes.rs b/fighters/lucas/src/acmd/smashes.rs index 032ee5630d..a8ecf95731 100644 --- a/fighters/lucas/src/acmd/smashes.rs +++ b/fighters/lucas/src/acmd/smashes.rs @@ -1,236 +1,235 @@ - use super::*; -unsafe extern "C" fn lucas_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_visible").hash as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.stick_y() > 0.3 { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + if agent.stick_y() > 0.3 { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } - else if fighter.stick_y() < -0.3 { - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + else if agent.stick_y() < -0.3 { + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } else { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } frame(lua_state, 10.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_START); } frame(lua_state, 14.0); - if is_excute(fighter) { - //println!("Stick Y Pos: {} | Flags: Low={} High={}", fighter.stick_y(), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 89, 0, 54, 3.7, 0.0, 4.4, 9.8, Some(0.0), Some(6.6), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 92, 0, 54, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.4), Some(9.8), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); + if is_excute(agent) { + //println!("Stick Y Pos: {} | Flags: Low={} High={}", agent.stick_y(), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 89, 0, 54, 3.7, 0.0, 4.4, 9.8, Some(0.0), Some(6.6), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 92, 0, 54, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.4), Some(9.8), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 89, 0, 54, 3.7, 0.0, 9.2, 7.0, Some(0.0), Some(5.6), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 361, 92, 0, 54, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.2), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 89, 0, 54, 3.7, 0.0, 9.2, 7.0, Some(0.0), Some(5.6), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 92, 0, 54, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.2), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 361, 89, 0, 54, 3.7, 0.0, 5.6, 7.0, Some(0.0), Some(5.6), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 361, 92, 0, 54, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 361, 89, 0, 54, 3.7, 0.0, 5.6, 7.0, Some(0.0), Some(5.6), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 361, 92, 0, 54, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BAT, *ATTACK_REGION_BAT); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_END); } frame(lua_state, 25.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } else { - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_visible").hash as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.stick_y() > 0.3 { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + if agent.stick_y() > 0.3 { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } - else if fighter.stick_y() < -0.3 { - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + else if agent.stick_y() < -0.3 { + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } else { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_START); } frame(lua_state, 14.0); - if is_excute(fighter) { - //println!("Stick Y Pos: {} | Flags: Low={} High={}", fighter.stick_y(), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 89, 0, 45, 3.7, 0.0, 4.1, 10.5, Some(0.0), Some(6.6), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 92, 0, 45, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.1), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + if is_excute(agent) { + //println!("Stick Y Pos: {} | Flags: Low={} High={}", agent.stick_y(), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 89, 0, 45, 3.7, 0.0, 4.1, 10.5, Some(0.0), Some(6.6), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 92, 0, 45, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.1), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 89, 0, 45, 3.7, 0.0, 9.7, 8.0, Some(0.0), Some(5.6), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 92, 0, 45, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.7), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 89, 0, 45, 3.7, 0.0, 9.7, 8.0, Some(0.0), Some(5.6), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 92, 0, 45, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.7), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 89, 0, 45, 3.7, 0.0, 5.6, 8.0, Some(0.0), Some(5.6), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 92, 0, 45, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 89, 0, 45, 3.7, 0.0, 5.6, 8.0, Some(0.0), Some(5.6), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 92, 0, 45, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_END); } frame(lua_state, 25.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } } -unsafe extern "C" fn lucas_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter){ - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - STOP_SE(fighter, Hash40::new("vc_lucas_008")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_s02")); + if is_excute(agent){ + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + STOP_SE(agent, Hash40::new("vc_lucas_008")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_s02")); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 4.0); - if is_excute(fighter){ - PLAY_SE(fighter, Hash40::new("vc_lucas_attack04")); + if is_excute(agent){ + PLAY_SE(agent, Hash40::new("vc_lucas_attack04")); } } -unsafe extern "C" fn lucas_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 20, -20, 10, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 20, -20, 10, 1, true, *EF_FLIP_YZ); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, -30, -20, 10, 1, true, *EF_FLIP_YZ); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, -30, -20, 10, 1, true, *EF_FLIP_YZ); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 0, -20, 10, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 0, -20, 10, 1, true, *EF_FLIP_YZ); } } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 3, 15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 3, 15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 13, 13, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 13, 13, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } else { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 6.5, 14, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 6.5, 14, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //println!("Whiffchk starts"); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); MotionModule::set_rate(boma, 1.751); } frame(lua_state, 8.751); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 24.0, 95, 74, 0, 48, 12.0, 0.0, 25.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 24.0, 95, 74, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 24.0, 95, 74, 0, 48, 12.0, 0.0, 25.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 24.0, 95, 74, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 43.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); @@ -239,310 +238,310 @@ unsafe extern "C" fn lucas_attack_hi4_game(fighter: &mut L2CAgentBase) { else { frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.751); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 21.0, 95, 77, 0, 48, 9.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 21.0, 95, 77, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("throw"), 21.0, 95, 77, 0, 48, 9.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 21.0, 95, 77, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 20.0, 95, 77, 0, 42, 8.0, 0.0, -2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 20.0, 95, 77, 0, 42, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 20.0, 95, 77, 0, 42, 8.0, 0.0, -2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 20.0, 95, 77, 0, 42, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 18.0, 95, 77, 0, 37, 7.0, 0.0, 2.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 18.0, 95, 77, 0, 37, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 18.0, 95, 77, 0, 37, 7.0, 0.0, 2.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 18.0, 95, 77, 0, 37, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); } } } -unsafe extern "C" fn lucas_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("haver"), 0, 0, 0.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("haver"), 0, 0, 0.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), true, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_catch"), Hash40::new("lucas_psi_catch"), Hash40::new("top"), 0, 15, -0.5, 0, 0, 0, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), true, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_catch"), Hash40::new("lucas_psi_catch"), Hash40::new("top"), 0, 15, -0.5, 0, 0, 0, 1.5, true, *EF_FLIP_YZ); } frame(lua_state, 25.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { let handle = EffectModule::req_follow(boma, Hash40::new("sys_crown"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - EffectModule::set_rgb(fighter.module_accessor, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); + EffectModule::set_rgb(boma, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT(fighter, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT(agent, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_catch"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.33); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 2.0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_catch"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.6, true); + LAST_EFFECT_SET_RATE(agent, 0.33); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 2.0, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 15.0, 0, -90, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 15.0, 0, -90, 0, 0, 1.2, true); } } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_bullet_ed"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.0, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.0, true); } } frame(lua_state, 46.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_crown"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_crown"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), true, true); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_h01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_h01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_smash_h02")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_smash_h02")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucas_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucas_attack05")); } wait(lua_state, 56.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_landing01")); } } -unsafe extern "C" fn lucas_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //println!("Whiffchk starts"); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 21.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 21.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } } } else { frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } } -unsafe extern "C" fn lucas_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_l04")); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucas_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucas_attack07")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_l01")); } } -unsafe extern "C" fn lucas_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0.5, 0.5, 1.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0.5, 0.5, 1.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 2, 2, 2, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 2, 2, 2, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, 0 as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 1); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } // LW4PT2 -unsafe extern "C" fn lucas_attack_lw4_pt2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -550,91 +549,91 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_game(fighter: &mut L2CAgentBase) { } else { frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); } } } -unsafe extern "C" fn lucas_attack_lw4_pt2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attacklw42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_l03")); } } -unsafe extern "C" fn lucas_attack_lw4_pt2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_lw4_pt2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, 0 as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attacks4", lucas_attack_s4_s_game) - .acmd("sound_attacks4", lucas_attack_s4_sound) - .acmd("effect_attacks4", lucas_attack_s4_effect) - .acmd("game_attackhi4", lucas_attack_hi4_game) - .acmd("effect_attackhi4", lucas_attack_hi4_effect) - .acmd("sound_attackhi4", lucas_attack_hi4_sound) - .acmd("game_attacklw4", lucas_attack_lw4_game) - .acmd("sound_attacklw4", lucas_attack_lw4_sound) - .acmd("effect_attacklw4", lucas_attack_lw4_effect) - .acmd("expression_attacklw4", lucas_attack_lw4_expression) - .acmd("game_attacklw42", lucas_attack_lw4_pt2_game) - .acmd("sound_attacklw42", lucas_attack_lw4_pt2_sound) - .acmd("effect_attacklw42", lucas_attack_lw4_pt2_effect) - .acmd("expression_attacklw42", lucas_attack_lw4_pt2_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); + agent.acmd("game_attacklw42", game_attacklw42); + agent.acmd("sound_attacklw42", sound_attacklw42); + agent.acmd("effect_attacklw42", effect_attacklw42); + agent.acmd("expression_attacklw42", expression_attacklw42); } diff --git a/fighters/lucas/src/acmd/specials.rs b/fighters/lucas/src/acmd/specials.rs index 05a2935bce..fa0e659c4d 100644 --- a/fighters/lucas/src/acmd/specials.rs +++ b/fighters/lucas/src/acmd/specials.rs @@ -1,484 +1,478 @@ - use super::*; -unsafe extern "C" fn lucas_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// SPECIAL N START // + +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack06")); + } +} + +// SPECIAL N HOLD // + +unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { + // INTENTIONALLY LEFT BLANK + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } */ +} + +unsafe extern "C" fn effect_specialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + for i in 1..=50 { + if is_excute(agent) { + if i%2==0 { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + } + if i%4==0 { + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + } + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn sound_specialairnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); + } +} + +// SPECIAL N FIRE // + +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + } + wait(lua_state, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + AttackModule::clear_all(boma); + } + } else { + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + } + } +} + +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(21.0-1.0)); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + for _ in 1..=5 { + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + wait(lua_state, 3.0) + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialairnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack05")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } +} + +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(21.0-1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.1, 0.0)); ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FIRE, false, 0); } } -unsafe extern "C" fn lucas_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 14.0/(21.0-1.0)); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 14.0/(21.0-1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FIRE, false, 0); } } -unsafe extern "C" fn lucas_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("havel"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("havel"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn lucas_special_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_h01")); - PLAY_SE(fighter, Hash40::new("se_lucas_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_h01")); + PLAY_SE(agent, Hash40::new("se_lucas_special_s03")); let rand = sv_math::rand(hash40("fighter"), 7) as i32; if rand == 0 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack01")); } else if rand == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack02")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack02")); } else if rand == 2 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack03")); } else if rand == 3 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_cliffcatch")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_cliffcatch")); } } } -unsafe extern "C" fn lucas_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_LUCAS_CLIFF_HANG_DATA_SPECIAL_HI as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, 3.5, -3.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, -2.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, 3.5, -3.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, -2.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.0, 366, 130, 50, 0, 7.0, 0.0, 2.5, 5.5, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.0, 363, 130, 50, 0, 5.7, 0.0, 1.0, -2.2, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.0, 366, 130, 50, 0, 7.0, 0.0, 2.5, 5.5, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.0, 363, 130, 50, 0, 5.7, 0.0, 1.0, -2.2, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); AttackModule::set_attack_composition_speed(boma, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 8.0, 0.0, 2.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 6.5, 0.0, 1.0, -2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_CRITICAL); + ATTACK(agent, 0, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 8.0, 0.0, 2.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); + ATTACK(agent, 1, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 6.5, 0.0, 1.0, -2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_PSI); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_CRITICAL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_LUCAS_INSTANCE_WORK_ID_FLAG_SPECIAL_HI_NO_LAST_ATTACK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_LUCAS_INSTANCE_WORK_ID_FLAG_SPECIAL_HI_NO_LAST_ATTACK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); JostleModule::set_status(boma, true); - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } -unsafe extern "C" fn lucas_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkt_attack"), Hash40::new("rot"), 0, 1, 8, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkt_attack"), Hash40::new("rot"), 0, 1, 8, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT(fighter, Hash40::new("lucas_pkt_bomb"), Hash40::new("top"), 0, 2.2, 2.9, 0, 0, 0, 0.64, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("lucas_pkt_bomb"), Hash40::new("top"), 0, 2.2, 2.9, 0, 0, 0, 0.64, 0, 0, 0, 0, 0, 0, true); } for _ in 0..15 { - if is_excute(fighter) { - BURN_COLOR(fighter, 0.5, 0.2, 1, 0.9); + if is_excute(agent) { + BURN_COLOR(agent, 0.5, 0.2, 1, 0.9); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.5, 0.2, 1, 0); - BURN_COLOR_NORMAL(fighter); - FLASH(fighter, 0, 0, 0.1, 0.8); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.5, 0.2, 1, 0); + BURN_COLOR_NORMAL(agent); + FLASH(agent, 0, 0, 0.1, 0.8); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 0, 0, 0.1, 0); - COL_NORMAL(fighter); + if is_excute(agent) { + FLASH_FRM(agent, 1, 0, 0, 0.1, 0); + COL_NORMAL(agent); } } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_attack"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_attack"), false, false); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.9, true); - BURN_COLOR(fighter, 0.7, 0.2, 1, 0.6); + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.9, true); + BURN_COLOR(agent, 0.7, 0.2, 1, 0.6); } frame(lua_state, 34.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.7, 0.2, 1, 0); - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.7, 0.2, 1, 0); + BURN_COLOR_NORMAL(agent); } frame(lua_state, 37.0); - if is_excute(fighter) { - FLASH(fighter, 0.8, 0.7, 1, 0.5); + if is_excute(agent) { + FLASH(agent, 0.8, 0.7, 1, 0.5); } frame(lua_state, 38.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 0.8, 0.7, 1, 0); - COL_NORMAL(fighter); + if is_excute(agent) { + FLASH_FRM(agent, 1, 0.8, 0.7, 1, 0); + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } -unsafe extern "C" fn lucas_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } } -unsafe extern "C" fn lucas_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if StatusModule::prev_status_kind(boma, 0) == FIGHTER_STATUS_KIND_SPECIAL_S && fighter.get_num_used_jumps() == 1 { - let mag_pull_mult = ParamModule::get_float(fighter.object(), ParamType::Agent, "mag_pull_x_mult"); + if is_excute(agent) { + if StatusModule::prev_status_kind(boma, 0) == FIGHTER_STATUS_KIND_SPECIAL_S && agent.get_num_used_jumps() == 1 { + let mag_pull_mult = ParamModule::get_float(agent.object(), ParamType::Agent, "mag_pull_x_mult"); KineticModule::mul_speed(boma, &Vector3f{x: mag_pull_mult, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } } -unsafe extern "C" fn lucas_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1.5, 0, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), -0.3, -4.0, 0.1, 0, 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 10, 0, 0, 0, 0.25, false); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1.5, 0, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), -0.3, -4.0, 0.1, 0, 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 10, 0, 0, 0, 0.25, false); } - } -unsafe extern "C" fn lucas_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 9.0); for _ in 0..999 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 9.0); } - } -unsafe extern "C" fn lucas_special_lw_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 4.5, 0.0, 6.3, 3.75, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 5.0, 0.0, 6.3, 8.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 4.5, 0.0, 6.3, 3.75, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 5.0, 0.0, 6.3, 8.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } - } -unsafe extern "C" fn lucas_special_lw_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); - FLASH(fighter, 0.5, 1, 1, 0.4); - EFFECT_DETACH_KIND(fighter, Hash40::new("lucas_psimagnet_end"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("lucas_psimagnet_hit"), -1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); + FLASH(agent, 0.5, 1, 1, 0.4); + EFFECT_DETACH_KIND(agent, Hash40::new("lucas_psimagnet_end"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("lucas_psimagnet_hit"), -1); } wait(lua_state, 5.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 10, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 10, 0, 1, 1, 0.1); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn lucas_special_lw_hit_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.5, 0, 0, 0, 0.4, false); - FLASH(fighter, 0.5, 1, 1, 0.4); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.5, 0, 0, 0, 0.4, false); + FLASH(agent, 0.5, 1, 1, 0.4); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 4, 0, 1, 1, 0.1); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 6, 0, 0, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 6, 0, 0, 1, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -// SPECIAL N START // - -unsafe extern "C" fn lucas_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucas_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack06")); - } - -} - -// SPECIAL N HOLD // - -unsafe extern "C" fn lucas_special_n_hold_game(fighter: &mut L2CAgentBase) { - // INTENTIONALLY LEFT BLANK - /* if fighter.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } */ -} - -unsafe extern "C" fn lucas_special_n_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(fighter, 0.01, 0.5, 1, 0.4); - } - for i in 1..=50 { - if is_excute(fighter) { - if i%2==0 { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); - } - if i%4==0 { - EFFECT_FLW_POS(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); - } - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn lucas_special_n_hold_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_lucas_pk_charge")); - } -} - -// SPECIAL N FIRE // - -unsafe extern "C" fn lucas_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { - frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - AttackModule::clear_all(boma); - } - } else { - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - } - - } -} - -unsafe extern "C" fn lucas_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - for _ in 1..=5 { - if is_excute(fighter) { - FLASH(fighter, 0.01, 0.5, 1, 0.4); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - wait(lua_state, 3.0) - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); - } -} - -unsafe extern "C" fn lucas_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack05")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); - } -} - -unsafe extern "C" fn game_specialhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); - } -} - -unsafe extern "C" fn game_fallspecial(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); +unsafe extern "C" fn game_fallspecial(agent: &mut L2CAgentBase) { + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_specials", lucas_special_s_game) - .acmd("game_specialairs", lucas_special_air_s_game) - .acmd("effect_specialairs", lucas_special_s_effect) - .acmd("effect_specials", lucas_special_s_effect) - .acmd("sound_specials", lucas_special_s_sound) - .acmd("sound_specialairs", lucas_special_s_sound) - .acmd("game_specialairhi", lucas_special_air_hi_game) - .acmd("effect_specialairhi", lucas_special_air_hi_effect) - .acmd("game_speciallwstart", lucas_special_lw_start_game) - .acmd("game_specialairlwstart", lucas_special_air_lw_start_game) - .acmd("effect_speciallwstart", lucas_special_lw_start_effect) - .acmd("effect_specialairlwstart", lucas_special_lw_start_effect) - .acmd("game_speciallwhold", lucas_special_lw_hold_game) - .acmd("game_specialairlwhold", lucas_special_lw_hold_game) - .acmd("game_speciallwend", lucas_special_lw_end_game) - .acmd("game_specialairlwend", lucas_special_lw_end_game) - .acmd("effect_speciallwend", lucas_special_lw_end_effect) - .acmd("effect_specialairlwend", lucas_special_lw_end_effect) - .acmd("effect_speciallwhit", lucas_special_lw_hit_effect) - .acmd("effect_specialairlwhit", lucas_special_lw_hit_effect) - .acmd("game_specialnstart", lucas_special_n_start_game) - .acmd("game_specialairnstart", lucas_special_n_start_game) - .acmd("sound_specialnstart", lucas_special_n_start_sound) - .acmd("sound_specialairnstart", lucas_special_n_start_sound) - .acmd("game_specialnhold", lucas_special_n_hold_game) - .acmd("game_specialairnhold", lucas_special_n_hold_game) - .acmd("effect_specialnhold", lucas_special_n_hold_effect) - .acmd("effect_specialairnhold", lucas_special_n_hold_effect) - .acmd("sound_specialairnhold", lucas_special_n_hold_sound) - .acmd("sound_specialnhold", lucas_special_n_hold_sound) - .acmd("game_specialnfire", lucas_special_n_fire_game) - .acmd("game_specialairnfire", lucas_special_n_fire_game) - .acmd("effect_specialnfire", lucas_special_n_fire_effect) - .acmd("effect_specialairnfire", lucas_special_n_fire_effect) - .acmd("sound_specialairnfire", lucas_special_n_fire_sound) - .acmd("sound_specialnfire", lucas_special_n_fire_sound) - .acmd("game_specialairhiend", game_specialhiend) - .acmd("game_specialhiend", game_specialhiend) - .acmd("game_fallspecial", game_fallspecial) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("sound_specialnstart", sound_specialnstart); + agent.acmd("sound_specialairnstart", sound_specialnstart); + agent.acmd("game_specialnhold", game_specialnhold); + agent.acmd("game_specialairnhold", game_specialnhold); + agent.acmd("effect_specialnhold", effect_specialnhold); + agent.acmd("effect_specialairnhold", effect_specialnhold); + agent.acmd("sound_specialairnhold", sound_specialairnhold); + agent.acmd("sound_specialnhold", sound_specialairnhold); + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialairnfire); + agent.acmd("sound_specialnfire", sound_specialairnfire); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("effect_specials", effect_specialairs); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhiend", game_specialairhiend); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("game_specialairlwend", game_speciallwend); + agent.acmd("effect_speciallwend", effect_speciallwend); + agent.acmd("effect_specialairlwend", effect_speciallwend); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); + + agent.acmd("game_fallspecial", game_fallspecial); } diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index c9307728e9..03377bacb4 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -1,225 +1,222 @@ use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5 / (9.0 - 8.0)); + FT_MOTION_RATE(agent, 0.5 / (9.0 - 8.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(12.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(12.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 2.0 / (18.0 - 14.0)); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 17.0, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 2.0 / (18.0 - 14.0)); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 17.0, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); } frame(lua_state, 69.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 16.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 20.0, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 20.0, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 20.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); } frame(lua_state, 79.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_catchturn (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, /*CanCatchRebound*/ true); + if is_excute(agent) { + GrabModule::set_rebound(boma, /*CanCatchRebound*/ true); } frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 16.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 17.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -17.0, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -17.0, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 21.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); } frame(lua_state, 75.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 23.0, 19.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 65, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 19.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 65, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 11); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 11); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 5, 8, 0); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 75, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 75, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 3); + CHECK_FINISH_CAMERA(agent, 13, 3); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 8, 3, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 103, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 103, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 16); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 16); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 8, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 100, 55, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 100, 55, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CHECK_FINISH_CAMERA(fighter, 9.0, 0.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CHECK_FINISH_CAMERA(agent, 9.0, 0.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn expression_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwlw(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 10, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .acmd("expression_throwlw", expression_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("expression_throwlw", expression_throwlw); } diff --git a/fighters/lucas/src/acmd/tilts.rs b/fighters/lucas/src/acmd/tilts.rs index a549377fe4..9b15a13386 100644 --- a/fighters/lucas/src/acmd/tilts.rs +++ b/fighters/lucas/src/acmd/tilts.rs @@ -1,183 +1,176 @@ - use super::*; -unsafe extern "C" fn lucas_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 4.23, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 7.67, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 4.23, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 7.67, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.5, 3.0); } - } -unsafe extern "C" fn lucas_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0, 0, 0, 0, 0.8, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 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("lucas_psi_atk"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucas_psi_atk"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_s3_expression(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_attacks3(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); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } -unsafe extern "C" fn lucas_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 95, 85, 0, 60, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 95, 85, 0, 60, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 85, 100, 0, 50, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 85, 100, 0, 50, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn lucas_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13.5, 2.0, 0, 45, 90, 0.85, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 4.5, 0.2, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13.5, 2.0, 0, 45, 90, 0.85, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 4.5, 0.2, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn lucas_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 4.0); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 4.0); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 84, 75, 0, 50, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.1, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 84, 75, 0, 50, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.1, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucas_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 2.0, 5.0, 0, 20, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 2.0, 5.0, 0, 20, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, -0.7, 0, 0, 0, 0.3, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, -0.7, 0, 0, 0, 0.3, false); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, 0.7, 0, 0, 0, 0.3, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, 0.7, 0, 0, 0, 0.3, false); } - //EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.0, 0.0, -1.0, 0, 0, 0, 0.35, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.0, 0.0, -1.0, 0, 0, 0, 0.35, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } - } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attacks3lw", lucas_attack_s3_game) - .acmd("game_attacks3", lucas_attack_s3_game) - .acmd("game_attacks3hi", lucas_attack_s3_game) - .acmd("effect_attacks3lw", lucas_attack_s3_effect) - .acmd("effect_attacks3", lucas_attack_s3_effect) - .acmd("effect_attacks3hi", lucas_attack_s3_effect) - .acmd("expression_attacks3lw", lucas_attack_s3_expression) - .acmd("expression_attacks3", lucas_attack_s3_expression) - .acmd("expression_attacks3hi", lucas_attack_s3_expression) - .acmd("game_attackhi3", lucas_attack_hi3_game) - .acmd("effect_attackhi3", lucas_attack_hi3_effect) - .acmd("game_attacklw3", lucas_attack_lw3_game) - .acmd("effect_attacklw3", lucas_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("effect_attacks3hi", effect_attacks3); + agent.acmd("effect_attacks3lw", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/lucas/src/lib.rs b/fighters/lucas/src/lib.rs index d822b8c43b..390e594eee 100644 --- a/fighters/lucas/src/lib.rs +++ b/fighters/lucas/src/lib.rs @@ -3,8 +3,14 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +mod pkfire; +mod pkthunder; use smash::{ lib::{ @@ -38,7 +44,12 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucas"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + pkfire::install(); + pkthunder::install(); } \ No newline at end of file diff --git a/fighters/lucas/src/opff.rs b/fighters/lucas/src/opff.rs index 037c17ed8b..c73b5836d3 100644 --- a/fighters/lucas/src/opff.rs +++ b/fighters/lucas/src/opff.rs @@ -190,7 +190,6 @@ unsafe fn pk_thunder_wall_ride_shorten(fighter: &mut smash::lua2cpp::L2CFighterC VarModule::off_flag(boma.object(), vars::lucas::status::SPECIAL_HI_ATTACK_IS_FLIPPED_MOMENTUM_AFTER_WALLTOUCH); VarModule::off_flag(boma.object(), vars::lucas::status::SPECIAL_HI_ATTACK_IS_SET_WALL_LEAVE_MOMENTUM); } - } // Lucas PK Fire drift @@ -449,17 +448,6 @@ pub unsafe fn lucas_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } -} - -pub fn install() { - smashline::Agent::new("lucas") - .on_line(Main, lucas_frame_wrapper) - .install(); - smashline::Agent::new("lucas_pkthunder") - .on_line(Main, pkthunder_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lucas_frame_wrapper); } \ No newline at end of file diff --git a/fighters/lucas/src/pkfire/acmd.rs b/fighters/lucas/src/pkfire/acmd.rs new file mode 100644 index 0000000000..4fff1e7442 --- /dev/null +++ b/fighters/lucas/src/pkfire/acmd.rs @@ -0,0 +1,68 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn effect_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for i in 1..=50 { + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + } + wait(lua_state, 8.0); + } +} + +unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + // ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + //} + //wait(lua_state, 10.0); + //if is_excute(agent) { + // AttackModule::clear_all(boma); + // AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); + //} +} + +unsafe extern "C" fn effect_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); + EFFECT(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + /* + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + } + */ +} + +unsafe extern "C" fn sound_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_s")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("effect_shoot", effect_shoot); + agent.acmd("game_pillar", game_pillar); + agent.acmd("effect_pillar", effect_pillar); + agent.acmd("sound_pillar", sound_pillar); +} diff --git a/fighters/lucas/src/pkfire/mod.rs b/fighters/lucas/src/pkfire/mod.rs new file mode 100644 index 0000000000..44e6808439 --- /dev/null +++ b/fighters/lucas/src/pkfire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("lucas_pkfire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/acmd.rs b/fighters/lucas/src/pkthunder/acmd.rs new file mode 100644 index 0000000000..7d14391cc2 --- /dev/null +++ b/fighters/lucas/src/pkthunder/acmd.rs @@ -0,0 +1,35 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + +unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + AttackModule::set_attack_composition_speed(boma, 1, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); + agent.acmd("game_movechild", game_movechild); +} diff --git a/fighters/lucas/src/pkthunder/mod.rs b/fighters/lucas/src/pkthunder/mod.rs new file mode 100644 index 0000000000..af9658895b --- /dev/null +++ b/fighters/lucas/src/pkthunder/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("lucas_pkthunder"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/opff.rs b/fighters/lucas/src/pkthunder/opff.rs new file mode 100644 index 0000000000..be026d0489 --- /dev/null +++ b/fighters/lucas/src/pkthunder/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pkthunder_callback); +} \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/status.rs b/fighters/lucas/src/pkthunder/status.rs new file mode 100644 index 0000000000..f8818f7bf0 --- /dev/null +++ b/fighters/lucas/src/pkthunder/status.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +// WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE // + +unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { + if !VarModule::is_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE) { + let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let parent_object = get_battle_object_from_id(parent_id as u32); + if !parent_object.is_null() + && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_LUCAS + && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD { + VarModule::on_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE); + MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); + return 0.into(); + } + smashline::original_status(Exec, weapon, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); +} \ No newline at end of file diff --git a/fighters/lucas/src/status.rs b/fighters/lucas/src/status.rs deleted file mode 100644 index 90620cfe3c..0000000000 --- a/fighters/lucas/src/status.rs +++ /dev/null @@ -1,456 +0,0 @@ -use super::*; -use globals::*; -utils::import!(common::djc::attack_air_main_status); -// status script import - -// FIGHTER RESET // - -extern "C" fn lucas_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_LUCAS { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), charge_time, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } -} - -// SPECIAL N // - -unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - return 0.into(); - } - else { - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) - } -} - -// SPECIAL N HOLD // - -unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - // - // OLD SPECIAL N STATUS MAIN CODE // - // - // let time = fighter.get_param_int("param_special_n", "time"); - // let nobang_time = fighter.get_param_int("param_special_n", "nobang_time"); - // fighter.set_int(time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME); - // fighter.set_int(nobang_time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); - - // if !StopModule::is_stop(fighter.module_accessor) { - // lucas_special_n_hold_main_sub_status(fighter, false.into()); - // } - // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - // fighter.main_shift(lucas_special_n_hold_main_loop) - if !StopModule::is_stop(fighter.module_accessor) { - lucas_special_n_hold_main_sub_status(fighter, false.into()); - } - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - fighter.main_shift(lucas_special_n_hold_main_loop) - -} - -unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { - // - // OLD PK FREEZE EXPLOSION CODE // - // - // if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE) - // && !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) - // { - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - // fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED); - // ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, false, -1); - // } - - // if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) { - // return; - // } - // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME, 0); - // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME, 0); - // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) { - // return; - // } - // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME) <= 0 { - // if fighter.is_button_off(Buttons::Special) { - // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); - // return; - // } - // } - // if dbg!(fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME)) <= 0 { - // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); - // return; - // } -} - -unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { - // - // OLD SPECIAL N SUBSTATUS CODE // - // - // if arg.get_bool() { - // lucas_special_n_check_explosion(fighter); - // } - // if !fighter.is_situation(*SITUATION_KIND_GROUND) { - // if !arg.get_bool() { - // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); - // } - // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { - // KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - // } else { - // KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - // } - // } - // 0.into() - - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - if !arg.get_bool() { - WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); - } - if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } else { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - } - 0.into() -} - -unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - // - // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // - // - // let nobang_time = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); - // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) - // && nobang_time <= 0 - // { - // fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - // return 1.into(); - // } - // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); - // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { - // // else block - // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, - // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), - // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - // } - // 1.into() - - /// let charge = "attack_up_charge_time" - /// - /// set_charge(charge) - /// - /// dec_charge() - /// if charge == 0 then IS_ATTACK_UP = true && set_charge(charge) - - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && fighter.is_button_on(Buttons::Special) { - if VarModule::countdown_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0) { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - return 1.into(); - } - } else { - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_END.into(), false.into()); - return 1.into(); - } - let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); - if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { - // else block - lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, - *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), - Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - 1.into() -} - -unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( - fighter: &mut L2CFighterCommon, - mtrans_kind_work_id: i32, - flag_work_id: i32, - ground_kinetic_type: i32, - air_kinetic_type: i32, - ground_motion_kind: Hash40, - aerial_motion_kind: Hash40, - ground_correct_kind: i32 -) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - KineticModule::change_kinetic(fighter.module_accessor, air_kinetic_type); - if !fighter.is_flag(flag_work_id) { - MotionModule::change_motion(fighter.module_accessor, aerial_motion_kind, 0.0, 1.0, false, 0.0, false, false); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, aerial_motion_kind, -1.0, 1.0, 0.0, false, false); - } - fighter.set_int(*SITUATION_KIND_GROUND, mtrans_kind_work_id); - } else { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(ground_correct_kind)); - KineticModule::change_kinetic(fighter.module_accessor, ground_kinetic_type); - if !fighter.is_flag(flag_work_id) { - MotionModule::change_motion(fighter.module_accessor, ground_motion_kind, 0.0, 1.0, false, 0.0, false, false); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, ground_motion_kind, -1.0, 1.0, 0.0, false, false); - } - fighter.set_int(*SITUATION_KIND_AIR, mtrans_kind_work_id); - } - fighter.on_flag(flag_work_id); -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -// WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE // - -unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { - if !VarModule::is_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE) { - let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let parent_object = get_battle_object_from_id(parent_id as u32); - if !parent_object.is_null() - && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_LUCAS - && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD { - VarModule::on_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE); - MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); - return 0.into(); - } - smashline::original_status(Exec, weapon, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); - } - 0.into() -} - -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD // - -unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER) { - LinkModule::unlink(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER); - } - if [*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { - EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); - fighter.set_int(0, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); - } - 0.into() -} - -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK // - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_SHOOT) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, //Repair later for ledge slipoffs? Anyone? - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_WALL_BRAKE); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("special_air_hi"), - 0.0, - 1.0, - false, - 0.0, - false, - false, - ); - if !StopModule::is_stop(fighter.module_accessor) { - sub_special_hi_attack(fighter); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) -} - -unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - // this does...something? - if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } else { - if fighter.is_situation(*SITUATION_KIND_AIR) { - KineticModule::enable_energy( - fighter.module_accessor, - *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - ); - } else { - KineticModule::unable_energy( - fighter.module_accessor, - *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - ); - } - } - if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { - AttackModule::clear_inflict_kind_status(fighter.module_accessor); - } - 0.into() -} - -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END) { - fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); - let attack_end_brake = fighter.get_param_float("param_special_hi", "attack_end_brake"); - let special_hi_angle = fighter.get_float(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_FLOAT_DIR); - let brake_x = - attack_end_brake * special_hi_angle.cos() * PostureModule::lr(fighter.module_accessor); - let brake_y = attack_end_brake * special_hi_angle.sin(); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, brake_x, brake_y); - app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - } - /* - if fighter.is_prev_situation(*SITUATION_KIND_AIR) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - let attack_ground_speed_xmul = fighter.get_param_float("param_special_hi", "attack_ground_speed_xmul"); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, attack_ground_speed_xmul, attack_ground_speed_xmul, attack_ground_speed_xmul); - app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); - } - } - */ - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) - && fighter.is_situation(*SITUATION_KIND_GROUND) - { - let attack_ground_end_speed_xmul = - fighter.get_param_float("param_special_hi", "attack_ground_end_speed_xmul"); - - fighter.clear_lua_stack(); - lua_args!( - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - attack_ground_end_speed_xmul, - attack_ground_end_speed_xmul, - attack_ground_end_speed_xmul - ); - app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); - - fighter.change_status( - FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), - false.into(), - ); - return 1.into(); - } - // [insert stubbed redirection/bonk function here] - // LOL good riddance fucker - 0.into() - } else { - fighter.set_int64( - hash40("special_air_hi_attack_end") as i64, - *FIGHTER_LUCAS_INSTANCE_WORK_ID_INT_SPECIAL_AIR_END_MOTION, - ); - fighter.change_status( - FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END.into(), - false.into(), - ); - 1.into() - } -} - -pub unsafe extern "C" fn attack_lw4(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_AttackLw4_common(); - fighter.main_shift(status_attacklw4_main_param) -} - -unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - let combo = ComboModule::count(fighter.module_accessor) as i32; - let lw4_combo_max = 2; - if combo < lw4_combo_max && fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_ATTACK_TRIGGER != 0 && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { - ComboModule::set(fighter.module_accessor, 2); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_lw4_2"), 0.0, 1.0, false, 0.0, false, false); - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) - && fighter.sub_wait_ground_check_common(false.into()).get_bool() { - return 1.into(); - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 1.into(); - } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - 0.into() -} - -pub fn install() { - smashline::Agent::new("lucas") - .on_start(lucas_reset) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre) - .status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end) - .status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack,) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4) - .install(); - smashline::Agent::new("lucas_pkthunder") - .status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec) - .install(); -} \ No newline at end of file diff --git a/fighters/lucas/src/status/attack_air.rs b/fighters/lucas/src/status/attack_air.rs new file mode 100644 index 0000000000..cefe98acf2 --- /dev/null +++ b/fighters/lucas/src/status/attack_air.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/attack_lw4.rs b/fighters/lucas/src/status/attack_lw4.rs new file mode 100644 index 0000000000..e1725b8db9 --- /dev/null +++ b/fighters/lucas/src/status/attack_lw4.rs @@ -0,0 +1,35 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_LW4 + +pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_AttackLw4_common(); + fighter.main_shift(status_attacklw4_main_param) +} + +unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + let combo = ComboModule::count(fighter.module_accessor) as i32; + let lw4_combo_max = 2; + if combo < lw4_combo_max && fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_ATTACK_TRIGGER != 0 && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { + ComboModule::set(fighter.module_accessor, 2); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_lw4_2"), 0.0, 1.0, false, 0.0, false, false); + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) + && fighter.sub_wait_ground_check_common(false.into()).get_bool() { + return 1.into(); + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 1.into(); + } + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/mod.rs b/fighters/lucas/src/status/mod.rs new file mode 100644 index 0000000000..d8ff1e91f1 --- /dev/null +++ b/fighters/lucas/src/status/mod.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +mod attack_air; +mod attack_lw4; +mod special_n; +mod special_hi; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), charge_time, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + attack_lw4::install(agent); + special_n::install(agent); + special_hi::install(agent); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/special_hi.rs b/fighters/lucas/src/status/special_hi.rs new file mode 100644 index 0000000000..11b6564c0a --- /dev/null +++ b/fighters/lucas/src/status/special_hi.rs @@ -0,0 +1,197 @@ +use super::*; + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD + +unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER) { + LinkModule::unlink(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER); + } + if [*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { + EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); + fighter.set_int(0, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); + } + 0.into() +} + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END + +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_SHOOT) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, //Repair later for ledge slipoffs? Anyone? + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK + +pub unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_WALL_BRAKE); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("special_air_hi"), + 0.0, + 1.0, + false, + 0.0, + false, + false, + ); + if !StopModule::is_stop(fighter.module_accessor) { + sub_special_hi_attack(fighter); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); + fighter.main_shift(special_hi_attack_main_loop) +} + +unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + // this does...something? + if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } else { + if fighter.is_situation(*SITUATION_KIND_AIR) { + KineticModule::enable_energy( + fighter.module_accessor, + *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + ); + } else { + KineticModule::unable_energy( + fighter.module_accessor, + *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + ); + } + } + if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { + AttackModule::clear_inflict_kind_status(fighter.module_accessor); + } + 0.into() +} + +unsafe extern "C" fn special_hi_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END) { + fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); + let attack_end_brake = fighter.get_param_float("param_special_hi", "attack_end_brake"); + let special_hi_angle = fighter.get_float(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_FLOAT_DIR); + let brake_x = + attack_end_brake * special_hi_angle.cos() * PostureModule::lr(fighter.module_accessor); + let brake_y = attack_end_brake * special_hi_angle.sin(); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, brake_x, brake_y); + app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + } + /* + if fighter.is_prev_situation(*SITUATION_KIND_AIR) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + let attack_ground_speed_xmul = fighter.get_param_float("param_special_hi", "attack_ground_speed_xmul"); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, attack_ground_speed_xmul, attack_ground_speed_xmul, attack_ground_speed_xmul); + app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); + } + } + */ + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) + && fighter.is_situation(*SITUATION_KIND_GROUND) + { + let attack_ground_end_speed_xmul = + fighter.get_param_float("param_special_hi", "attack_ground_end_speed_xmul"); + + fighter.clear_lua_stack(); + lua_args!( + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + attack_ground_end_speed_xmul, + attack_ground_end_speed_xmul, + attack_ground_end_speed_xmul + ); + app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); + + fighter.change_status( + FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), + false.into(), + ); + return 1.into(); + } + // [insert stubbed redirection/bonk function here] + // LOL good riddance fucker + 0.into() + } else { + fighter.set_int64( + hash40("special_air_hi_attack_end") as i64, + *FIGHTER_LUCAS_INSTANCE_WORK_ID_INT_SPECIAL_AIR_END_MOTION, + ); + fighter.change_status( + FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END.into(), + false.into(), + ); + 1.into() + } +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); + agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack_main); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/special_n.rs b/fighters/lucas/src/status/special_n.rs new file mode 100644 index 0000000000..1f6876a835 --- /dev/null +++ b/fighters/lucas/src/status/special_n.rs @@ -0,0 +1,190 @@ +use super::*; + +// SFIGHTER_STATUS_KIND_SPECIAL_N + +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + return 0.into(); + } + else { + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) + } +} + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD + +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + // + // OLD SPECIAL N STATUS MAIN CODE // + // + // let time = fighter.get_param_int("param_special_n", "time"); + // let nobang_time = fighter.get_param_int("param_special_n", "nobang_time"); + // fighter.set_int(time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME); + // fighter.set_int(nobang_time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); + // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); + + // if !StopModule::is_stop(fighter.module_accessor) { + // special_n_hold_main_sub_status(fighter, false.into()); + // } + // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + // fighter.main_shift(special_n_hold_main_loop) + if !StopModule::is_stop(fighter.module_accessor) { + special_n_hold_main_sub_status(fighter, false.into()); + } + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + fighter.main_shift(special_n_hold_main_loop) + +} + +unsafe fn special_n_check_explosion(fighter: &mut L2CFighterCommon) { + // + // OLD PK FREEZE EXPLOSION CODE // + // + // if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE) + // && !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) + // { + // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + // fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED); + // ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, false, -1); + // } + + // if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) { + // return; + // } + // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME, 0); + // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME, 0); + // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) { + // return; + // } + // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME) <= 0 { + // if fighter.is_button_off(Buttons::Special) { + // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); + // return; + // } + // } + // if dbg!(fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME)) <= 0 { + // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); + // return; + // } +} + +unsafe extern "C" fn special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { + // + // OLD SPECIAL N SUBSTATUS CODE // + // + // if arg.get_bool() { + // special_n_check_explosion(fighter); + // } + // if !fighter.is_situation(*SITUATION_KIND_GROUND) { + // if !arg.get_bool() { + // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); + // } + // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { + // KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + // } else { + // KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + // } + // } + // 0.into() + + if !fighter.is_situation(*SITUATION_KIND_GROUND) { + if !arg.get_bool() { + WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); + } + if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } else { + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + } + 0.into() +} + +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + // + // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // + // + // let nobang_time = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); + // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) + // && nobang_time <= 0 + // { + // fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + // return 1.into(); + // } + // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); + // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { + // // else block + // special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), + // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + // } + // 1.into() + + /// let charge = "attack_up_charge_time" + /// + /// set_charge(charge) + /// + /// dec_charge() + /// if charge == 0 then IS_ATTACK_UP = true && set_charge(charge) + + if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && fighter.is_button_on(Buttons::Special) { + if VarModule::countdown_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0) { + let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); + VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + return 1.into(); + } + } else { + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_END.into(), false.into()); + return 1.into(); + } + let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); + if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { + // else block + special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), + Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + 1.into() +} + +unsafe extern "C" fn special_n_hold_transition_g2a_kind( + fighter: &mut L2CFighterCommon, + mtrans_kind_work_id: i32, + flag_work_id: i32, + ground_kinetic_type: i32, + air_kinetic_type: i32, + ground_motion_kind: Hash40, + aerial_motion_kind: Hash40, + ground_correct_kind: i32 +) { + if !fighter.is_situation(*SITUATION_KIND_GROUND) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + KineticModule::change_kinetic(fighter.module_accessor, air_kinetic_type); + if !fighter.is_flag(flag_work_id) { + MotionModule::change_motion(fighter.module_accessor, aerial_motion_kind, 0.0, 1.0, false, 0.0, false, false); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, aerial_motion_kind, -1.0, 1.0, 0.0, false, false); + } + fighter.set_int(*SITUATION_KIND_GROUND, mtrans_kind_work_id); + } else { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(ground_correct_kind)); + KineticModule::change_kinetic(fighter.module_accessor, ground_kinetic_type); + if !fighter.is_flag(flag_work_id) { + MotionModule::change_motion(fighter.module_accessor, ground_motion_kind, 0.0, 1.0, false, 0.0, false, false); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, ground_motion_kind, -1.0, 1.0, 0.0, false, false); + } + fighter.set_int(*SITUATION_KIND_AIR, mtrans_kind_work_id); + } + fighter.on_flag(flag_work_id); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_main); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/aerials.rs b/fighters/lucina/src/acmd/aerials.rs index ae13c51ae6..1c1cb90de7 100644 --- a/fighters/lucina/src/acmd/aerials.rs +++ b/fighters/lucina/src/acmd/aerials.rs @@ -1,286 +1,284 @@ - use super::*; -unsafe extern "C" fn lucina_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucina_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.4, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_light"), Hash40::new("sword1"), 0, 0, 11, 0, 0, 0, 0.4, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.4, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_light"), Hash40::new("sword1"), 0, 0, 11, 0, 0, 0, 0.4, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_light"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_light"), false, true); } } -unsafe extern "C" fn lucina_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_swing_s")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_swing_s")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucina_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucina_attackl_s01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucina_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucina_attackl_s01")); } - } -unsafe extern "C" fn lucina_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn lucina_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, (7.0-1.0), 5.0); + FT_DESIRED_RATE(agent, (7.0-1.0), 5.0); frame(lua_state, 7.0); - FT_DESIRED_RATE(fighter, (15.0-7.0), 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 55, 80, 0, 46, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 46, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, (15.0-7.0), 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 55, 80, 0, 46, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 46, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_DESIRED_RATE(fighter, (27.0-24.0),8.0); + FT_DESIRED_RATE(agent, (27.0-24.0),8.0); frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.3, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.3, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn lucina_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn lucina_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_DESIRED_RATE(fighter, (8.0-3.0), 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (8.0-3.0), 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 105, 0, 43, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 105, 0, 43, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 105, 0, 43, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 105, 0, 43, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, (23.0-15.0), 16.0); + FT_DESIRED_RATE(agent, (23.0-15.0), 16.0); frame(lua_state, 23.0); - FT_DESIRED_RATE(fighter, (36.0 - 23.0), 10.0); + FT_DESIRED_RATE(agent, (36.0 - 23.0), 10.0); frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-5.0)); + FT_MOTION_RATE(agent, 6.0/(13.0-5.0)); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucina_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_DESIRED_RATE(fighter, (18.0-10.0), 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, (18.0-10.0), 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 29.0/(56.0-19.0)); + FT_MOTION_RATE(agent, 29.0/(56.0-19.0)); frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucina_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucina_attackair_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucina_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucina_attackair_l01")); } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attackairn", lucina_attack_air_n_game) - .acmd("effect_attackairn", lucina_attack_air_n_effect) - .acmd("sound_attackairn", lucina_attack_air_n_sound) - .acmd("expression_attackairn", lucina_attack_air_n_expression) - .acmd("game_attackairf", lucina_attack_air_f_game) - .acmd("effect_attackairf", lucina_attack_air_f_effect) - .acmd("expression_attackairf", lucina_attack_air_f_expression) - .acmd("game_attackairb", lucina_attack_air_b_game) - .acmd("game_attackairhi", lucina_attack_air_hi_game) - .acmd("game_attackairlw", lucina_attack_air_lw_game) - .acmd("sound_attackairlw", lucina_attack_air_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); } diff --git a/fighters/lucina/src/acmd/ground.rs b/fighters/lucina/src/acmd/ground.rs index 76e09b802d..a0e6ccf66d 100644 --- a/fighters/lucina/src/acmd/ground.rs +++ b/fighters/lucina/src/acmd/ground.rs @@ -1,106 +1,101 @@ - use super::*; -unsafe extern "C" fn lucina_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 78, 20, 0, 57, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 88, 20, 0, 57, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 78, 20, 0, 57, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 88, 20, 0, 57, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn lucina_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn lucina_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn lucina_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 7.2, Some(12.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 7.2, Some(12.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attack11", lucina_attack_11_game) - .acmd("expression_attack11", lucina_attack_11_expression) - .acmd("game_attack12", lucina_attack_12_game) - .acmd("expression_attack12", lucina_attack_12_expression) - .acmd("game_attackdash", lucina_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/lucina/src/acmd/mod.rs b/fighters/lucina/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/lucina/src/acmd/mod.rs +++ b/fighters/lucina/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/other.rs b/fighters/lucina/src/acmd/other.rs index 69ae7e5e3c..01406a3361 100644 --- a/fighters/lucina/src/acmd/other.rs +++ b/fighters/lucina/src/acmd/other.rs @@ -1,203 +1,123 @@ - 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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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(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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_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_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_lucina_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucina_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucina_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucina_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_step_left_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_step_left_l")); } } -unsafe extern "C" fn 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("lucina") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/lucina/src/acmd/smashes.rs b/fighters/lucina/src/acmd/smashes.rs index 28aa2d716d..6aac3aaeb4 100644 --- a/fighters/lucina/src/acmd/smashes.rs +++ b/fighters/lucina/src/acmd/smashes.rs @@ -1,82 +1,80 @@ - use super::*; -unsafe extern "C" fn lucina_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 5.0 / (9.75 - 4.0)); + FT_MOTION_RATE(agent, 5.0 / (9.75 - 4.0)); frame(lua_state, 9.75); - FT_MOTION_RATE(fighter, 1.0 / (10.25 - 9.75)); + FT_MOTION_RATE(agent, 1.0 / (10.25 - 9.75)); frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0 / (11.0 - 10.25)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0 / (11.0 - 10.25)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - FT_DESIRED_RATE(fighter, (26.0 - 13.0), 22.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (26.0 - 13.0), 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); // f36 ingame - FT_DESIRED_RATE(fighter, (49.0 - 26.0), 13.0); + FT_DESIRED_RATE(agent, (49.0 - 26.0), 13.0); } -unsafe extern "C" fn lucina_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.499); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.499); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.499); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 0.5, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.499); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 0.5, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_DESIRED_RATE(fighter, (70.0 - 43.0), 23.0); + FT_DESIRED_RATE(agent, (70.0 - 43.0), 23.0); } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attacks4", lucina_attack_s4_s_game) - .acmd("game_attacklw4", lucina_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/lucina/src/acmd/specials.rs b/fighters/lucina/src/acmd/specials.rs deleted file mode 100644 index b47baa3485..0000000000 --- a/fighters/lucina/src/acmd/specials.rs +++ /dev/null @@ -1,1690 +0,0 @@ -use super::*; - -unsafe extern "C" fn lucina_special_n_end_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_air_n_end_max_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(30.0-13.0)); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn lucina_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(30.0-13.0)); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn lucina_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s2_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02h")); - } -} - -unsafe extern "C" fn lucina_special_air_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s2_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02h")); - } -} - -unsafe extern "C" fn lucina_special_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s2_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02l")); - } -} - -unsafe extern "C" fn lucina_special_air_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s2_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02l")); - } -} - -unsafe extern "C" fn lucina_special_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 27.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s3_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack03")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03h")); - } -} - -unsafe extern "C" fn lucina_special_air_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 27.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s3_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack03")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03h")); - } -} - -unsafe extern "C" fn lucina_special_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(43.0-7.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s3_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack05")); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03s")); - } -} - -unsafe extern "C" fn lucina_special_air_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(43.0-7.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s3_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack05")); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03s")); - } -} - -unsafe extern "C" fn lucina_special_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s3_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03l")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack02")); - } -} - -unsafe extern "C" fn lucina_special_air_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s3_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03l")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack02")); - } -} - -unsafe extern "C" fn lucina_special_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(44.0-11.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(44.0-11.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0/(55.0-10.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0/(55.0-10.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 42.0/(74.0-22.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_air_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 42.0/(74.0-22.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn lucina_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear(boma, 2, false); - AttackModule::clear(boma, 3, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - -} - -unsafe extern "C" fn lucina_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear(boma, 2, false); - AttackModule::clear(boma, 3, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } -} - -unsafe extern "C" fn lucina_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_hit_stop_mul(fighter.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(fighter.module_accessor, 0.5); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - DamageModule::set_damage_mul(fighter.module_accessor, 1.0); - HitModule::set_hit_stop_mul(fighter.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::on_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(64.0-28.0)); - VarModule::off_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) - } -} - -unsafe extern "C" fn lucina_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_hit_stop_mul(fighter.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(fighter.module_accessor, 0.5); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - DamageModule::set_damage_mul(fighter.module_accessor, 1.0); - HitModule::set_hit_stop_mul(fighter.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::on_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) - } - frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) - } -} - -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_specialnendhi", lucina_special_n_end_hi_game) - .acmd("game_specialnend", lucina_special_n_end_game) - .acmd("game_specialnendlw", lucina_special_n_end_lw_game) - .acmd("game_specialnendmaxhi", lucina_special_n_end_max_hi_game) - .acmd("game_specialnendmax", lucina_special_n_end_max_game) - .acmd("game_specialnendmaxlw", lucina_special_n_end_max_lw_game) - .acmd("game_specialairnendhi", lucina_special_air_n_end_hi_game) - .acmd("game_specialairnend", lucina_special_air_n_end_game) - .acmd("game_specialairnendlw", lucina_special_air_n_end_lw_game) - .acmd("game_specialairnendmaxhi", lucina_special_air_n_end_max_hi_game) - .acmd("game_specialairnendmax", lucina_special_air_n_end_max_game) - .acmd("game_specialairnendmaxlw", lucina_special_air_n_end_max_lw_game) - .acmd("game_specials1", lucina_special_s1_game) - .acmd("effect_specials1", lucina_special_s1_effect) - .acmd("game_specialairs1", lucina_special_air_s1_game) - .acmd("effect_specialairs1", lucina_special_air_s1_effect) - .acmd("game_specials2hi", lucina_special_s2_hi_game) - .acmd("effect_specials2hi", lucina_special_s2_hi_effect) - .acmd("sound_specials2hi", lucina_special_s2_hi_sound) - .acmd("game_specialairs2hi", lucina_special_air_s2_hi_game) - .acmd("effect_specialairs2hi", lucina_special_air_s2_hi_effect) - .acmd("sound_specialairs2hi", lucina_special_air_s2_hi_sound) - .acmd("game_specials2lw", lucina_special_s2_lw_game) - .acmd("effect_specials2lw", lucina_special_s2_lw_effect) - .acmd("sound_specials2lw", lucina_special_s2_lw_sound) - .acmd("game_specialairs2lw", lucina_special_air_s2_lw_game) - .acmd("effect_specialairs2lw", lucina_special_air_s2_lw_effect) - .acmd("sound_specialairs2lw", lucina_special_air_s2_lw_sound) - .acmd("game_specials3hi", lucina_special_s3_hi_game) - .acmd("effect_specials3hi", lucina_special_s3_hi_effect) - .acmd("sound_specials3hi", lucina_special_s3_hi_sound) - .acmd("game_specialairs3hi", lucina_special_air_s3_hi_game) - .acmd("effect_specialairs3hi", lucina_special_air_s3_hi_effect) - .acmd("sound_specialairs3hi", lucina_special_air_s3_hi_sound) - .acmd("game_specials3s", lucina_special_s3_s_game) - .acmd("effect_specials3s", lucina_special_s3_s_effect) - .acmd("sound_specials3s", lucina_special_s3_s_sound) - .acmd("game_specialairs3s", lucina_special_air_s3_s_game) - .acmd("effect_specialairs3s", lucina_special_air_s3_s_effect) - .acmd("sound_specialairs3s", lucina_special_air_s3_s_sound) - .acmd("game_specials3lw", lucina_special_s3_lw_game) - .acmd("effect_specials3lw", lucina_special_s3_lw_effect) - .acmd("sound_specials3lw", lucina_special_s3_lw_sound) - .acmd("game_specialairs3lw", lucina_special_air_s3_lw_game) - .acmd("effect_specialairs3lw", lucina_special_air_s3_lw_effect) - .acmd("sound_specialairs3lw", lucina_special_air_s3_lw_sound) - .acmd("game_specials4hi", lucina_special_s4_hi_game) - .acmd("effect_specials4hi", lucina_special_s4_hi_effect) - .acmd("game_specialairs4hi", lucina_special_air_s4_hi_game) - .acmd("effect_specialairs4hi", lucina_special_air_s4_hi_effect) - .acmd("game_specials4s", lucina_special_s4_s_game) - .acmd("effect_specials4s", lucina_special_s4_s_effect) - .acmd("game_specialairs4s", lucina_special_air_s4_s_game) - .acmd("effect_specialairs4s", lucina_special_air_s4_s_effect) - .acmd("game_specials4lw", lucina_special_s4_lw_game) - .acmd("effect_specials4lw", lucina_special_s4_lw_effect) - .acmd("game_specialairs4lw", lucina_special_air_s4_lw_game) - .acmd("effect_specialairs4lw", lucina_special_air_s4_lw_effect) - .acmd("game_specialhi", lucina_special_hi_game) - .acmd("game_specialairhi", lucina_special_air_hi_game) - .acmd("game_speciallw", lucina_special_lw_game) - .acmd("game_specialairlw", lucina_special_air_lw_game) - .install(); -} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/mod.rs b/fighters/lucina/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..e68cb417d6 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/mod.rs @@ -0,0 +1,403 @@ +use super::*; + +mod special_s2; +mod special_s3; +mod special_s4; + +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnendhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnendlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnendmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnendmaxhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnendmaxlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed1); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(30.0-13.0)); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear(boma, 4, false); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear(boma, 4, false); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + HitModule::set_hit_stop_mul(boma, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 0.5); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); + } + frame(lua_state, 15.0); + if is_excute(agent) { + DamageModule::set_damage_mul(boma, 1.0); + HitModule::set_hit_stop_mul(boma, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); + } + frame(lua_state, 28.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(64.0-28.0)); + VarModule::off_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + } +} + +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + HitModule::set_hit_stop_mul(boma, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 0.5); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); + } + frame(lua_state, 15.0); + if is_excute(agent) { + DamageModule::set_damage_mul(boma, 1.0); + HitModule::set_hit_stop_mul(boma, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + } + frame(lua_state, 28.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnendhi", game_specialnendhi); + agent.acmd("game_specialairnendhi", game_specialnendhi); + agent.acmd("game_specialnendlw", game_specialnendlw); + agent.acmd("game_specialairnendlw", game_specialnendlw); + agent.acmd("game_specialnendmax", game_specialnendmax); + agent.acmd("game_specialairnendmax", game_specialnendmax); + agent.acmd("game_specialnendmaxhi", game_specialnendmaxhi); + agent.acmd("game_specialairnendmaxhi", game_specialnendmaxhi); + agent.acmd("game_specialnendmaxlw", game_specialnendmaxlw); + agent.acmd("game_specialairnendmaxlw", game_specialnendmaxlw); + + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/special_s2.rs b/fighters/lucina/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..d0b18793a8 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s2.rs @@ -0,0 +1,142 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 32.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 32.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/special_s3.rs b/fighters/lucina/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..5d42860909 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s3.rs @@ -0,0 +1,215 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); + } + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/special_s4.rs b/fighters/lucina/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..4fe11cf535 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s4.rs @@ -0,0 +1,188 @@ +use super::*; + +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 7.0); + for _ in 0..4 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 22.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), 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(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/throws.rs b/fighters/lucina/src/acmd/throws.rs index ac922aabce..1a9ee21a13 100644 --- a/fighters/lucina/src/acmd/throws.rs +++ b/fighters/lucina/src/acmd/throws.rs @@ -1,31 +1,29 @@ - use super::*; -unsafe extern "C" fn lucina_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 lucina_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -45,7 +43,7 @@ unsafe extern "C" fn lucina_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -65,10 +63,8 @@ unsafe extern "C" fn lucina_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_catch", lucina_catch_game) - .acmd("game_catchdash", lucina_catch_dash_game) - .acmd("game_catchturn", lucina_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/tilts.rs b/fighters/lucina/src/acmd/tilts.rs index 73f6f2b845..785e84dc93 100644 --- a/fighters/lucina/src/acmd/tilts.rs +++ b/fighters/lucina/src/acmd/tilts.rs @@ -1,68 +1,64 @@ - use super::*; -unsafe extern "C" fn lucina_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 47, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 47, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attacks3", lucina_attack_s3_s_game) - .acmd("game_attackhi3", lucina_attack_hi3_game) - .acmd("game_attacklw3", lucina_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/lucina/src/lib.rs b/fighters/lucina/src/lib.rs index 5537dac979..a03316205e 100644 --- a/fighters/lucina/src/lib.rs +++ b/fighters/lucina/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucina"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/lucina/src/opff.rs b/fighters/lucina/src/opff.rs index 99358524bb..03afd6dd04 100644 --- a/fighters/lucina/src/opff.rs +++ b/fighters/lucina/src/opff.rs @@ -92,6 +92,7 @@ unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } } + // Up Special Reverse unsafe fn up_special_reverse(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { if StatusModule::is_changing(boma) { @@ -108,6 +109,7 @@ unsafe fn up_special_reverse(boma: &mut BattleObjectModuleAccessor, status_kind: } } } + // lets lucina toggle her mask on/off with down taunt unsafe fn mask_toggle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { let mask_is_equipped = VarModule::is_flag(boma.object(), vars::lucina::instance::EQUIP_MASK); @@ -211,8 +213,6 @@ pub unsafe fn lucina_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("lucina") - .on_line(Main, lucina_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lucina_frame_wrapper); } diff --git a/fighters/lucina/src/status/appeal.rs b/fighters/lucina/src/status/appeal.rs new file mode 100644 index 0000000000..bf66bd4a0d --- /dev/null +++ b/fighters/lucina/src/status/appeal.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_APPEAL + +// stub out mask removal at the end of taunt +unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { + 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end); +} \ No newline at end of file diff --git a/fighters/lucina/src/status/mod.rs b/fighters/lucina/src/status/mod.rs new file mode 100644 index 0000000000..eff6fd0f55 --- /dev/null +++ b/fighters/lucina/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod appeal; +mod special_s; +mod special_lw; + +pub fn install(agent: &mut Agent) { + appeal::install(agent); + special_s::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/lucina/src/status/special_lw.rs b/fighters/lucina/src/status/special_lw.rs new file mode 100644 index 0000000000..98af336c63 --- /dev/null +++ b/fighters/lucina/src/status/special_lw.rs @@ -0,0 +1,100 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, hash40("special_lw")); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, hash40("special_air_lw")); + special_lw_main_motion_helper(fighter); + fighter.main_shift(special_lw_main_loop) +} + +unsafe extern "C" fn special_lw_main_motion_helper(fighter: &mut L2CFighterCommon) { + let situation = fighter.global_table[globals::SITUATION_KIND].get_i32(); + if situation != *SITUATION_KIND_GROUND { + let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); + } + } + else { + let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION); + sv_kinetic_energy!(reset_energy, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); + } + } +} + +unsafe extern "C" fn special_lw_check_follow_up(fighter: &mut L2CFighterCommon) { + let stick_y = fighter.global_table[globals::STICK_Y].get_f32(); + let mot; + let mot_air; + if stick_y >= 0.5 { + mot = hash40("special_s4_hi"); + mot_air = hash40("special_air_s4_hi"); + } + else if stick_y <= -0.5 { + mot = hash40("special_s4_lw"); + mot_air = hash40("special_air_s4_lw") + } + else { + mot = hash40("special_s4_s"); + mot_air = hash40("special_air_s4_s") + } + let stick_x = fighter.global_table[globals::STICK_X].get_f32(); + let lr = PostureModule::lr(fighter.module_accessor); + if stick_x * lr < -0.33 { + PostureModule::reverse_lr(fighter.module_accessor); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, mot); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, mot_air); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + special_lw_main_motion_helper(fighter); +} + +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + } + + if !StatusModule::is_changing(fighter.module_accessor) { + if VarModule::is_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + && fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 { + special_lw_check_follow_up(fighter); + VarModule::off_flag(fighter.battle_object,vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); + } + if StatusModule::is_situation_changed(fighter.module_accessor) { + special_lw_main_motion_helper(fighter); + } + } + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} \ No newline at end of file diff --git a/fighters/lucina/src/status.rs b/fighters/lucina/src/status/special_s.rs similarity index 73% rename from fighters/lucina/src/status.rs rename to fighters/lucina/src/status/special_s.rs index a2f62d0366..a453a500b1 100644 --- a/fighters/lucina/src/status.rs +++ b/fighters/lucina/src/status/special_s.rs @@ -1,16 +1,15 @@ use super::*; -use globals::*; -// status script import - pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { unsafe { *(energy as *mut i32).add(0x50 / 4) = frames; *(energy as *mut bool).add(0x5C) = false; } - } +} + +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); @@ -85,7 +84,7 @@ pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -unsafe extern "C" fn lucina_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); PostureModule::set_stick_lr(fighter.module_accessor, 0.0); PostureModule::update_rot_y_lr(fighter.module_accessor); @@ -102,7 +101,7 @@ unsafe extern "C" fn lucina_specials_main(fighter: &mut L2CFighterCommon) -> L2C hash40("special_air_s1") as i64, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR ); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } pub unsafe fn dancing_blade_transition_check(fighter: &mut L2CFighterCommon) { @@ -134,7 +133,7 @@ pub unsafe fn dancing_blade_transition_check(fighter: &mut L2CFighterCommon) { } } -unsafe extern "C" fn lucina_specials_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { dancing_blade_transition_check(fighter); if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { @@ -154,7 +153,7 @@ unsafe extern "C" fn lucina_specials_main_loop(fighter: &mut L2CFighterCommon) - 0.into() } -unsafe extern "C" fn lucina_specials2_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); lucina_specials_reset_helper(fighter); ControlModule::reset_trigger(fighter.module_accessor); @@ -201,10 +200,10 @@ unsafe extern "C" fn lucina_specials2_main(fighter: &mut L2CFighterCommon) -> L2 } WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn lucina_specials3_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW) { WorkModule::set_int64( @@ -244,10 +243,10 @@ unsafe extern "C" fn lucina_specials3_main(fighter: &mut L2CFighterCommon) -> L2 } WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials3_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s3_main_loop as *const () as _)) } -unsafe extern "C" fn lucina_specials3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { lucina_specials_mot_helper(fighter); @@ -274,7 +273,7 @@ unsafe extern "C" fn lucina_specials3_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn lucina_specials3_exec_stop(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s3_execstop(_fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } @@ -388,114 +387,12 @@ unsafe extern "C" fn lucina_specials_status_change_helper(fighter: &mut L2CFight 1.into() } -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, hash40("special_lw")); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, hash40("special_air_lw")); - special_lw_main_motion_helper(fighter); - fighter.main_shift(special_lw_main_loop) -} - -unsafe extern "C" fn special_lw_main_motion_helper(fighter: &mut L2CFighterCommon) { - let situation = fighter.global_table[globals::SITUATION_KIND].get_i32(); - if situation != *SITUATION_KIND_GROUND { - let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); - } - } - else { - let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION); - sv_kinetic_energy!(reset_energy, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); - } - } - -} - -unsafe extern "C" fn special_lw_check_follow_up(fighter: &mut L2CFighterCommon) { - let stick_y = fighter.global_table[globals::STICK_Y].get_f32(); - let mot; - let mot_air; - if stick_y >= 0.5 { - mot = hash40("special_s4_hi"); - mot_air = hash40("special_air_s4_hi"); - } - else if stick_y <= -0.5 { - mot = hash40("special_s4_lw"); - mot_air = hash40("special_air_s4_lw") - } - else { - mot = hash40("special_s4_s"); - mot_air = hash40("special_air_s4_s") - } - let stick_x = fighter.global_table[globals::STICK_X].get_f32(); - let lr = PostureModule::lr(fighter.module_accessor); - if stick_x * lr < -0.33 { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, mot); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, mot_air); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - special_lw_main_motion_helper(fighter); -} +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - } - - if !StatusModule::is_changing(fighter.module_accessor) { - if VarModule::is_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) - && fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 { - special_lw_check_follow_up(fighter); - VarModule::off_flag(fighter.battle_object,vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); - } - if StatusModule::is_situation_changed(fighter.module_accessor) { - special_lw_main_motion_helper(fighter); - } - } - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - } - 0.into() -} - -// stub out mask removal at the end of taunt - -unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { - 1.into() -} + agent.status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, special_s2_main); -pub fn install() { - smashline::Agent::new("lucina") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, lucina_specials_main) - .status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, lucina_specials2_main) - .status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, lucina_specials3_main) - .status(ExecStop, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, lucina_specials3_exec_stop) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end) - .install(); + agent.status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, special_s3_main); + agent.status(ExecStop, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, special_s3_execstop); } \ No newline at end of file diff --git a/fighters/luigi/src/acmd/aerials.rs b/fighters/luigi/src/acmd/aerials.rs index 5b8e61f1f0..a3dc857141 100644 --- a/fighters/luigi/src/acmd/aerials.rs +++ b/fighters/luigi/src/acmd/aerials.rs @@ -1,91 +1,87 @@ - use super::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 90, 121, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 90, 121, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 90, 121, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 90, 121, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 80, 100, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 80, 100, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 88, 0, 43, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 5.5, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 88, 0, 43, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 5.5, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 8.0/(33.0-21.0)); + FT_MOTION_RATE(agent, 8.0/(33.0-21.0)); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 94, 0, 22, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 94, 0, 22, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 361, 103, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 361, 103, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -102,27 +98,26 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 70, 100, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 70, 100, 0, 25, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 70, 100, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 70, 100, 0, 25, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -134,65 +129,66 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 270, 107, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 270, 107, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("hip"), 16.0, 270, 55, 0, 10, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 16.0, 270, 55, 0, 10, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 25, 5.2, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 25, 5.2, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 25, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 25, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 5.0/(32.0-24.0)); + FT_MOTION_RATE(agent, 5.0/(32.0-24.0)); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/luigi/src/acmd/ground.rs b/fighters/luigi/src/acmd/ground.rs index 3b14339700..27c74e8c64 100644 --- a/fighters/luigi/src/acmd/ground.rs +++ b/fighters/luigi/src/acmd/ground.rs @@ -1,147 +1,142 @@ - use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 5.0, 0.0, 8.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 3.5, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 5.0, 0.0, 8.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 3.5, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn expression_attack13(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_attack13(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 15, 10, 0, 24, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 10, 10, 0, 48, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 15, 10, 0, 24, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 10, 10, 0, 48, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 5.0, 0.0, 8.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 4.0, 0.0, 8.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 5.0, 0.0, 8.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 4.0, 0.0, 8.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attack13", game_attack13) - .acmd("expression_attack13", expression_attack13) - .acmd("game_attackdash", game_attack_dash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/luigi/src/acmd/mod.rs b/fighters/luigi/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/luigi/src/acmd/mod.rs +++ b/fighters/luigi/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/luigi/src/acmd/other.rs b/fighters/luigi/src/acmd/other.rs index 436a31c832..b16d5c54a9 100644 --- a/fighters/luigi/src/acmd/other.rs +++ b/fighters/luigi/src/acmd/other.rs @@ -1,255 +1,105 @@ - 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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_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(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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_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_luigi_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_luigi_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn luigi_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, 11.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); } } -unsafe extern "C" fn luigi_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 5.0); - if is_excute(fighter) { - if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { - ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER) { - ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); - ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("catch"), false, 0.0); - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, -1); - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, (13.0-1.0)/5.0); - } - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, 1.0); - GrabModule::set_rebound(boma, true); - SEARCH(fighter, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - //CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - //ArticleModule::shoot(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } - 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); - } - wait(lua_state, 20.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } +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); -} - -unsafe extern "C" fn luigi_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_plunger_shoot")); - } -} - -unsafe extern "C" fn luigi_obakyumu_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("vacuum"), 4.0, 0.0, 0.0, 0, 90, 90, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } -} + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("luigi") - .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", luigi_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_catch", luigi_catch_game) - .acmd("sound_catch", luigi_catch_sound) - .install(); - smashline::Agent::new("luigi_obakyumu") - .acmd("effect_catch", luigi_obakyumu_catch_effect) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/luigi/src/acmd/smashes.rs b/fighters/luigi/src/acmd/smashes.rs index bcc14b90c8..509a3f5cdc 100644 --- a/fighters/luigi/src/acmd/smashes.rs +++ b/fighters/luigi/src/acmd/smashes.rs @@ -1,201 +1,195 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.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_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.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_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attacks4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 37, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 37, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, 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_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.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_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 14.0, 110, 106, 0, 35, 4.8, 2.8, -1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0, 110, 106, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 14.0, 110, 106, 0, 35, 4.8, 2.8, -1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0, 110, 106, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 87, 90, 0, 51, 5.0, 0.0, 3.6, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 87, 90, 0, 51, 4.5, 0.0, 3.6, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 87, 90, 0, 51, 5.0, 0.0, 3.6, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 87, 90, 0, 51, 4.5, 0.0, 3.6, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 87, 104, 0, 51, 5.0, 0.0, 3.6, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 87, 104, 0, 51, 4.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 87, 104, 0, 51, 5.0, 0.0, 3.6, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 87, 104, 0, 51, 4.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attacks4hi", game_attacks4hi) - .acmd("effect_attacks4hi", effect_attacks4hi) - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attacks4lw", game_attacks4lw) - .acmd("effect_attacks4lw", effect_attacks4lw) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/luigi/src/acmd/specials.rs b/fighters/luigi/src/acmd/specials.rs index 8d2f79a358..0618ad2e75 100644 --- a/fighters/luigi/src/acmd/specials.rs +++ b/fighters/luigi/src/acmd/specials.rs @@ -1,87 +1,83 @@ use super::*; -unsafe extern "C" fn luigi_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); } - } -unsafe extern "C" fn luigi_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); - FLASH(fighter, 0, 1, 0, 0.353); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); + FLASH(agent, 0, 1, 0, 0.353); } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("luigi_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); } - } -unsafe extern "C" fn luigi_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); } - } -unsafe extern "C" fn luigi_special_n_expression(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_specialn(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); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } -unsafe extern "C" fn luigi_special_n_thunder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 9.0, 8.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 9.0, 2.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 9.0, 8.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 9.0, 2.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let mut rand = &Vector3f::new( app::sv_math::rand(hash40("fighter"), 50) as f32, app::sv_math::rand(hash40("stage"), 50) as f32, @@ -92,262 +88,330 @@ unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.25, 1.0, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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); + if is_excute(agent) { + FLASH(agent, 0, 0.25, 1.0, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn luigi_special_n_thunder_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_luigi_attack07")); - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_luigi_attack07")); + PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); } } -unsafe extern "C" fn luigi_special_n_thunder_expression(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_specialnthunder(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); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_specialairsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if is_excute(agent) { + if KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); } } -unsafe extern "C" fn luigi_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 2, 15, 5, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - if VarModule::get_int(fighter.object(), vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE) <= 0 { - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 0.8, 0.8); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 1.0, 0.0); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 2, 15, 5, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + if VarModule::get_int(agent.object(), vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE) <= 0 { + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 0.8, 0.8); + LAST_EFFECT_SET_COLOR(agent, 0.0, 1.0, 0.0); } } } -unsafe extern "C" fn effect_specialshold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); + let handle = EffectModule::get_last_handle(boma) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } for _ in 0..100 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 10, 00, 4, 0, 0, 0, false); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.7, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 10, 00, 4, 0, 0, 0, false); + let handle = EffectModule::get_last_handle(boma) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); } } wait(lua_state, 10.0); } } -unsafe extern "C" fn effect_specialairshold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); + let handle = EffectModule::get_last_handle(boma) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); - CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); + CORRECT(agent, *GROUND_CORRECT_KIND_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); AttackModule::set_attack_keep_rumble(boma, 0, true); JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } } -unsafe extern "C" fn game_specialsdischarge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let misfire_multiplier = VarModule::get_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); - VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); +unsafe extern "C" fn game_specialsdischarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let misfire_multiplier = VarModule::get_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); + VarModule::set_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); - CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); + CORRECT(agent, *GROUND_CORRECT_KIND_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - AttackModule::set_attack_keep_rumble(fighter.module_accessor, 0, true); - JostleModule::set_status(fighter.module_accessor, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + AttackModule::set_attack_keep_rumble(boma, 0, true); + JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); } frame(lua_state, 20.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } } -unsafe extern "C" fn effect_specialsdischarge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("luigi_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); +unsafe extern "C" fn effect_specialsdischarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("luigi_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("luigi_rocket_jet2"), Hash40::new("top"), 0, 4, 4, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.7, 0.3); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("luigi_rocket_jet2"), Hash40::new("top"), 0, 4, 4, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); + EffectModule::enable_sync_init_pos_last(boma); } } -unsafe extern "C" fn game_specialairsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + wait(lua_state, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + wait(lua_state, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, -5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, -5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 6.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 6.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { //KineticModule::mul_speed(boma, &Vector3f{x: 0.0, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); //KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if is_excute(agent) { + if KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.1, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, 5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, -5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, 5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, -5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); //ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 180, 100, 45, 0, 15.5, 0.0, 8.5, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hitVec = Vector2f{ x: 0.0, y: 8.0 }; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hitVec, 8, false); @@ -355,128 +419,58 @@ unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hitVec, 8, false); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 90, 120, 0, 85, 6.5, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 90, 120, 0, 85, 6.5, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); WorkModule::on_flag(boma, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_BUOYANCY); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} + agent.acmd("game_specialnthunder", game_specialnthunder); + agent.acmd("game_specialairnthunder", game_specialnthunder); + agent.acmd("effect_specialnthunder", effect_specialnthunder); + agent.acmd("effect_specialairnthunder", effect_specialnthunder); + agent.acmd("sound_specialnthunder", sound_specialnthunder); + agent.acmd("sound_specialairnthunder", sound_specialnthunder); + agent.acmd("expression_specialnthunder",expression_specialnthunder); + agent.acmd("expression_specialairnthunder",expression_specialnthunder); + + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("effect_specialairshold", effect_specialairshold); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsdischarge", game_specialsdischarge); + agent.acmd("effect_specialsdischarge", effect_specialsdischarge); + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_specialn", luigi_special_n_game) - .acmd("game_specialairn", luigi_special_n_game) - .acmd("effect_specialn", luigi_special_n_effect) - .acmd("effect_specialairn", luigi_special_n_effect) - .acmd("sound_specialn", luigi_special_n_sound) - .acmd("sound_specialairn", luigi_special_n_sound) - .acmd("expression_specialn", luigi_special_n_expression) - .acmd("expression_specialairn", luigi_special_n_expression) - .acmd("game_specialnthunder", luigi_special_n_thunder_game) - .acmd("game_specialairnthunder", luigi_special_n_thunder_game) - .acmd("effect_specialnthunder", luigi_special_n_thunder_effect) - .acmd("effect_specialairnthunder", luigi_special_n_thunder_effect) - .acmd("sound_specialnthunder", luigi_special_n_thunder_sound) - .acmd("sound_specialairnthunder", luigi_special_n_thunder_sound) - .acmd( - "expression_specialnthunder", - luigi_special_n_thunder_expression, - ) - .acmd( - "expression_specialairnthunder", - luigi_special_n_thunder_expression, - ) - .acmd("game_specialairsstart", game_specialairsstart) - .acmd("effect_specialsstart", luigi_special_s_start_effect) - .acmd("effect_specialairsstart", luigi_special_s_start_effect) - .acmd("effect_specialshold", effect_specialshold) - .acmd("effect_specialairshold", effect_specialairshold) - .acmd("game_specials", game_specials) - .acmd("game_specialsdischarge", game_specialsdischarge) - .acmd("effect_specialsdischarge", effect_specialsdischarge) - .acmd("game_specialairsend", game_specialairsend) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialairhi) - .install(); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/luigi/src/acmd/throws.rs b/fighters/luigi/src/acmd/throws.rs index ee3ab4a654..8b72a677f5 100644 --- a/fighters/luigi/src/acmd/throws.rs +++ b/fighters/luigi/src/acmd/throws.rs @@ -1,64 +1,120 @@ use super::*; -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { - if is_excute(fighter) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 5.0); + if is_excute(agent) { + if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { + ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER) { + ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); + ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("catch"), false, 0.0); + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, -1); + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, (13.0-1.0)/5.0); + } + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, 1.0); + GrabModule::set_rebound(boma, true); + SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + //CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + //ArticleModule::shoot(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } + 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); + } + wait(lua_state, 20.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_plunger_shoot")); + } +} + +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if IS_EXIST_ARTICLE(agent, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, Hash40::new("throw_b"), false, -1.0); } } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 73, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 73, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 21, 3); - FT_CATCH_STOP(fighter, 5, 1); + CHECK_FINISH_CAMERA(agent, 21, 3); + FT_CATCH_STOP(agent, 5, 1); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("throw_lw"), false, 0.0); } - FT_LEAVE_NEAR_OTTOTTO(fighter, -1, 1); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_LEAVE_NEAR_OTTOTTO(agent, -1, 1); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 30, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 30, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("sound_catch", sound_catch); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/luigi/src/acmd/tilts.rs b/fighters/luigi/src/acmd/tilts.rs index d16bb43305..d51330b4f7 100644 --- a/fighters/luigi/src/acmd/tilts.rs +++ b/fighters/luigi/src/acmd/tilts.rs @@ -1,93 +1,87 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 9.0, 100, 118, 0, 35, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 100, 118, 0, 35, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 9.0, 100, 118, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 9.0, 100, 118, 0, 35, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 100, 118, 0, 35, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 9.0, 100, 118, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 72, 0, 32, 4.8, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KAMEHIT, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 5.0, 361, 72, 0, 32, 3.8, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KAMEHIT, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 72, 0, 32, 4.8, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KAMEHIT, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 5.0, 361, 72, 0, 32, 3.8, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KAMEHIT, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/luigi/src/lib.rs b/fighters/luigi/src/lib.rs index a362adebe0..6e6209236a 100644 --- a/fighters/luigi/src/lib.rs +++ b/fighters/luigi/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod obakyumu; use smash::{ lib::{ @@ -39,19 +43,7 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn luigi_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_LUIGI { - return; - } - - VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); - VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); - } -} +#[macro_use] extern crate smash_script; pub fn calculate_misfire_number(fighter: &mut L2CFighterCommon) { unsafe { @@ -68,11 +60,11 @@ pub fn calculate_misfire_number(fighter: &mut L2CFighterCommon) { } pub fn install() { - status::install(); - acmd::install(); - opff::install(); + let agent = &mut Agent::new("luigi"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); - smashline::Agent::new("luigi") - .on_start(luigi_reset) - .install(); + obakyumu::install(); } diff --git a/fighters/luigi/src/obakyumu/acmd.rs b/fighters/luigi/src/obakyumu/acmd.rs new file mode 100644 index 0000000000..75e0a2aaaf --- /dev/null +++ b/fighters/luigi/src/obakyumu/acmd.rs @@ -0,0 +1,15 @@ +use super::*; + +unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("vacuum"), 4.0, 0.0, 0.0, 0, 90, 90, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_catch", effect_catch); +} diff --git a/fighters/luigi/src/obakyumu/mod.rs b/fighters/luigi/src/obakyumu/mod.rs new file mode 100644 index 0000000000..14facedf2e --- /dev/null +++ b/fighters/luigi/src/obakyumu/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("luigi_obakyumu"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/luigi/src/opff.rs b/fighters/luigi/src/opff.rs index 663e284c47..db3ec306b8 100644 --- a/fighters/luigi/src/opff.rs +++ b/fighters/luigi/src/opff.rs @@ -3,14 +3,13 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn luigi_missle_ledgegrab(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_END) { if StatusModule::is_changing(fighter.module_accessor) { fighter.select_cliff_hangdata_from_name("special_s"); } // allows ledgegrab during Luigi Missile - fighter.sub_transition_group_check_air_cliff(); + fighter.sub_transition_group_check_air_cliff(); } } @@ -32,7 +31,7 @@ unsafe fn luigi_always_misfire_training_mode(fighter: &mut L2CFighterCommon, sta } } if VarModule::is_flag(fighter.battle_object, vars::luigi::instance::TRAINING_ALWAYS_MISFIRES) { - VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); } } } @@ -115,8 +114,6 @@ unsafe fn special_s_charge_init(fighter: &mut smash::lua2cpp::L2CFighterCommon, } } -pub fn install() { - smashline::Agent::new("luigi") - .on_line(Main, luigi_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, luigi_frame_wrapper); } diff --git a/fighters/luigi/src/status/mod.rs b/fighters/luigi/src/status/mod.rs new file mode 100644 index 0000000000..536938482e --- /dev/null +++ b/fighters/luigi/src/status/mod.rs @@ -0,0 +1,20 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_s; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); +} diff --git a/fighters/luigi/src/status/special_n.rs b/fighters/luigi/src/status/special_n.rs index 0d1815acf6..1fae290ad1 100644 --- a/fighters/luigi/src/status/special_n.rs +++ b/fighters/luigi/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,8 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("luigi") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } diff --git a/fighters/luigi/src/status.rs b/fighters/luigi/src/status/special_s.rs similarity index 92% rename from fighters/luigi/src/status.rs rename to fighters/luigi/src/status/special_s.rs index f0702ae58c..20bfa76b50 100644 --- a/fighters/luigi/src/status.rs +++ b/fighters/luigi/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -mod special_n; + +// FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE unsafe extern "C" fn special_s_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_S_CHARGE_MELEE_NO_RANDOM) { @@ -127,29 +128,9 @@ unsafe extern "C" fn special_s_charge_exit(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - special_n::install(); - - smashline::Agent::new("luigi") - .status( - Init, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_init, - ) - .status( - Main, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_main, - ) - .status( - End, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_end, - ) - .status( - Exit, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_init); + agent.status(Main, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_main); + agent.status(End, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_end); + agent.status(Exit, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_exit); } diff --git a/fighters/mario/src/acmd/aerials.rs b/fighters/mario/src/acmd/aerials.rs index 7c780c1c99..bc5db3fb17 100644 --- a/fighters/mario/src/acmd/aerials.rs +++ b/fighters/mario/src/acmd/aerials.rs @@ -1,204 +1,198 @@ use super::*; -unsafe extern "C" fn mario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 15, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 15, 3.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 15, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 15, 3.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mario_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("mario_fb_shoot"), Hash40::new("handl"), 0.75, -1, 0, 0, -45, 0, 0.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_fb_shoot"), Hash40::new("mario_fb_shoot"), Hash40::new("handl"), 0.75, -1, 0, 0, -45, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_fb_bullet_r"), Hash40::new("mario_fb_bullet_l"), Hash40::new("handl"), 0.75, -1, 0, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_fb_bullet_r"), Hash40::new("mario_fb_bullet_l"), Hash40::new("handl"), 0.75, -1, 0, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -11, -113, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent){ + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -11, -113, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, 20.0); - if is_excute(fighter){ - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent){ + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_bullet_r"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_bullet_l"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_bullet_r"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_bullet_l"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-6.0)); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 38, 112, 0, 25, 3.5, 5.1, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 38, 112, 0, 25, 3.5, 5.1, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(13.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mario_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn mario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(4.5-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 4.5, 3.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(10.0-4.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 68, 84, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 68, 84, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 4.5, 10.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 68, 84, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 68, 84, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 60, 82, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 60, 82, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 60, 82, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 60, 82, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.2); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 3.5, 0.0, -0.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 4.8, 0.0, 6.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 3.5, 0.0, -0.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 4.8, 0.0, 6.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -227,50 +221,39 @@ unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackss"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackss"), 5); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_landing_air_lw_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"), 1.3, 70, 90, 0, 40, 4.3, 0.0, 3.2, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 70, 90, 0, 40, 4.3, 0.0, 3.2, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - */ -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attackairn", mario_attack_air_n_game) - .game_acmd("game_attackairf", mario_attack_air_f_game) - .effect_acmd("effect_attackairf", mario_attack_air_f_effect) - .game_acmd("game_attackairb", mario_attack_air_b_game) - .effect_acmd("effect_attackairb", mario_attack_air_b_effect) - .game_acmd("game_attackairhi", mario_attack_air_hi_game) - .game_acmd("game_attackairlw", mario_attack_air_lw_game) - .effect_acmd("effect_attackairlw", effect_attackairlw) - .sound_acmd("sound_attackairlw", sound_attackairlw) - .expression_acmd("expression_attackairlw", expression_attackairlw) - .game_acmd("game_landingairlw", mario_landing_air_lw_game) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", stub); } diff --git a/fighters/mario/src/acmd/ground.rs b/fighters/mario/src/acmd/ground.rs index ad290d4c56..aa3719df50 100644 --- a/fighters/mario/src/acmd/ground.rs +++ b/fighters/mario/src/acmd/ground.rs @@ -1,179 +1,172 @@ use super::*; -unsafe extern "C" fn mario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 83, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 83, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn mario_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 80, 100, 25, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 2.0, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 80, 100, 25, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 80, 100, 25, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 2.0, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 80, 100, 25, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn mario_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mario_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.5-2.0)); - } + FT_MOTION_RATE_RANGE(agent, 2.0, 2.5, 1.0); frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.0-2.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 361, 83, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 5.0, 361, 83, 0, 35, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 2.5, 5.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 361, 83, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 5.0, 361, 83, 0, 35, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_13_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"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mario_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn mario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 60, 40, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 60, 40, 0, 80, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 60, 40, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 60, 40, 0, 80, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 110, 50, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 110, 50, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 110, 50, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 110, 50, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attack11", mario_attack_11_game) - .effect_acmd("effect_attack11", mario_attack_11_effect) - .game_acmd("game_attack12", mario_attack_12_game) - .effect_acmd("effect_attack12", mario_attack_12_effect) - .game_acmd("game_attack13", mario_attack_13_game) - .effect_acmd("effect_attack13", mario_attack_13_effect) - .expression_acmd("expression_attack13", mario_attack_13_expression) - .game_acmd("game_attackdash", mario_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mario/src/acmd/mod.rs b/fighters/mario/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/mario/src/acmd/mod.rs +++ b/fighters/mario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/mario/src/acmd/other.rs b/fighters/mario/src/acmd/other.rs index 8c1275d95b..5564019db6 100644 --- a/fighters/mario/src/acmd/other.rs +++ b/fighters/mario/src/acmd/other.rs @@ -1,352 +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_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(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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_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_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_mario_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mario_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, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_mario_step_left_m"), Hash40::new("se_mario_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_mario_step_left_m"), Hash40::new("se_mario_step_right_m")); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.222); + FT_MOTION_RATE(agent, 1.222); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + 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); - } -} - -unsafe extern "C" fn mario_fireball_regular_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"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -// Removing flood projectile, properties, and sounds - -unsafe extern "C" fn effect_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mario_pump_shoot"), Hash40::new("mouth"), 0, 0, 0, 0, 90, 0, 0.9, true); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_pump_shoot"), false, true); - } - */ -} - -unsafe extern "C" fn game_regular(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"), 0.0, 55, 100, 70, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_WATER_PUMP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - */ -} - -unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mario_pump_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - */ -} - -unsafe extern "C" fn effect_hit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn effect_clash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sound_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - SET_TAKEOUT_SE(fighter, Hash40::new("se_common_c_water_m")); - } - */ -} - -unsafe extern "C" fn game_appealsl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, false, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_appealsr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, false, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn expression_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("mario_fireball") - .game_acmd("game_regular", mario_fireball_regular_game) - .install(); - smashline::Agent::new("mario_pump") - .effect_acmd("effect_light", effect_light) - .install(); - smashline::Agent::new("mario_pumpwater") - .game_acmd("game_regular", game_regular) - .effect_acmd("effect_regular", effect_regular) - .effect_acmd("effect_hit", effect_hit) - .effect_acmd("effect_clash", effect_clash) - .sound_acmd("sound_regular", sound_regular) - .install(); - smashline::Agent::new("mario") - .sound_acmd("sound_damageflyhi", damageflyhi_sound) - .sound_acmd("sound_damageflylw", damageflylw_sound) - .sound_acmd("sound_damageflyn", damageflyn_sound) - .sound_acmd("sound_damageflyroll", damageflyroll_sound) - .sound_acmd("sound_damageflytop", damageflytop_sound) - .game_acmd("game_dash", dash_game) - .sound_acmd("sound_dash", dash_sound) - .game_acmd("game_turndash", turn_dash_game) - .game_acmd("game_escapeair", escape_air_game) - .game_acmd("game_escapeairslide", escape_air_slide_game) - .game_acmd("game_appealsl", game_appealsl) - .game_acmd("game_appealsr", game_appealsr) - .expression_acmd("expression_appealsl", expression_appeals) - .expression_acmd("expression_appealsr", expression_appeals) - .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("game_dash", game_dash); + 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("game_appealsl", game_appealsl); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("expression_appealsl", expression_appeals); + agent.acmd("expression_appealsr", expression_appeals); } diff --git a/fighters/mario/src/acmd/smashes.rs b/fighters/mario/src/acmd/smashes.rs index e634f2b797..eb41e46f98 100644 --- a/fighters/mario/src/acmd/smashes.rs +++ b/fighters/mario/src/acmd/smashes.rs @@ -1,152 +1,146 @@ - use super::*; -unsafe extern "C" fn mario_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 9.0; let attack_end_frame = 14.0; let attack_duration = 3.0; let motion_rate = attack_duration/(attack_end_frame-attack_start_frame); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("head"), 14.0, 83, 95, 0, 32, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 14.0, 83, 95, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, motion_rate); + ATTACK(agent, 0, 0, Hash40::new("head"), 14.0, 83, 95, 0, 32, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 14.0, 83, 95, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, attack_end_frame + 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn mario_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_smash_arc"), Hash40::new("mario_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.90, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_smash_arc"), Hash40::new("mario_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.90, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 4.5, 0.0, 3.6, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 4.5, 0.0, 3.6, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 4.5, 0.0, 3.6, -11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 4.5, 0.0, 3.6, -11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attacks4hi", mario_attack_s4_hi_game) - .game_acmd("game_attacks4", mario_attack_s4_s_game) - .game_acmd("game_attacks4lw", mario_attack_s4_lw_game) - .game_acmd("game_attackhi4", mario_attack_hi4_game) - .effect_acmd("effect_attackhi4", mario_attack_hi4_effect) - .game_acmd("game_attacklw4", mario_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mario/src/acmd/specials.rs b/fighters/mario/src/acmd/specials.rs index cafa1ce809..a108d0ad11 100644 --- a/fighters/mario/src/acmd/specials.rs +++ b/fighters/mario/src/acmd/specials.rs @@ -2,197 +2,195 @@ use smash::app::sv_animcmd::QUAKE; use super::*; -unsafe extern "C" fn mario_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 14.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 49.0, 23.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mario_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.353); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.353); } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 27.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } - } -unsafe extern "C" fn mario_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); } } -unsafe extern "C" fn mario_special_n_expression(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_specialn(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); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - KineticModule::add_speed(fighter.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.55, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.55, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.55, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.55, true); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); } } frame(lua_state, 14.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 7.5, 10.5, 0, 0, 0, 0.26, true); - LAST_EFFECT_SET_COLOR(fighter, 0.65, 0.2, 0.08); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 6.0, 10.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 5.0, 10.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 7.5, 10.5, 0, 0, 0, 0.26, true); + LAST_EFFECT_SET_COLOR(agent, 0.65, 0.2, 0.08); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 6.0, 10.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.55); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 5.0, 10.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.55); EffectModule::enable_sync_init_pos_last(boma); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 18.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.75); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_bomb_a"), false, false); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.75); + EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); } frame(lua_state, 24.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_flame"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - PLAY_SE(fighter, Hash40::new("vc_mario_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("vc_mario_attack07")); } } -unsafe extern "C" fn mario_special_n_fire_expression(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_specialnfire(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); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_MANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -200,34 +198,34 @@ unsafe extern "C" fn mario_special_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIO_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.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); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); WorkModule::off_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn mario_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_MANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -235,59 +233,59 @@ unsafe extern "C" fn mario_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIO_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL) { WorkModule::on_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - VarModule::on_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); + VarModule::on_flag(agent.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.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); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); WorkModule::off_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if (WorkModule::is_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_HI_FLAG_CAPPY)) { - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -295,50 +293,50 @@ unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.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); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } else { - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -346,339 +344,324 @@ unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.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); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } - } -unsafe extern "C" fn mario_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), 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_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_superjump_power"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_superjump_power"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mario_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mario_superjump_fnish"), -1); } } -unsafe extern "C" fn mario_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_superjump_power"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_superjump_power"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mario_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mario_superjump_fnish"), -1); } } -unsafe extern "C" fn mario_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 10.0, 5.0); - if is_excute(fighter){ +unsafe extern "C" fn game_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 10.0, 5.0); + if is_excute(agent){ ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); - + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } -//Galaxy spin special effects - -unsafe extern "C" fn effect_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } -//Galaxy spin sound effects - -unsafe extern "C" fn sound_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = SoundModule::play_se(boma, Hash40::new("se_mario_special_l01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 0.7, 0); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); } - } -unsafe extern "C" fn expression_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } -unsafe extern "C" fn mario_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ +unsafe extern "C" fn game_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - FT_MOTION_RATE_RANGE(fighter, 0.0, 10.0, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { + FT_MOTION_RATE_RANGE(agent, 0.0, 10.0, 5.0); + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } else { frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 2.7, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 2.7, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); - + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } } -//Galaxy spin special effects - -unsafe extern "C" fn effect_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will disappear if you used galaxy spin in the air - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will disappear if you used galaxy spin in the air + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } else { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.1); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.1); - LAST_EFFECT_SET_RATE(fighter, 0.8); - - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.1); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.1); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.2); } } } -//Galaxy spin sound effects - -unsafe extern "C" fn sound_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will change if you used galaxy spin in the air + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will change if you used galaxy spin in the air let handle = SoundModule::play_se(boma, Hash40::new("se_mario_special_l01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 0.7, 0); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); } else { - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); } } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_specialn", mario_special_n_game) - .game_acmd("game_specialairn", mario_special_n_game) - .effect_acmd("effect_specialn", mario_special_n_effect) - .effect_acmd("effect_specialairn", mario_special_n_effect) - .sound_acmd("sound_specialn", mario_special_n_sound) - .sound_acmd("sound_specialairn", mario_special_n_sound) - .expression_acmd("expression_specialn", mario_special_n_expression) - .expression_acmd("expression_specialairn", mario_special_n_expression) - .game_acmd("game_specialnfire", mario_special_n_fire_game) - .game_acmd("game_specialairnfire", mario_special_n_fire_game) - .effect_acmd("effect_specialnfire", mario_special_n_fire_effect) - .effect_acmd("effect_specialairnfire", mario_special_n_fire_effect) - .sound_acmd("sound_specialnfire", mario_special_n_fire_sound) - .sound_acmd("sound_specialairnfire", mario_special_n_fire_sound) - .expression_acmd("expression_specialnfire", mario_special_n_fire_expression) - .expression_acmd( - "expression_specialairnfire", - mario_special_n_fire_expression, - ) - .game_acmd("game_specials", mario_special_s_game) - .game_acmd("game_specialairs", mario_special_air_s_game) - .game_acmd("game_specialhi", mario_special_hi_game) - .game_acmd("game_specialairhi", mario_special_hi_game) - .effect_acmd("effect_specialhi", mario_special_hi_effect) - .effect_acmd("effect_specialairhi", mario_special_air_hi_effect) - .game_acmd("game_speciallwlight", mario_special_lw_light) - .effect_acmd("effect_speciallwlight", effect_special_lw_light) - .sound_acmd("sound_speciallwlight", sound_special_lw_light) - .expression_acmd("expression_speciallwlight", expression_special_lw_light) - .expression_acmd("expression_specialairlwlight", expression_special_lw_light) - .game_acmd("game_specialairlwlight", mario_special_air_lw_light) - .effect_acmd("effect_specialairlwlight", effect_special_air_lw_light) - .sound_acmd("sound_specialairlwlight", sound_special_air_lw_light) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialnfire", sound_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialnfire); + agent.acmd("expression_specialnfire", expression_specialnfire); + agent.acmd("expression_specialairnfire", expression_specialnfire); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + + agent.acmd("game_speciallwlight", game_speciallwlight); + agent.acmd("effect_speciallwlight", effect_speciallwlight); + agent.acmd("sound_speciallwlight", sound_speciallwlight); + agent.acmd("expression_speciallwlight", expression_speciallwlight); + agent.acmd("expression_specialairlwlight", expression_speciallwlight); + agent.acmd("game_specialairlwlight", game_specialairlwlight); + agent.acmd("effect_specialairlwlight", effect_specialairlwlight); + agent.acmd("sound_specialairlwlight", sound_specialairlwlight); } diff --git a/fighters/mario/src/acmd/throws.rs b/fighters/mario/src/acmd/throws.rs index 1d8a4e696b..fbb5f211fc 100644 --- a/fighters/mario/src/acmd/throws.rs +++ b/fighters/mario/src/acmd/throws.rs @@ -1,166 +1,160 @@ use super::*; -unsafe extern "C" fn mario_grab(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mario_dashgrab(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.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(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mario_pivotgrab(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { 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, 0.0, Some(0.0), Some(6.6), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mario_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 45, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 45, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 78, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 78, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 8.0, 50, 70, 0, 100, 4.0, -1.0, 6.0, 0.0, Some(-3.2), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 8.0, 50, 70, 0, 100, 4.0, -1.0, 6.0, 0.0, Some(-3.2), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 43.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 90, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 90, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 5, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 5, 7); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 95, 0, 58, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 95, 0, 58, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4.0, 0.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_catch", mario_grab) - .game_acmd("game_catchdash", mario_dashgrab) - .game_acmd("game_catchturn", mario_pivotgrab) - .game_acmd("game_throwf", mario_throw_f_game) - .game_acmd("game_throwb", mario_throw_b_game) - .game_acmd("game_throwhi", mario_throw_hi_game) - .game_acmd("game_throwlw", mario_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mario/src/acmd/tilts.rs b/fighters/mario/src/acmd/tilts.rs index 40bee6c762..59b002c602 100644 --- a/fighters/mario/src/acmd/tilts.rs +++ b/fighters/mario/src/acmd/tilts.rs @@ -1,141 +1,136 @@ use super::*; -unsafe extern "C" fn mario_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 80, 80, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 80, 80, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attacks3hi", mario_attack_s3_hi_game) - .effect_acmd("effect_attacks3hi", mario_attack_s3_hi_effect) - .game_acmd("game_attacks3", mario_attack_s3_s_game) - .effect_acmd("effect_attacks3", mario_attack_s3_s_effect) - .game_acmd("game_attacks3lw", mario_attack_s3_lw_game) - .effect_acmd("effect_attacks3lw", mario_attack_s3_lw_effect) - .game_acmd("game_attackhi3", mario_attack_hi3_game) - .game_acmd("game_attacklw3", mario_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/mario/src/fireball/acmd.rs b/fighters/mario/src/fireball/acmd.rs new file mode 100644 index 0000000000..25728e1d03 --- /dev/null +++ b/fighters/mario/src/fireball/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_MARIO_FIREBALL, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} \ No newline at end of file diff --git a/fighters/mario/src/fireball/mod.rs b/fighters/mario/src/fireball/mod.rs new file mode 100644 index 0000000000..e17a0ce4c3 --- /dev/null +++ b/fighters/mario/src/fireball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_fireball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/lib.rs b/fighters/mario/src/lib.rs index 812a5b171d..1a87764694 100644 --- a/fighters/mario/src/lib.rs +++ b/fighters/mario/src/lib.rs @@ -7,25 +7,54 @@ pub mod acmd; pub mod opff; pub mod status; +// articles + +mod fireball; +mod pump; +mod pumpwater; + use smash::{ + lib::{ + L2CValue, + LuaConst, + }, app::{ - self, - lua_bind::*, - sv_animcmd::{frame, wait}, *, + self, + sv_animcmd::{ + frame, + wait + }, + lua_bind::* }, hash40, - lib::lua_const::*, - lib::{L2CValue, LuaConst}, + lib::{ + lua_const::* + }, lua2cpp::*, - phx::*, + phx::* +}; +use smash_script::{ + *, + macros::* +}; +use utils::{ + *, + util::*, + ext::*, + consts::*, }; -use smash_script::{macros::*, *}; use smashline::*; -use utils::{consts::*, ext::*, util::*, *}; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("mario"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + fireball::install(); + pump::install(); + pumpwater::install(); } diff --git a/fighters/mario/src/opff.rs b/fighters/mario/src/opff.rs index 493a1f197a..c893e23bc6 100644 --- a/fighters/mario/src/opff.rs +++ b/fighters/mario/src/opff.rs @@ -265,8 +265,7 @@ pub unsafe fn mario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("mario") - .on_line(Main, mario_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mario_frame_wrapper); } diff --git a/fighters/mario/src/pump/acmd.rs b/fighters/mario/src/pump/acmd.rs new file mode 100644 index 0000000000..bcb15741e8 --- /dev/null +++ b/fighters/mario/src/pump/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_light", stub); +} \ No newline at end of file diff --git a/fighters/mario/src/pump/mod.rs b/fighters/mario/src/pump/mod.rs new file mode 100644 index 0000000000..2df2c0db77 --- /dev/null +++ b/fighters/mario/src/pump/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_pump"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd.rs b/fighters/mario/src/pumpwater/acmd.rs new file mode 100644 index 0000000000..fb93efb831 --- /dev/null +++ b/fighters/mario/src/pumpwater/acmd.rs @@ -0,0 +1,11 @@ +use super::*; + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", stub); + agent.acmd("effect_regular", stub); + agent.acmd("sound_regular", stub); + agent.acmd("effect_hit", stub); + agent.acmd("effect_clash", stub); +} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/mod.rs b/fighters/mario/src/pumpwater/mod.rs new file mode 100644 index 0000000000..68bffd2022 --- /dev/null +++ b/fighters/mario/src/pumpwater/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_pumpwater"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/status.rs b/fighters/mario/src/status.rs deleted file mode 100644 index 5f4c4480f3..0000000000 --- a/fighters/mario/src/status.rs +++ /dev/null @@ -1,73 +0,0 @@ -use super::*; -use globals::*; - -mod special_n; - -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // Reset cape stall flag on landing or ledgegrab - if [*SITUATION_KIND_GROUND, *SITUATION_KIND_CLIFF].contains(&fighter.global_table[SITUATION_KIND].get_i32()) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD]) { - VarModule::off_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); - } - true.into() -} - -extern "C" fn mario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_MARIO { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT); - return 1.into() -} - -unsafe extern "C" fn special_lw_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings(fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_LW as u32, - 0 - ); - - return 0.into() -} - -unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - EffectModule::remove_post_effect_line(fighter.module_accessor, 0x1e, true); - fighter.status_end_Rebirth(); - 0.into() -} - -pub fn install() { - special_n::install(); - smashline::Agent::new("mario") - .on_start(mario_init) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end) - .install(); -} diff --git a/fighters/mario/src/status/mod.rs b/fighters/mario/src/status/mod.rs new file mode 100644 index 0000000000..0d5dd715ff --- /dev/null +++ b/fighters/mario/src/status/mod.rs @@ -0,0 +1,28 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_lw; +mod rebirth; + +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + // Reset cape stall flag on landing or ledgegrab + if [*SITUATION_KIND_GROUND, *SITUATION_KIND_CLIFF].contains(&fighter.global_table[SITUATION_KIND].get_i32()) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD]) { + VarModule::off_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_lw::install(agent); + rebirth::install(agent); +} diff --git a/fighters/mario/src/status/rebirth.rs b/fighters/mario/src/status/rebirth.rs new file mode 100644 index 0000000000..04567a2fbf --- /dev/null +++ b/fighters/mario/src/status/rebirth.rs @@ -0,0 +1,16 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + EffectModule::remove_post_effect_line(fighter.module_accessor, 0x1e, true); + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} diff --git a/fighters/mario/src/status/special_lw.rs b/fighters/mario/src/status/special_lw.rs new file mode 100644 index 0000000000..94ada36752 --- /dev/null +++ b/fighters/mario/src/status/special_lw.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT); + return 1.into() +} + +unsafe extern "C" fn special_lw_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings(fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_LW as u32, + 0 + ); + + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre); +} diff --git a/fighters/mario/src/status/special_n.rs b/fighters/mario/src/status/special_n.rs index 39b33591a2..ca63676638 100644 --- a/fighters/mario/src/status/special_n.rs +++ b/fighters/mario/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,8 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("mario") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } diff --git a/fighters/mariod/src/acmd/aerials.rs b/fighters/mariod/src/acmd/aerials.rs index 194b880cdb..07c6cc3bef 100644 --- a/fighters/mariod/src/acmd/aerials.rs +++ b/fighters/mariod/src/acmd/aerials.rs @@ -1,300 +1,296 @@ use super::*; -unsafe extern "C" fn mariod_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 25, 3.0, 0.9, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 25, 3.0, 0.9, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mariod_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_punch_kick_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_s")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark2")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark2")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } - } -unsafe extern "C" fn mariod_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mariod_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("handl"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("handl"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("handl"), 1.0, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("handl"), 1.0, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -20, -113, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -20, -113, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, 20.0); - if is_excute(fighter){ - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent){ + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-6.0)); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 38, 112, 0, 25, 3.7, 5.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 38, 112, 0, 25, 3.7, 5.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(13.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.75, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.75, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(4.5-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 4.5, 3.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(10.0-4.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 54, 85, 0, 25, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 54, 85, 0, 25, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 4.5, 10.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 54, 85, 0, 25, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 54, 85, 0, 25, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10, 0, -4, 80, 96, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10, 0, -4, 80, 96, 0.95, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mariod_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 16.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 16.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 270, 82, 0, 14, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 270, 82, 0, 14, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 270, 58, 0, 12, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 15.0, 361, 82, 0, 14, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 270, 58, 0, 12, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 15.0, 361, 82, 0, 14, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mariod_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.8, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 1.8, 11, 0, 90, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 1.8, 11, 0, 90, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -5, 0, 0, 0, 0, 1.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -5, 0, 0, 0, 0, 1.35, false); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.9, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attackairn", mariod_attack_air_n_game) - .acmd("effect_attackairn", mariod_attack_air_n_effect) - .acmd("sound_attackairn", mariod_attack_air_n_sound) - .acmd("game_attackairf", mariod_attack_air_f_game) - .acmd("effect_attackairf", mariod_attack_air_f_effect) - .acmd("game_attackairb", mariod_attack_air_b_game) - .acmd("effect_attackairb", mariod_attack_air_b_effect) - .acmd("game_attackairhi", mariod_attack_air_hi_game) - .acmd("effect_attackairhi", mariod_attack_air_hi_effect) - .acmd("game_attackairlw", mariod_attack_air_lw_game) - .acmd("effect_attackairlw", mariod_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/mariod/src/acmd/ground.rs b/fighters/mariod/src/acmd/ground.rs index ce9fab2731..25ce4a09ee 100644 --- a/fighters/mariod/src/acmd/ground.rs +++ b/fighters/mariod/src/acmd/ground.rs @@ -1,174 +1,167 @@ use super::*; -unsafe extern "C" fn mariod_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 83, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 83, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 83, 100, 30, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 83, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 83, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 83, 100, 30, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn mariod_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mariod_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 30, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 30, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 30, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 30, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn mariod_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mariod_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.5-2.0)); - } + FT_MOTION_RATE_RANGE(agent, 2.0, 2.5, 1.0); frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.0-2.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 83, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 6.0, 361, 83, 0, 45, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 2.5, 5.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 83, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 6.0, 361, 83, 0, 45, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_13_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"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mariod_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn mariod_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 80, 40, 0, 70, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 80, 40, 0, 70, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 80, 50, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 50, 0, 60, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 80, 50, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 50, 0, 60, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attack11", mariod_attack_11_game) - .acmd("effect_attack11", mariod_attack_11_effect) - .acmd("game_attack12", mariod_attack_12_game) - .acmd("effect_attack12", mariod_attack_12_effect) - .acmd("game_attack13", mariod_attack_13_game) - .acmd("effect_attack13", mariod_attack_13_effect) - .acmd("expression_attack13", mariod_attack_13_expression) - .acmd("game_attackdash", mariod_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mariod/src/acmd/mod.rs b/fighters/mariod/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/mariod/src/acmd/mod.rs +++ b/fighters/mariod/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/mariod/src/acmd/other.rs b/fighters/mariod/src/acmd/other.rs index ad97913fae..3f338e74dd 100644 --- a/fighters/mariod/src/acmd/other.rs +++ b/fighters/mariod/src/acmd/other.rs @@ -1,339 +1,247 @@ - 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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_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(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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_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_mariod_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mariod_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, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_mariod_step_left_m"), Hash40::new("se_mariod_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_mariod_step_left_m"), Hash40::new("se_mariod_step_right_m")); } } -unsafe extern "C" fn mariod_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) { - FT_MOTION_RATE(fighter, 1.375); + FT_MOTION_RATE(agent, 1.375); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F11 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn mariod_drcapsule_regular_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"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); - } -} - -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 mariod_jumpback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } } -unsafe extern "C" fn mariod_jumpfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } } -unsafe extern "C" fn mariod_jumpbackmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpbackmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_attack05")); } } -unsafe extern "C" fn mariod_jumpfrontmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfrontmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_attack05")); } } -unsafe extern "C" fn mariod_jumpaerialback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_007")); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn mariod_jumpaerialfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpaerialfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_007")); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn mariod_cliffjump2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_cliffjump2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } } -unsafe extern "C" fn mariod_passivewalljump_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_009")); +unsafe extern "C" fn sound_passivewalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_009")); } } -unsafe extern "C" fn mariod_shootlegsjumpsquat_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_shootlegsjumpsquat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } } -pub fn install() { - smashline::Agent::new("mariod") - .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", mariod_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_jumpback", mariod_jumpback_sound) - .acmd("sound_jumpfront", mariod_jumpfront_sound) - .acmd("sound_jumpbackmini", mariod_jumpbackmini_sound) - .acmd("sound_jumpfrontmini", mariod_jumpfrontmini_sound) - .acmd("sound_jumpaerialback", mariod_jumpaerialback_sound) - .acmd("sound_jumpaerialfront", mariod_jumpaerialfront_sound) - .acmd("sound_cliffjump2", mariod_cliffjump2_sound) - .acmd("sound_passivewalljump", mariod_passivewalljump_sound) - .acmd("sound_shootlegsjumpsquat", mariod_shootlegsjumpsquat_sound) - .install(); - smashline::Agent::new("mariod_drcapsule") - .acmd("game_regular", mariod_drcapsule_regular_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_jumpback", sound_jumpback); + agent.acmd("sound_jumpfront", sound_jumpfront); + agent.acmd("sound_jumpbackmini", sound_jumpbackmini); + agent.acmd("sound_jumpfrontmini", sound_jumpfrontmini); + agent.acmd("sound_jumpaerialback", sound_jumpaerialback); + agent.acmd("sound_jumpaerialfront", sound_jumpaerialfront); + agent.acmd("sound_cliffjump2", sound_cliffjump2); + agent.acmd("sound_passivewalljump", sound_passivewalljump); + agent.acmd("sound_shootlegsjumpsquat", sound_shootlegsjumpsquat); } diff --git a/fighters/mariod/src/acmd/smashes.rs b/fighters/mariod/src/acmd/smashes.rs index 736ca3fa45..611a8ba867 100644 --- a/fighters/mariod/src/acmd/smashes.rs +++ b/fighters/mariod/src/acmd/smashes.rs @@ -1,339 +1,333 @@ use super::*; -unsafe extern "C" fn mariod_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.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, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.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, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 5, 11.5, 30, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 5, 11.5, 30, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 18, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 18, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 4.5, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 4.5, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.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, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 9.0; let attack_end_frame = 14.0; let attack_duration = 3.0; let motion_rate = attack_duration/(attack_end_frame-attack_start_frame); let late_hit_frame = attack_start_frame + 2.0/motion_rate; frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, motion_rate); + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, late_hit_frame); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 15.0, 259, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 15.0, 259, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("head"), 15.0, 76, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 15.0, 76, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 15.0, 259, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 15.0, 259, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 15.0, 76, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("bust"), 15.0, 76, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, attack_end_frame + 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn mariod_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } - } -unsafe extern "C" fn mariod_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 75, 0, 45, 4.5, 0.0, 3.6, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 75, 0, 45, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 75, 0, 45, 4.5, 0.0, 3.6, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 75, 0, 45, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 38, 75, 0, 40, 4.5, 0.0, 3.6, -11.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 38, 75, 0, 40, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 38, 75, 0, 40, 4.5, 0.0, 3.6, -11.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 38, 75, 0, 40, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toel"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toel"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, 2, 0, -10, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, 2, 0, -10, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, 12.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, 12.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, -2, 0, 180, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, -2, 0, 180, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, -11.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, -11.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attacks4hi", mariod_attack_s4_hi_game) - .acmd("effect_attacks4hi", mariod_attack_s4_hi_effect) - .acmd("game_attacks4", mariod_attack_s4_s_game) - .acmd("effect_attacks4", mariod_attack_s4_s_effect) - .acmd("game_attacks4lw", mariod_attack_s4_lw_game) - .acmd("effect_attacks4lw", mariod_attack_s4_lw_effect) - .acmd("game_attackhi4", mariod_attack_hi4_game) - .acmd("effect_attackhi4", mariod_attack_hi4_effect) - .acmd("game_attacklw4", mariod_attack_lw4_game) - .acmd("effect_attacklw4", mariod_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/mariod/src/acmd/specials.rs b/fighters/mariod/src/acmd/specials.rs index 0c8a100886..c551f05ec7 100644 --- a/fighters/mariod/src/acmd/specials.rs +++ b/fighters/mariod/src/acmd/specials.rs @@ -1,120 +1,120 @@ use super::*; -unsafe extern "C" fn mariod_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 15.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); } } -unsafe extern "C" fn mariod_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn mariod_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mariod_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); } } -unsafe extern "C" fn mariod_special_n_chill_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 43.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_n_chill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.25, 1, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + FLASH(agent, 0.5, 0.25, 1, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - 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_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn mariod_special_n_chill_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_frieze_l")); - PLAY_SE(fighter, Hash40::new("vc_mariod_012")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_frieze_l")); + PLAY_SE(agent, Hash40::new("vc_mariod_012")); } } -unsafe extern "C" fn mariod_special_n_chill_expression(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_specialnchill(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); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mariod_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -122,76 +122,75 @@ unsafe extern "C" fn mariod_special_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIOD_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.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); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 46.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 46.0, 13.0); + if is_excute(agent) { let motion_rate = 13.0/(46.0-23.0); ArticleModule::set_rate(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, 1.0/motion_rate); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.2); if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -199,452 +198,447 @@ unsafe extern "C" fn mariod_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIOD_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - VarModule::on_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); + VarModule::on_flag(agent.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.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); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 46.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 46.0, 13.0); + if is_excute(agent) { let motion_rate = 13.0/(46.0-23.0); ArticleModule::set_rate(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, 1.0/motion_rate); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_air_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_supermant_wind_r"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_supermant_wind_l"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_supermant_wind_r"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_supermant_wind_l"), -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - VarModule::off_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); + VarModule::off_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 70, 100, 125, 0, 5.0, 0.0, 6.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 70, 100, 125, 0, 5.0, 0.0, 6.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if boma.is_stick_backward() { - VarModule::on_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); + VarModule::on_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); } else { - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } -unsafe extern "C" fn mariod_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_superjump_fnish"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_impact"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_impact"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_aura"), -1); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_superjump_power"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_superjump_power"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); } } -unsafe extern "C" fn mariod_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } -unsafe extern "C" fn mariod_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_superjump_fnish"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_impact"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_impact"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_aura"), -1); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_superjump_power"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_superjump_power"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); } } -unsafe extern "C" fn mariod_landing_fall_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if VarModule::is_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 29.0, 24.0); + if VarModule::is_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL) { + FT_MOTION_RATE_RANGE(agent, 1.0, 29.0, 24.0); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - } + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, 1, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, 1, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_l"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_l"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_cyclone_impact"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_cyclone_impact"), -1); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 41.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -unsafe extern "C" fn mariod_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); WorkModule::on_flag(boma, *FIGHTER_MARIOD_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_BUOYANCY); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, -1.5, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, -1.5, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_l"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_l"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_cyclone_impact"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_cyclone_impact"), -1); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } - } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_specialn", mariod_special_n_game) - .acmd("game_specialairn", mariod_special_n_game) - .acmd("effect_specialn", mariod_special_n_effect) - .acmd("effect_specialairn", mariod_special_n_effect) - .acmd("sound_specialn", mariod_special_n_sound) - .acmd("sound_specialairn", mariod_special_n_sound) - .acmd("game_specialnchill", mariod_special_n_chill_game) - .acmd("game_specialairnchill", mariod_special_n_chill_game) - .acmd("effect_specialnchill", mariod_special_n_chill_effect) - .acmd("effect_specialairnchill", mariod_special_n_chill_effect) - .acmd("sound_specialnchill", mariod_special_n_chill_sound) - .acmd("sound_specialairnchill", mariod_special_n_chill_sound) - .acmd( - "expression_specialnchill", - mariod_special_n_chill_expression, - ) - .acmd( - "expression_specialairnchill", - mariod_special_n_chill_expression, - ) - .acmd("game_specials", mariod_special_s_game) - .acmd("effect_specials", mariod_special_s_effect) - .acmd("game_specialairs", mariod_special_air_s_game) - .acmd("effect_specialairs", mariod_special_air_s_effect) - .acmd("game_specialhi", mariod_special_hi_game) - .acmd("effect_specialhi", mariod_special_hi_effect) - .acmd("game_specialairhi", mariod_special_air_hi_game) - .acmd("effect_specialairhi", mariod_special_air_hi_effect) - .acmd("game_landingfallspecial", mariod_landing_fall_special_game) - .acmd("game_speciallw", mariod_special_lw_game) - .acmd("effect_speciallw", mariod_special_lw_effect) - .acmd("game_specialairlw", mariod_special_air_lw_game) - .acmd("effect_specialairlw", mariod_special_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + + agent.acmd("game_specialnchill", game_specialnchill); + agent.acmd("game_specialairnchill", game_specialnchill); + agent.acmd("effect_specialnchill", effect_specialnchill); + agent.acmd("effect_specialairnchill", effect_specialnchill); + agent.acmd("sound_specialnchill", sound_specialnchill); + agent.acmd("sound_specialairnchill", sound_specialnchill); + agent.acmd("expression_specialnchill", expression_specialnchill); + agent.acmd("expression_specialairnchill", expression_specialnchill); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + + agent.acmd("game_landingfallspecial", game_landingfallspecial); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/mariod/src/acmd/throws.rs b/fighters/mariod/src/acmd/throws.rs index b7b3df262d..b1ef2233e5 100644 --- a/fighters/mariod/src/acmd/throws.rs +++ b/fighters/mariod/src/acmd/throws.rs @@ -1,165 +1,164 @@ use super::*; -unsafe extern "C" fn mariod_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mariod_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mariod_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mariod_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 48, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 48, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 2); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.0); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: 0.0, z: 0.0}); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mariod_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 74, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 74, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 6); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn mariod_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 8); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mariod_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 42, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 42, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2.0, 0.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_catch", mariod_catch_game) - .acmd("game_catchdash", mariod_catch_dash_game) - .acmd("game_catchturn", mariod_catch_turn_game) - .acmd("game_throwf", mariod_throw_f_game) - .acmd("game_throwb", mariod_throw_b_game) - .acmd("game_throwhi", mariod_throw_hi_game) - .acmd("game_throwlw", mariod_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mariod/src/acmd/tilts.rs b/fighters/mariod/src/acmd/tilts.rs index 866afa52a6..b3f7e01e81 100644 --- a/fighters/mariod/src/acmd/tilts.rs +++ b/fighters/mariod/src/acmd/tilts.rs @@ -1,156 +1,151 @@ use super::*; -unsafe extern "C" fn mariod_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 120, 70, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 120, 70, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mariod_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 3, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 4, -1, 12, -172, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 3, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 4, -1, 12, -172, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), false, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attacks3hi", mariod_attack_s3_hi_game) - .acmd("effect_attacks3hi", mariod_attack_s3_hi_effect) - .acmd("game_attacks3", mariod_attack_s3_s_game) - .acmd("effect_attacks3", mariod_attack_s3_s_effect) - .acmd("game_attacks3lw", mariod_attack_s3_lw_game) - .acmd("effect_attacks3lw", mariod_attack_s3_lw_effect) - .acmd("game_attackhi3", mariod_attack_hi3_game) - .acmd("game_attacklw3", mariod_attack_lw3_game) - .acmd("effect_attacklw3", mariod_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/mariod/src/drcapsule/acmd.rs b/fighters/mariod/src/drcapsule/acmd.rs new file mode 100644 index 0000000000..815416326a --- /dev/null +++ b/fighters/mariod/src/drcapsule/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} \ No newline at end of file diff --git a/fighters/mariod/src/drcapsule/mod.rs b/fighters/mariod/src/drcapsule/mod.rs new file mode 100644 index 0000000000..e751d60238 --- /dev/null +++ b/fighters/mariod/src/drcapsule/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mariod_drcapsule"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mariod/src/lib.rs b/fighters/mariod/src/lib.rs index 8e2ddcc726..fc14fb8aae 100644 --- a/fighters/mariod/src/lib.rs +++ b/fighters/mariod/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod drcapsule; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("mariod"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + drcapsule::install(); } diff --git a/fighters/mariod/src/opff.rs b/fighters/mariod/src/opff.rs index 49cc049bf3..a0d2804704 100644 --- a/fighters/mariod/src/opff.rs +++ b/fighters/mariod/src/opff.rs @@ -70,8 +70,6 @@ pub unsafe fn mariod_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("mariod") - .on_line(Main, mariod_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mariod_frame_wrapper); } diff --git a/fighters/mariod/src/status.rs b/fighters/mariod/src/status.rs deleted file mode 100644 index 57e85664fe..0000000000 --- a/fighters/mariod/src/status.rs +++ /dev/null @@ -1,40 +0,0 @@ -use super::*; -use globals::*; - -mod special_n; - -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // Reset cape stall flag on landing or ledgegrab - if [*SITUATION_KIND_GROUND, *SITUATION_KIND_CLIFF].contains(&fighter.global_table[SITUATION_KIND].get_i32()) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD]) { - VarModule::off_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); - } - true.into() -} - -extern "C" fn mariod_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_MARIOD { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn mariod_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() -} - -pub fn install() { - special_n::install(); - smashline::Agent::new("mariod") - .on_start(mariod_init) - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, mariod_rebirth_end) - .install(); - - // Pill Fix for respawn platform - let _ = skyline::patching::Patch::in_text(0xcc9e34).data(0x14000047u32); -} diff --git a/fighters/mariod/src/status/mod.rs b/fighters/mariod/src/status/mod.rs new file mode 100644 index 0000000000..0ad612ba3d --- /dev/null +++ b/fighters/mariod/src/status/mod.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod rebirth; + +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + // Reset cape stall flag on landing or ledgegrab + if [*SITUATION_KIND_GROUND, *SITUATION_KIND_CLIFF].contains(&fighter.global_table[SITUATION_KIND].get_i32()) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD]) { + VarModule::off_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + rebirth::install(agent); +} diff --git a/fighters/mariod/src/status/rebirth.rs b/fighters/mariod/src/status/rebirth.rs new file mode 100644 index 0000000000..8a18d77d1c --- /dev/null +++ b/fighters/mariod/src/status/rebirth.rs @@ -0,0 +1,18 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); + + // Pill Fix for respawn platform + let _ = skyline::patching::Patch::in_text(0xcc9e34).data(0x14000047u32); +} diff --git a/fighters/mariod/src/status/special_n.rs b/fighters/mariod/src/status/special_n.rs index 3ccc41f6a6..49a2eeeb81 100644 --- a/fighters/mariod/src/status/special_n.rs +++ b/fighters/mariod/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -56,8 +57,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("mariod") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } diff --git a/fighters/marth/src/acmd/aerials.rs b/fighters/marth/src/acmd/aerials.rs index d6b29ba797..96c57f8f86 100644 --- a/fighters/marth/src/acmd/aerials.rs +++ b/fighters/marth/src/acmd/aerials.rs @@ -1,229 +1,224 @@ - use super::*; -unsafe extern "C" fn marth_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air-only hitboxes - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 40, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.1); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 0.1); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 40, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.1); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 0.1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 1.2, -1.1, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 0.8, -1.1, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 10.0, 361, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 1.2, -1.1, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 0.8, -1.1, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("hip"), 10.0, 361, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); // f5 ingame - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 67, 70, 0, 45, 4.0, 0.0, 0.0, 8.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 67, 70, 0, 45, 4.0, 0.0, 0.0, 8.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); // f9 ingame - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_DESIRED_RATE(fighter, (44.0 - 24.0), 10.0); + FT_DESIRED_RATE(agent, (44.0 - 24.0), 10.0); frame(lua_state, 42.0); // f32 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 25, 4.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 10, 4.0, -1.0, 0.0, -1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 100, 0, 40, 4.5, 0.0, 0.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 25, 4.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 10, 4.0, -1.0, 0.0, -1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 100, 0, 40, 4.5, 0.0, 0.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 23.0); // f31 ingame - FT_DESIRED_RATE(fighter, (39.0 - 23.0), 10.0); + FT_DESIRED_RATE(agent, (39.0 - 23.0), 10.0); frame(lua_state, 23.625); // f32 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 90, 70, 0, 45, 4.0, 0.0, 0.0, 7.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 30, 4.0, 0.0, 0.0, 3.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 80, 70, 0, 20, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("claviclel"), 9.0, 80, 70, 0, 18, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 90, 70, 0, 45, 4.0, 0.0, 0.0, 7.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 30, 4.0, 0.0, 0.0, 3.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 80, 70, 0, 20, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("claviclel"), 9.0, 80, 70, 0, 18, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn marth_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 40, 3.5, 0.0, 0.0, 3.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 9.0, 361, 70, 0, 20, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 40, 3.5, 0.0, 0.0, 3.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 9.0, 361, 70, 0, 20, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 290, 65, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 290, 65, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 13.0, 290, 46, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 13.0, 290, 46, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } - } -unsafe extern "C" fn marth_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 0.0, Hash40::new("sword1"), 0.0, 0.0, 12.0, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), -0.1, 0.0, 0.0, -11.0, 0.0, 1.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.39999998, 0.200000003); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 0.0, Hash40::new("sword1"), 0.0, 0.0, 12.0, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), -0.1, 0.0, 0.0, -11.0, 0.0, 1.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.39999998, 0.200000003); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6.0); } - } -unsafe extern "C" fn marth_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attackairn", marth_attack_air_n_game) - .acmd("game_attackairf", marth_attack_air_f_game) - .acmd("game_attackairb", marth_attack_air_b_game) - .acmd("game_attackairhi", marth_attack_air_hi_game) - .acmd("effect_attackairhi", marth_attack_air_hi_effect) - .acmd("game_attackairlw", marth_attack_air_lw_game) - .acmd("effect_attackairlw", marth_attack_air_lw_effect) - .acmd("expression_attackairlw", marth_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/marth/src/acmd/ground.rs b/fighters/marth/src/acmd/ground.rs index d710398953..f28e331a68 100644 --- a/fighters/marth/src/acmd/ground.rs +++ b/fighters/marth/src/acmd/ground.rs @@ -1,98 +1,93 @@ - use super::*; -unsafe extern "C" fn marth_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 78, 30, 0, 55, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 65, 30, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 65, 30, 0, 55, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 5.0, 90, 30, 0, 55, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 78, 30, 0, 55, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 65, 30, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 65, 30, 0, 55, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 5.0, 90, 30, 0, 55, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("armr"), 3.0, 361, 20, 0, 20, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 5.0, 180, 20, 0, 20, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("armr"), 3.0, 361, 20, 0, 20, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 5.0, 180, 20, 0, 20, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn marth_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn marth_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 45, 75, 0, 62, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 6.0, 45, 75, 0, 62, 4.0, 2.5, -1.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 45, 75, 0, 62, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 6.0, 45, 75, 0, 62, 4.0, 2.5, -1.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 7.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 7.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 7.5, Some(12.0), Some(1.5), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 7.5, Some(12.0), Some(1.5), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attack11", marth_attack_11_game) - .acmd("expression_attack11", marth_attack_11_expression) - .acmd("game_attack12", marth_attack_12_game) - .acmd("game_attackdash", marth_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/marth/src/acmd/mod.rs b/fighters/marth/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/marth/src/acmd/mod.rs +++ b/fighters/marth/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/marth/src/acmd/other.rs b/fighters/marth/src/acmd/other.rs index 111001acbd..01fdd4d978 100644 --- a/fighters/marth/src/acmd/other.rs +++ b/fighters/marth/src/acmd/other.rs @@ -1,199 +1,121 @@ - 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_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_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(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_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_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_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); } } -unsafe extern "C" fn marth_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.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 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_marth_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_marth_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_marth_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_marth_step_right_l")); } } -unsafe extern "C" fn marth_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, 16.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("marth") - .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("game_dash", marth_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", marth_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_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/marth/src/acmd/smashes.rs b/fighters/marth/src/acmd/smashes.rs index 1683592ccc..156e069282 100644 --- a/fighters/marth/src/acmd/smashes.rs +++ b/fighters/marth/src/acmd/smashes.rs @@ -1,360 +1,132 @@ - use super::*; -unsafe extern "C" fn marth_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 5.0 / (9.75 - 4.0)); + FT_MOTION_RATE(agent, 5.0 / (9.75 - 4.0)); frame(lua_state, 9.75); - FT_MOTION_RATE(fighter, 1.0 / (10.25 - 9.75)); + FT_MOTION_RATE(agent, 1.0 / (10.25 - 9.75)); frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0 / (11.0 - 10.25)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 2.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 38, 72, 0, 52, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 20.0, 361, 81, 0, 65, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0 / (11.0 - 10.25)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 2.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 38, 72, 0, 52, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("bust"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 20.0, 361, 81, 0, 65, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - FT_DESIRED_RATE(fighter, (26.0 - 13.0), 22.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (26.0 - 13.0), 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); // f36 ingame - FT_DESIRED_RATE(fighter, (49.0 - 26.0), 13.0); - + FT_DESIRED_RATE(agent, (49.0 - 26.0), 13.0); } -unsafe extern "C" fn marth_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.25); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 6, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 6, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 11, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 11, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn marth_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 89, 85, 0, 40, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 89, 80, 0, 60, 4.6, 0.0, 0.0, 8.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 90, 85, 0, 40, 5.8, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 125, 100, 155, 0, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(-5.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 89, 85, 0, 40, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 89, 80, 0, 60, 4.6, 0.0, 0.0, 8.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 90, 85, 0, 40, 5.8, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 125, 100, 155, 0, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(-5.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_PUNCH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 75, 93, 0, 60, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 80, 93, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 75, 93, 0, 60, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 80, 93, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 75, 93, 0, 40, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 16.0, 80, 89, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 75, 93, 0, 40, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 16.0, 80, 89, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_DESIRED_RATE(fighter, (70.0 - 43.0), 23.0); - -} - -unsafe extern "C" fn marth_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - + FT_DESIRED_RATE(agent, (70.0 - 43.0), 23.0); } -unsafe extern "C" fn marth_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); -unsafe extern "C" fn marth_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} + agent.acmd("game_attackhi4", game_attackhi4); -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attacks4", marth_attack_s4_s_game) - .acmd("effect_attacks4", marth_attack_s4_s_effect) - .acmd("game_attackhi4", marth_attack_hi4_game) - .acmd("game_attacklw4", marth_attack_lw4_game) - .acmd("effect_specials4hi", marth_special_s4_hi_effect) - .acmd("effect_specialairs4hi", marth_special_air_s4_hi_effect) - .acmd("effect_specials4s", marth_special_s4_s_effect) - .acmd("effect_specialairs4s", marth_special_air_s4_s_effect) - .acmd("effect_specials4lw", marth_special_s4_lw_effect) - .acmd("effect_specialairs4lw", marth_special_air_s4_lw_effect) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/marth/src/acmd/specials.rs b/fighters/marth/src/acmd/specials.rs deleted file mode 100644 index 8bbe880130..0000000000 --- a/fighters/marth/src/acmd/specials.rs +++ /dev/null @@ -1,810 +0,0 @@ - -use super::*; - -unsafe extern "C" fn marth_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 9.0, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn marth_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_air_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_air_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_air_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_air_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_air_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn marth_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.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("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - -} - -unsafe extern "C" fn marth_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } -} - -unsafe extern "C" fn marth_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - AttackModule::set_force_reaction(boma, 3, true, false); - if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); - } - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn marth_special_air_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - AttackModule::set_force_reaction(boma, 3, true, false); - if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); - } - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_specials1", marth_special_s1_game) - .acmd("expression_specials1", marth_special_s1_expression) - .acmd("game_specialairs1", marth_special_air_s1_game) - .acmd("game_specials2hi", marth_special_s2_hi_game) - .acmd("game_specialairs2hi", marth_special_air_s2_hi_game) - .acmd("game_specialairs2lw", marth_special_s2_lw_game) - .acmd("game_specialairs2lw", marth_special_air_s2_lw_game) - .acmd("game_specials3hi", marth_special_s3_hi_game) - .acmd("game_specialairs3hi", marth_special_air_s3_hi_game) - .acmd("game_specials3s", marth_special_s3_s_game) - .acmd("game_specialairs3s", marth_special_air_s3_s_game) - .acmd("game_specials3lw", marth_special_s3_lw_game) - .acmd("game_specialairs3lw", marth_special_air_s3_lw_game) - .acmd("effect_specials1", marth_special_s1_effect) - .acmd("effect_specialairs1", marth_special_air_s1_effect) - .acmd("effect_specials2hi", marth_special_s2_hi_effect) - .acmd("effect_specialairs2hi", marth_special_air_s2_hi_effect) - .acmd("effect_specials2lw", marth_special_s2_lw_effect) - .acmd("effect_specialairs2lw", marth_special_air_s2_lw_effect) - .acmd("effect_specials3hi", marth_special_s3_hi_effect) - .acmd("effect_specialairs3hi", marth_special_air_s3_hi_effect) - .acmd("effect_specials3s", marth_special_s3_s_effect) - .acmd("effect_specialairs3s", marth_special_air_s3_s_effect) - .acmd("effect_specials3lw", marth_special_s3_lw_effect) - .acmd("effect_specialairs3lw", marth_special_air_s3_lw_effect) - .acmd("game_specialhi", marth_special_hi_game) - .acmd("game_specialairhi", marth_special_air_hi_game) - .acmd("game_speciallwhit", marth_special_lw_hit_game) - .acmd("game_specialairlwhit", marth_special_air_lw_hit_game) - .install(); -} diff --git a/fighters/marth/src/acmd/specials/mod.rs b/fighters/marth/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..d410a02dff --- /dev/null +++ b/fighters/marth/src/acmd/specials/mod.rs @@ -0,0 +1,177 @@ +use super::*; + +mod special_s2; +mod special_s3; +mod special_s4; + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 9.0, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 31.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + AttackModule::set_force_reaction(boma, 3, true, false); + if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { + AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); + } + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("expression_specials1", expression_specials1); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/marth/src/acmd/specials/special_s2.rs b/fighters/marth/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..c4529bff4c --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s2.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); +} diff --git a/fighters/marth/src/acmd/specials/special_s3.rs b/fighters/marth/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..4fb327855d --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s3.rs @@ -0,0 +1,171 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); +} diff --git a/fighters/marth/src/acmd/specials/special_s4.rs b/fighters/marth/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..022075ec5e --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s4.rs @@ -0,0 +1,118 @@ +use super::*; + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), 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(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); +} diff --git a/fighters/marth/src/acmd/throws.rs b/fighters/marth/src/acmd/throws.rs index e655083cdd..f829b47f3c 100644 --- a/fighters/marth/src/acmd/throws.rs +++ b/fighters/marth/src/acmd/throws.rs @@ -1,133 +1,127 @@ - use super::*; -unsafe extern "C" fn marth_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 marth_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 marth_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 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(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 2); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:1.0, y: -3.0, z: 14.75 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 117, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 117, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -6, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -6, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 130, 50, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 130, 50, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_catch", marth_catch_game) - .acmd("game_catchdash", marth_catch_dash_game) - .acmd("game_catchturn", marth_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/marth/src/acmd/tilts.rs b/fighters/marth/src/acmd/tilts.rs index c967754622..e4fbcd819a 100644 --- a/fighters/marth/src/acmd/tilts.rs +++ b/fighters/marth/src/acmd/tilts.rs @@ -1,97 +1,94 @@ - use super::*; -unsafe extern "C" fn marth_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(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) { } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 75, 0, 40, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.5, 361, 80, 0, 70, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 75, 0, 40, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.5, 361, 80, 0, 70, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/5.75); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/5.75); } frame(lua_state, 5.75); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 110, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 110, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 110, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 110, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(13.0 - 6.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(13.0 - 6.5)); } frame(lua_state,8.75); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 85, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 80, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 85, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 80, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 5.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn marth_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn marth_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 25, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 30, 40, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 30, 40, 0, 50, 4.0, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 25, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 30, 40, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 30, 40, 0, 50, 4.0, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attacks3", marth_attack_s3_s_game) - .acmd("game_attackhi3", marth_attack_hi3_game) - .acmd("expression_attackhi3", marth_attack_hi3_expression) - .acmd("game_attacklw3", marth_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/marth/src/lib.rs b/fighters/marth/src/lib.rs index 7bb0378152..82a713fd63 100644 --- a/fighters/marth/src/lib.rs +++ b/fighters/marth/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("marth"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/marth/src/opff.rs b/fighters/marth/src/opff.rs index 7336b68310..4ed9a8c16e 100644 --- a/fighters/marth/src/opff.rs +++ b/fighters/marth/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - pub unsafe fn dancing_blade_vertical_momentum(boma: &mut BattleObjectModuleAccessor){ let fighter_gravity = KineticModule::get_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2]) && boma.is_situation(*SITUATION_KIND_AIR) { @@ -122,8 +121,6 @@ pub unsafe fn marth_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("marth") - .on_line(Main, marth_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, marth_frame_wrapper); } diff --git a/fighters/marth/src/status/mod.rs b/fighters/marth/src/status/mod.rs new file mode 100644 index 0000000000..c0cec6331e --- /dev/null +++ b/fighters/marth/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); +} diff --git a/fighters/marth/src/status.rs b/fighters/marth/src/status/special_s.rs similarity index 95% rename from fighters/marth/src/status.rs rename to fighters/marth/src/status/special_s.rs index 353b900c3d..0a85168a51 100644 --- a/fighters/marth/src/status.rs +++ b/fighters/marth/src/status/special_s.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// status script import - + +// FIGHTER_STATUS_KIND_SPECIAL_S pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { unsafe { @@ -10,7 +9,7 @@ pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGrav } } -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); @@ -85,8 +84,6 @@ pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub fn install() { - smashline::Agent::new("marth") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } diff --git a/fighters/master/src/acmd/aerials.rs b/fighters/master/src/acmd/aerials.rs index 255bfb131c..8e196074c7 100644 --- a/fighters/master/src/acmd/aerials.rs +++ b/fighters/master/src/acmd/aerials.rs @@ -1,290 +1,286 @@ - use super::*; -unsafe extern "C" fn master_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("attack_air_n"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 16.0/(27.0-6.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 1.0/motion_rate); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.5, 94, 100, 45, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.5, 120, 100, 45, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 80, 100, 45, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.5, 94, 100, 45, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.5, 120, 100, 45, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 80, 100, 45, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.5, 365, 100, 40, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.5, 365, 100, 40, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 0.5); AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 10.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 10.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW){ ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("landnig_air_n"), false, 0.0); } } } -unsafe extern "C" fn master_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(11.5-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(11.5-6.0)); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 11.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(12.0-11.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 72, 0, 49, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - //ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.4); - //ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 4, 5, 6, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(12.0-11.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 72, 0, 49, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + //ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.4); + //ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 4, 5, 6, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn master_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 9.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 12.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 15.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 19.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 9.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 12.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 15.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 19.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("attack_air_hi"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); let motion_rate = 10.0/(24.0-10.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 85, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, -6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 85, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, -6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 4, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.0, 0.0, 21.5, 0.0, Some(0.0), Some(18.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.0, 0.0, 21.5, 0.0, Some(0.0), Some(18.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 48.0, 28.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 48.0, 28.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 73.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 master_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("master_atk_air_hi_l"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); + EFFECT_FOLLOW(agent, Hash40::new("master_atk_air_hi_l"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_atk_air_hi_r"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); + EFFECT_FOLLOW(agent, Hash40::new("master_atk_air_hi_r"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); } - LAST_EFFECT_SET_RATE(fighter, 1.37); + LAST_EFFECT_SET_RATE(agent, 1.37); } } -unsafe extern "C" fn master_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("attack_air_lw"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 270, 48, 0, 26, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 270, 48, 0, 26, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 19.0, 270, 78, 0, 97, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 19.0, 270, 78, 0, 97, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attackairn", master_attack_air_n_game) - .acmd("game_landingairn", master_landing_air_n_game) - .acmd("game_attackairf", master_attack_air_f_game) - .acmd("expression_attackairf", master_attack_air_f_expression) - .acmd("game_attackairb", master_attack_air_b_game) - .acmd("game_attackairhi", master_attack_air_hi_game) - .acmd("effect_attackairhi", master_attack_air_hi_effect) - .acmd("game_attackairlw", master_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/master/src/acmd/ground.rs b/fighters/master/src/acmd/ground.rs index 0377e4ee49..bb8ce6a2d2 100644 --- a/fighters/master/src/acmd/ground.rs +++ b/fighters/master/src/acmd/ground.rs @@ -1,140 +1,134 @@ - use super::*; -unsafe extern "C" fn master_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.5, 3.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.5, 3.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn master_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 75, 18, 0, 31, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 4.0, 4.0, 0.0, 0.0, Some(4.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 75, 18, 0, 31, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 4.0, 4.0, 0.0, 0.0, Some(4.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn master_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn master_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(8.6-1.0)); + FT_MOTION_RATE(agent, 7.0/(8.6-1.0)); frame(lua_state, 8.6); - FT_MOTION_RATE(fighter, 4.0/(12.0-8.6)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.5, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.7, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 40, 4.2, 12.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 4.0/(12.0-8.6)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.5, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.7, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 40, 4.2, 12.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); } - } -unsafe extern "C" fn master_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 4, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 4, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 8.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); + if is_excute(agent) { + LANDING_EFFECT(agent, 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, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attack11", master_attack_11_game) - .acmd("game_attack12", master_attack_12_game) - .acmd("game_attack13", master_attack_13_game) - .acmd("game_attackdash", master_attack_dash_game) - .acmd("effect_attackdash", master_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/master/src/acmd/mod.rs b/fighters/master/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/master/src/acmd/mod.rs +++ b/fighters/master/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/master/src/acmd/other.rs b/fighters/master/src/acmd/other.rs index 604f14f7d3..c2d0a2ed77 100644 --- a/fighters/master/src/acmd/other.rs +++ b/fighters/master/src/acmd/other.rs @@ -1,348 +1,121 @@ 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_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(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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_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_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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_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_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_master_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_master_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn master_arrow1_fly_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"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - -} - -unsafe extern "C" fn master_arrow2_search_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"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - AttackModule::disable_tip(boma); - } - -} - -unsafe extern "C" fn master_axe_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - frame(lua_state, 61.0); - if is_excute(fighter) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); - } - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - - } - } - frame(lua_state, 67.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn master_axe_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - frame(lua_state, 61.0); - if is_excute(fighter) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); - } - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else { - // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - - } - } - frame(lua_state, 67.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn master_axe_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - } - - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_edge"), -1); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); - } - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp3"), false, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_aura"), false, true); - } - } -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("master_axe") - .acmd("game_speciallw", master_axe_special_lw_game) - .acmd("game_specialairlw", master_axe_special_air_lw_game) - .acmd("effect_speciallwhit", master_axe_special_lw_hit_effect) - .install(); - smashline::Agent::new("master") - .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("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) - .install(); - smashline::Agent::new("master_arrow1") - .acmd("game_fly", master_arrow1_fly_game) - .install(); - smashline::Agent::new("master_arrow2") - .acmd("game_search", master_arrow2_search_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/master/src/acmd/smashes.rs b/fighters/master/src/acmd/smashes.rs index 3b3057b3d8..7a261c2c21 100644 --- a/fighters/master/src/acmd/smashes.rs +++ b/fighters/master/src/acmd/smashes.rs @@ -1,757 +1,753 @@ - use super::*; -unsafe extern "C" fn master_attack_s4_charge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); } } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 24, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 24, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); } } -unsafe extern "C" fn master_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } 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, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + app::sv_animcmd::execute(lua_state, 14.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new_raw(0x1782d1b9f2), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 25.0); + if is_excute(agent) { + agent.clear_lua_stack(); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 1); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 2); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 4); + } + frame(lua_state, 44.0); + frame(lua_state, 46.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } + } + frame(lua_state, 85.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_REQ_EFFECT_AURA); + } +} + +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } 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, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } 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, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 1, 34, 16, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 1, 34, 16, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - app::sv_animcmd::execute(lua_state, 14.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new_raw(0x1782d1b9f2), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 1); - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 2); - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 4); - } - frame(lua_state, 44.0); - frame(lua_state, 46.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - } - } - frame(lua_state, 85.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_REQ_EFFECT_AURA); - } -} - -unsafe extern "C" fn master_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, Hash40::new("attack_lw4"), false, -1.0); } frame(lua_state, 3.0); app::sv_animcmd::execute(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { let frame = WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, Hash40::new("attack_lw4"), true, 3.0); } } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE,app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("master") - .acmd("effect_attacks4charge", master_attack_s4_charge_effect) - .acmd("game_attacks4hi", master_attack_s4_hi_game) - .acmd("effect_attacks4hi", master_attack_s4_hi_effect) - .acmd("game_attacks4", master_attack_s4_s_game) - .acmd("effect_attacks4", master_attack_s4_s_effect) - .acmd("game_attacks4lw", master_attack_s4_lw_game) - .acmd("effect_attacks4lw", master_attack_s4_lw_effect) - .acmd("expression_attacks4hi", master_attack_s4_expression) - .acmd("expression_attacks4", master_attack_s4_expression) - .acmd("expression_attacks4lw", master_attack_s4_expression) - .acmd("game_attacklw4", master_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("expression_attacks4hi", expression_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("expression_attacks4lw", expression_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/master/src/acmd/specials.rs b/fighters/master/src/acmd/specials.rs index bb8642a16a..a4f08536df 100644 --- a/fighters/master/src/acmd/specials.rs +++ b/fighters/master/src/acmd/specials.rs @@ -1,11 +1,10 @@ - use super::*; -unsafe extern "C" fn master_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -15,273 +14,225 @@ unsafe extern "C" fn master_special_n_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_ENABLE_TURN); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_CAN_SHOOT); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } - } -unsafe extern "C" fn master_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); - if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, false, 0); - if !ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1) { - ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, false, 0); - } - } - frame(lua_state, 20.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_ENABLE_TURN); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - } - frame(lua_state, 45.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_CAN_SHOOT); - } - frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); - } - -} - -unsafe extern "C" fn master_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::shoot_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - FT_MOTION_RATE(fighter, 0.8); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn master_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::shoot_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_s_front_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_F_REQUEST); - FT_MOTION_RATE(fighter, 3.0/(8.0-2.0)); + FT_MOTION_RATE(agent, 3.0/(8.0-2.0)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Trail hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 27.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(10.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(11.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(14.0), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 27.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(10.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(11.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(14.0), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(21.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(18.5), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(21.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(18.5), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_special_s_front_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_aura"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_aura"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("master_spear_scrape_ground"), Hash40::new("top"), -8, 0, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("master_spear_scrape"), Hash40::new("top"), -16, 0, 4, 0, 18, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("master_spear_scrape_ground"), Hash40::new("top"), -8, 0, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("master_spear_scrape"), Hash40::new("top"), -16, 0, 4, 0, 18, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_slash"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.95, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_spear_slash"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.95, true); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_slash_particle_end"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_spear_slash_particle_end"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.75, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_spear_slash_particle"), Hash40::new("top"), 2, 14, 8, 8, -5, 68, 0.65, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_spear_slash_particle"), Hash40::new("top"), 2, 14, 8, 8, -5, 68, 0.65, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 0.8, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_scrape"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_scrape"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_slash_particle"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_slash_particle"), false, true); } - } -unsafe extern "C" fn master_special_s_front_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsfdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_UP_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_DOWN_REQUEST); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 26.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 26.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_special_air_s_front_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 10.0, 5.0, 5.0, 9.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_F_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 5.0, 5.0, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED){ + if !VarModule::is_flag(agent.battle_object, vars::common::instance::SPECIAL_STALL_USED){ let stick_y = ControlModule::get_stick_y(boma); - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + VarModule::on_flag(agent.battle_object, vars::common::instance::SPECIAL_STALL_USED); if stick_y > 0.0{ KineticModule::add_speed(boma, &Vector3f::new(0.0, 1.25 * stick_y, 0.0)); } @@ -289,857 +240,610 @@ unsafe extern "C" fn master_special_air_s_front_game(fighter: &mut L2CAgentBase) } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 19.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 25.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 19.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 25.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 26.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); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn master_special_air_s_front_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsfdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 10.0, 5.0, 5.0, 9.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_UP_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_DOWN_REQUEST); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 5.0, 5.0, 5.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 19.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 25.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 19.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 25.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 26.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); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn master_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.5); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, Hash40::new("special_hi"), false, 0.0); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TURN_CHECK); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 100, 30, 0, 5.3, 0.0, 8.0, 6.9, None, None, None, 1.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 100, 30, 0, 5.3, 0.0, 8.0, 6.9, None, None, None, 1.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 17.0, y: 42.0}, 5, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 17.0, y: 42.0}, 5, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_ENABLE_CATCH); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.3); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.3); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, Hash40::new("special_air_hi_start"), false, -1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TURN_CHECK); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 15.0); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 1.7, 0.0, 30.0, 9.0, Some(0.0), Some(46.0), Some(16.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY, false); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 1.7, 0.0, 30.0, 9.0, Some(0.0), Some(46.0), Some(16.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY, false); GroundModule::select_cliff_hangdata(boma, *FIGHTER_MASTER_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 16.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 16.0, y: 40.0}, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 16.0, y: 41.0}, 2, false); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_ENABLE_CATCH); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_hi_overtake_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); +unsafe extern "C" fn game_specialairhiovertake(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); /* if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } */ - VarModule::on_flag(fighter.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + VarModule::on_flag(agent.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("special_air_hi_overtake"), false, 0.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Hold input throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 2, 10.0, 260, 100, 0, 14, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 2, 10.0, 260, 100, 0, 14, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } else{ // Normal throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.5, 110, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.5, 110, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } // Grab break - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 6.5, 114, 65, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 6.5, 114, 65, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 5.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 5.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TARGET_AIR){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - //ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + //ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } else{ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } else{ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } - } -unsafe extern "C" fn master_special_air_hi_overtake_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhiovertake(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.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 0.0, 0, 0.0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0, 0, 0, 2.2, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 0, 0, 0.0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 0.0, 0, 0.0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0, 0, 0, 2.2, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 0, 0, 0.0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); } else{ - EFFECT(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn master_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); } else{ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); let motion_rate = 5.0/(42.0-14.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } - } frame(lua_state, 34.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { - // VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); - // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // DamageModule::set_damage_mul(boma, 1.25); - // } + if is_excute(agent) { + // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ + // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); + // let motion_rate = 48.0/(42.0-34.0); + // FT_MOTION_RATE(agent, motion_rate); + // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); + // DamageModule::set_damage_mul(boma, 1.25); + // } + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(fighter, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } + } + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + let motion_rate = 5.0/(42.0-34.0); + FT_MOTION_RATE(agent, motion_rate); + ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); } frame(lua_state, 64.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_END_SUPER_ARMOR); ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, true, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 96.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 117.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 118.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); - //COL_PRI(fighter, 200); - //FLASH(fighter, 1.0, 0.115, 0.71, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 1.0, 0.115, 0.71, 0.75); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 0.3); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.3, 0.3); - //COL_PRI(fighter, 200); - //FLASH(fighter, 0.325, 0.157, 0.05, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 0.325, 0.157, 0.05, 0.75); } } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 58.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); } frame(lua_state, 68.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_reverb"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_reverb"), -1); } frame(lua_state, 70.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash"), false, true); - } -} - -unsafe extern "C" fn master_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); - } - else{ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); - let motion_rate = 5.0/(42.0-14.0); - FT_MOTION_RATE(fighter, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - - } - frame(lua_state, 34.0); - if is_excute(fighter) { - // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - // VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); - // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // DamageModule::set_damage_mul(boma, 1.25); - // } - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); - } - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(fighter, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - } - frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0); - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); - } - frame(lua_state, 51.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); - - } - frame(lua_state, 64.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_END_SUPER_ARMOR); - ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, true, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } - frame(lua_state, 65.0); - if is_excute(fighter) { - ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); - - } - frame(lua_state, 96.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); - } - frame(lua_state, 117.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); - } - frame(lua_state, 118.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash"), false, true); } } -unsafe extern "C" fn master_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); - //COL_PRI(fighter, 200); - //FLASH(fighter, 1.0, 0.115, 0.71, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 1.0, 0.115, 0.71, 0.75); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 0.3); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.3, 0.3); - //COL_PRI(fighter, 200); - //FLASH(fighter, 0.325, 0.157, 0.05, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 0.325, 0.157, 0.05, 0.75); } } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 58.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); } frame(lua_state, 68.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_reverb"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_reverb"), -1); } frame(lua_state, 70.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash"), false, true); } } -unsafe extern "C" fn master_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); - // } - // } - // frame(lua_state, 5.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // } - // } - // } - // frame(lua_state, 50.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // let motion_rate = 1.0; - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // else{ - // let motion_rate = 7.0; - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // } - // } - // frame(lua_state, 52.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(fighter, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_level(boma, 0, 5 as u8); - // } - // } - // } - // frame(lua_state, 53.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // } - // } +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_DEGREE_X); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.9); } // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 3.0, true); - // EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash_air_reverb"), true, true); + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 3.0, true); + // EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash_air_reverb"), true, true); // } // else{ - // EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 1, true); - // EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash_air_reverb"), true, true); + // EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 1, true); + // EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash_air_reverb"), true, true); // } // } frame(lua_state, 56.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_rock"), Hash40::new("haver"), 0, 15, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_rock"), Hash40::new("haver"), 0, 15, 1, 0, 0, 0, 1, true); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_rock"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_rock"), -1); } } -unsafe extern "C" fn master_special_air_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); - // } - // } - // frame(lua_state, 5.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // } - // } - // } - // frame(lua_state, 50.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // let motion_rate = 1.0; - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // else{ - // let motion_rate = 7.0; - // FT_MOTION_RATE(fighter, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // } - // } - // frame(lua_state, 52.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(fighter, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_level(boma, 0, 5 as u8); - // } - // } - // } - // frame(lua_state, 53.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // } - // } - frame(lua_state, 54.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); - let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - frame(lua_state, 56.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_DEGREE_X); - } - frame(lua_state, 58.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); - } - frame(lua_state, 78.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); -// #[acmd_script( agent = "master_axe", script = "game_speciallwhit" , category = ACMD_GAME , low_priority)] -// unsafe fn master_axe_special_lw_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// frame(lua_state, 2.0); -// if is_excute(fighter) { -// if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 0 { -// ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// } -// else if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { -// ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// } -// AttackModule::clear(boma, 0, false); -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 3.0); -// if is_excute(fighter) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 4.0); -// if is_excute(fighter) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 5.0); -// if is_excute(fighter) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 6.0); -// if is_excute(fighter) { -// AttackModule::clear_all(boma); -// } -// } + agent.acmd("game_specialsf", game_specialsf); + agent.acmd("effect_specialsf", effect_specialsf); + agent.acmd("game_specialsfdash", game_specialsfdash); + agent.acmd("game_specialairsf", game_specialairsf); + agent.acmd("game_specialairsfdash", game_specialairsfdash); -pub fn install() { - smashline::Agent::new("master") - .acmd("game_specialnstart", master_special_n_start_game) - .acmd("game_specialairnstart", master_special_air_n_start_game) - .acmd("game_specialn", master_special_n_game) - .acmd("game_specialairn", master_special_air_n_game) - .acmd("game_specialsf", master_special_s_front_game) - .acmd("effect_specialsf", master_special_s_front_effect) - .acmd("game_specialsfdash", master_special_s_front_dash_game) - .acmd("game_specialairsf", master_special_air_s_front_game) - .acmd("game_specialairsfdash", master_special_air_s_front_dash_game) - .acmd("game_specialhi", master_special_hi_game) - .acmd("game_specialairhi", master_special_air_hi_game) - .acmd("game_specialairhiovertake", master_special_air_hi_overtake_game) - .acmd("effect_specialairhiovertake", master_special_air_hi_overtake_effect) - .acmd("game_speciallw", master_special_lw_game) - .acmd("effect_speciallw", master_special_lw_effect) - .acmd("game_specialairlw", master_special_air_lw_game) - .acmd("effect_specialairlw", master_special_air_lw_effect) - .acmd("game_speciallwhit", master_special_lw_hit_game) - .acmd("effect_speciallwhit", master_special_lw_hit_effect) - .acmd("game_specialairlwhit", master_special_air_lw_hit_game) - .install(); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhiovertake", game_specialairhiovertake); + agent.acmd("effect_specialairhiovertake", effect_specialairhiovertake); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } \ No newline at end of file diff --git a/fighters/master/src/acmd/throws.rs b/fighters/master/src/acmd/throws.rs index 3faf3bc373..1e9611ce63 100644 --- a/fighters/master/src/acmd/throws.rs +++ b/fighters/master/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn master_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 master_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn master_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -64,144 +63,142 @@ unsafe extern "C" fn master_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_f"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 49, 110, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 49, 110, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 38, 100, 0, 60, 6.5, 0.0, 8.0, 14.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 38, 100, 0, 60, 6.5, 0.0, 8.0, 14.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 15); + CHECK_FINISH_CAMERA(agent, 0, 15); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 6.0/(40.0-25.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 71.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_b"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, -17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, -17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 25, 15); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 25, 15); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 10.0/(54.0-40.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_lw"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 74, 150, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 74, 150, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 48, 100, 0, 60, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 48, 100, 0, 60, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3, 0); + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 5.0/(40.0-25.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_catch", master_catch_game) - .acmd("game_catchdash", master_catch_dash_game) - .acmd("game_catchturn", master_catch_turn_game) - .acmd("game_throwf", master_throw_f_game) - .acmd("game_throwb", master_throw_b_game) - .acmd("game_throwlw", master_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/master/src/acmd/tilts.rs b/fighters/master/src/acmd/tilts.rs index 5c96f206a7..11de707f82 100644 --- a/fighters/master/src/acmd/tilts.rs +++ b/fighters/master/src/acmd/tilts.rs @@ -1,203 +1,198 @@ - use super::*; -unsafe extern "C" fn master_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(8.6-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(8.6-4.0)); } frame(lua_state, 8.6); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(12.25-8.6)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 5.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 9.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(12.25-8.6)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 5.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 9.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 12.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 12.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.25); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.0-12.25)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.25)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); - FT_MOTION_RATE(fighter, 28.0/(44.0-13.0)); + FT_MOTION_RATE(agent, 28.0/(44.0-13.0)); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn master_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 5, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 5, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -unsafe extern "C" fn master_attack_s3_s_expression(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_attacks3(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); } frame(lua_state, 6.6); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.6); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn master_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(7.5-3.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(7.5-3.0)); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.5)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(15.8-8.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 113, 81, 0, 73, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 113, 81, 0, 73, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 108, 81, 0, 81, 4.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(15.8-8.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 113, 81, 0, 73, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 113, 81, 0, 73, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 108, 81, 0, 81, 4.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.8); - FT_MOTION_RATE(fighter, 2.0/(16.5-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0/(16.5-15.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn master_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 7.5); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 17.5, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 17.5, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -unsafe extern "C" fn master_attack_hi3_expression(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_attackhi3(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn master_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("attack_lw3"), false, 0.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 70, 79, 0, 58, 3.0, 0.0, 2.8, 4.0, Some(0.0), Some(2.8), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 96, 69, 0, 69, 3.0, 0.0, 2.8, 16.0, Some(0.0), Some(2.8), Some(25.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 70, 79, 0, 58, 3.0, 0.0, 2.8, 4.0, Some(0.0), Some(2.8), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 96, 69, 0, 69, 3.0, 0.0, 2.8, 16.0, Some(0.0), Some(2.8), Some(25.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attacks3", master_attack_s3_s_game) - .acmd("effect_attacks3", master_attack_s3_s_effect) - .acmd("expression_attacks3", master_attack_s3_s_expression) - .acmd("game_attackhi3", master_attack_hi3_game) - .acmd("effect_attackhi3", master_attack_hi3_effect) - .acmd("expression_attackhi3", master_attack_hi3_expression) - .acmd("game_attacklw3", master_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/master/src/arrow1/acmd.rs b/fighters/master/src/arrow1/acmd.rs new file mode 100644 index 0000000000..f15cdbb563 --- /dev/null +++ b/fighters/master/src/arrow1/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/master/src/arrow1/mod.rs b/fighters/master/src/arrow1/mod.rs new file mode 100644 index 0000000000..7bafead31e --- /dev/null +++ b/fighters/master/src/arrow1/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_arrow1"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/arrow2/acmd.rs b/fighters/master/src/arrow2/acmd.rs new file mode 100644 index 0000000000..1e78cdae75 --- /dev/null +++ b/fighters/master/src/arrow2/acmd.rs @@ -0,0 +1,16 @@ +use super::*; + +unsafe extern "C" fn game_search(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + AttackModule::disable_tip(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_search", game_search); +} diff --git a/fighters/master/src/arrow2/mod.rs b/fighters/master/src/arrow2/mod.rs new file mode 100644 index 0000000000..051faccffe --- /dev/null +++ b/fighters/master/src/arrow2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_arrow2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/axe/acmd.rs b/fighters/master/src/axe/acmd.rs new file mode 100644 index 0000000000..9a6e910f2a --- /dev/null +++ b/fighters/master/src/axe/acmd.rs @@ -0,0 +1,86 @@ +use super::*; + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + frame(lua_state, 61.0); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); + } + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { + ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + } + else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + } + else { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + + } + } + frame(lua_state, 67.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_edge"), -1); + } + frame(lua_state, 16.0); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp3"), false, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_aura"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallwhit", effect_speciallwhit); +} diff --git a/fighters/master/src/axe/mod.rs b/fighters/master/src/axe/mod.rs new file mode 100644 index 0000000000..40822283d8 --- /dev/null +++ b/fighters/master/src/axe/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_axe"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/lib.rs b/fighters/master/src/lib.rs index 5537dac979..0bb112490d 100644 --- a/fighters/master/src/lib.rs +++ b/fighters/master/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod axe; +mod arrow1; +mod arrow2; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("master"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + axe::install(); + arrow1::install(); + arrow2::install(); } \ No newline at end of file diff --git a/fighters/master/src/opff.rs b/fighters/master/src/opff.rs index 043f2f8ee4..f1eb0fc215 100644 --- a/fighters/master/src/opff.rs +++ b/fighters/master/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn areadbhar_autocancel(boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -129,8 +128,6 @@ pub unsafe fn master_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("master") - .on_line(Main, master_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, master_frame_wrapper); } \ No newline at end of file diff --git a/fighters/master/src/status/mod.rs b/fighters/master/src/status/mod.rs new file mode 100644 index 0000000000..48aaa3bbdf --- /dev/null +++ b/fighters/master/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod rebirth; + +pub fn install(agent: &mut Agent) { + rebirth::install(agent); +} diff --git a/fighters/master/src/status.rs b/fighters/master/src/status/rebirth.rs similarity index 55% rename from fighters/master/src/status.rs rename to fighters/master/src/status/rebirth.rs index 50f753f3bb..62f08dd3ce 100644 --- a/fighters/master/src/status.rs +++ b/fighters/master/src/status/rebirth.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn master_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -9,8 +10,6 @@ unsafe extern "C" fn master_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("master") - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, master_rebirth_end) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/aerials.rs b/fighters/metaknight/src/acmd/aerials.rs index b655b6ff69..3297998682 100644 --- a/fighters/metaknight/src/acmd/aerials.rs +++ b/fighters/metaknight/src/acmd/aerials.rs @@ -1,40 +1,38 @@ - use super::*; -unsafe extern "C" fn metaknight_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 7.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 7.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 361, 100, 0, 30, 6.5, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 361, 100, 0, 30, 6.5, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn metaknight_attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -54,239 +52,241 @@ unsafe extern "C" fn metaknight_attack_air_n_expression(agent: &mut L2CAgentBase } } -unsafe extern "C" fn metaknight_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // AIR - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // GROUND - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 4.0, 11.5, Some(0.0), Some(6.0), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 4.0, 11.5, Some(0.0), Some(6.0), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn metaknight_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 4, 0, 90, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 4, 0, 90, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 0, 90, 0, 180, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 0, 90, 0, 180, 0.9, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_air_f"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_air_f"), false, false); } } -unsafe extern "C" fn metaknight_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_metaknight_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_metaknight_rnd_attack")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_metaknight_attackhard_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_metaknight_attackhard_s03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_metaknight_attackair_f01")); - PLAY_SE(fighter, Hash40::new("se_metaknight_attackair_l01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_metaknight_attackair_f01")); + PLAY_SE(agent, Hash40::new("se_metaknight_attackair_l01")); } } -unsafe extern "C" fn metaknight_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 11.0, 9.0); + FT_DESIRED_RATE(agent, 11.0, 9.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 4.0, -11.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 16.5, -9.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(4.0), Some(-11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(16.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 4.0, -11.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 16.5, -9.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(4.0), Some(-11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(16.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut handle: u64 = std::u64::MAX; frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), 5, 7, 0, 0, -150, 58, 0.73, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), 5, 7, 0, 0, -150, 58, 0.73, true); + LAST_EFFECT_SET_RATE(agent, 1.5); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_metaknight_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_metaknight_rnd_attack")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_metaknight_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_metaknight_smash_s01")); } } -unsafe extern "C" fn metaknight_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0/4.0); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0/4.0); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.032), Some(-5.065), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 17.032, -5.065, Some(0.0), Some(14.107), Some(-10.134), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 14.107, -10.134, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.032), Some(-5.065), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 17.032, -5.065, Some(0.0), Some(14.107), Some(-10.134), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 14.107, -10.134, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 12, 0, 10, 0, 180, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 12, 0, 10, 0, 180, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-6.5), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, -4.0, Some(0.0), Some(-4.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -4.5, -9.5, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-6.5), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, -4.0, Some(0.0), Some(-4.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -4.5, -9.5, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attackairn", metaknight_attack_air_n_game) - .acmd("expression_attackairn", metaknight_attack_air_n_expression) - .acmd("game_attackairf", metaknight_attack_air_f_game) - .acmd("effect_attackairf", metaknight_attack_air_f_effect) - .acmd("sound_attackairf", metaknight_attack_air_f_sound) - .acmd("game_attackairb", metaknight_attack_air_b_game) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("game_attackairhi", metaknight_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", metaknight_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/metaknight/src/acmd/ground.rs b/fighters/metaknight/src/acmd/ground.rs index d92275acda..ee683ddde1 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -1,204 +1,200 @@ use super::*; -unsafe extern "C" fn game_attack100(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 26.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 26.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE); } } -unsafe extern "C" fn effect_attack100(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6, -1, 20, 165, 105, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6, -1, 20, 165, 105, 0.5, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.65, 0.7)); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, 25, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, 25, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6.5, -1, -165, 20, -80, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6.5, -1, -165, 20, -80, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 2, -205, 160, -145, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 2, -205, 160, -145, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.7, 0.85)); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 6, 1, 0, -155, 105, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 6, 1, 0, -155, 105, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.7, 0.7)); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, -45, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, -45, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.85, 0.65)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 4, 4, -165, 20, -95, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 4, 4, -165, 20, -95, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), -2, 6, -4, -25, -30, -60, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), -2, 6, -4, -25, -30, -60, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } } -// #[acmd_script( agent = "metaknight", script = "game_attack100end", category = ACMD_GAME, low_priority )] -// unsafe fn game_attack100end(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_attack100end(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // AttackModule::clear_all(boma); // frame(lua_state, 3.0); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 5.0, 0.0, 8.0, 11.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 6.0, 0.0, 8.0, 16.5, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 5.0, 0.0, 8.0, 11.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +// ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 6.0, 0.0, 8.0, 16.5, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // } // wait(lua_state, 1.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); // } -// FT_MOTION_RATE(fighter, 0.87); +// FT_MOTION_RATE(agent, 0.87); // } -// #[acmd_script( agent = "metaknight", script = "effect_attack100end", category = ACMD_EFFECT, low_priority )] -// unsafe fn effect_attack100end(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// 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_OFF_KIND(fighter, Hash40::new("metaknight_attack"), false, false); +// unsafe fn effect_attack100end(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +// EFFECT_OFF_KIND(agent, Hash40::new("metaknight_attack"), false, false); // EffectModule::set_disable_render_offset_last(boma); // } // frame(lua_state, 3.0); -// if is_excute(fighter) { -// EFFECT_FOLLOW(fighter, Hash40::new("metaknight_attack_end"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); +// if is_excute(agent) { +// EFFECT_FOLLOW(agent, Hash40::new("metaknight_attack_end"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); // EffectModule::set_disable_render_offset_last(boma); -// EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); +// EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); // } // frame(lua_state, 26.0); -// if is_excute(fighter) { -// FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +// if is_excute(agent) { +// FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // } // } -unsafe extern "C" fn sound_attack100start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack100start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_metaknight_attack100")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_metaknight_attack100")); // match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - // 0 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack100")), - // 1 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack07")), + // 0 => PLAY_SE(agent, Hash40::new("vc_metaknight_attack100")), + // 1 => PLAY_SE(agent, Hash40::new("vc_metaknight_attack07")), // _ => {} // }; } } -unsafe extern "C" fn metaknight_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.5, 65, 107, 0, 65, 5.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 7.5, 70, 107, 0, 65, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 6.5, 75, 107, 0, 67, 3.5, 0.0, -9.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.5, 65, 107, 0, 65, 5.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 7.5, 70, 107, 0, 65, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 6.5, 75, 107, 0, 67, 3.5, 0.0, -9.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 5.5, 70, 107, 0, 65, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 5.5, 70, 107, 0, 65, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attack100", game_attack100) - .acmd("effect_attack100", effect_attack100) - .acmd("sound_attack100start", sound_attack100start) - .acmd("game_attackdash", metaknight_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack100", game_attack100); + agent.acmd("effect_attack100", effect_attack100); + agent.acmd("sound_attack100start", sound_attack100start); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/metaknight/src/acmd/mod.rs b/fighters/metaknight/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/metaknight/src/acmd/mod.rs +++ b/fighters/metaknight/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index d3713c1905..d20f48f2b8 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -1,203 +1,125 @@ - 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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_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(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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_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_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_metaknight_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_metaknight_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, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_metaknight_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_metaknight_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_metaknight_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_metaknight_step_left_l")); } } -unsafe extern "C" fn 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, 14.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("metaknight") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/metaknight/src/acmd/smashes.rs b/fighters/metaknight/src/acmd/smashes.rs index 401338ad8f..27288629c9 100644 --- a/fighters/metaknight/src/acmd/smashes.rs +++ b/fighters/metaknight/src/acmd/smashes.rs @@ -1,170 +1,165 @@ - use super::*; -unsafe extern "C" fn metaknight_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 112, 0, 30, 5.0, 0.0, 5.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 102, 0, 30, 4.5, 0.0, 5.0, 13.0, Some(0.0), Some(5.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 112, 0, 30, 5.0, 0.0, 5.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 102, 0, 30, 4.5, 0.0, 5.0, 13.0, Some(0.0), Some(5.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 25.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_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, -10.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 175, 0, 65, 7.0, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, -10.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 175, 0, 65, 7.0, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn metaknight_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_u_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_u_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1.0, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn metaknight_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 35, 80, 0, 50, 3.8, 0.0, 4.0, 9.0, Some(0.0), Some(9.8), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 35, 80, 0, 50, 3.8, 0.0, 4.0, 9.0, Some(0.0), Some(9.8), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_d_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_d_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attacks4", metaknight_attack_s4_s_game) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attackhi4", metaknight_attack_hi4_game) - .acmd("effect_attackhi4", metaknight_attack_hi4_effect) - .acmd("game_attacklw4", metaknight_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/metaknight/src/acmd/specials.rs b/fighters/metaknight/src/acmd/specials.rs index 8a98214659..ebef13d0b0 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -1,126 +1,194 @@ - use super::*; -unsafe extern "C" fn metaknight_special_n_spin_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"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(-5.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 9.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialnspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(-5.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 9.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } - } -unsafe extern "C" fn metaknight_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 5.0, 90, 120, 0, 50, 12.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 1, Hash40::new("top"), 5.0, 90, 120, 0, 50, 12.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_tornado"), false, false); +unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_tornado"), false, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); } } -unsafe extern "C" fn metaknight_special_n_spin_ground_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialnspingroundeffect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); WorkModule::set_float(boma, 500.0, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_N_SPIN_WORK_FLOAT_GROUND_EFFECT_COUNTER); } } -unsafe extern "C" fn metaknight_special_n_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, 10, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_N_SPIN_WORK_INT_EFFECT_START_FRAME); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_tornado"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); + } +} + +unsafe extern "C" fn game_specialairsfinish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, true); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MotionModule::set_rate(boma, 2.0); + } +} + +unsafe extern "C" fn game_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); } } -unsafe extern "C" fn metaknight_special_air_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_tornado"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); +unsafe extern "C" fn effect_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 2.0); + for i in 1..8 { + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); + } + } + frame(lua_state, 43.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); } } -unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); + if is_excute(agent) { + if agent.is_stick_backward() { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -129,7 +197,7 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -138,65 +206,64 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 ); } - } -unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); + if is_excute(agent) { + if agent.is_stick_backward() { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 5.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); AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.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); AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -205,7 +272,7 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -214,7 +281,7 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -222,326 +289,253 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn metaknight_special_hi_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialhiloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 14.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 23.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 22.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 30.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_special_lw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_NO_HOP); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_air_lw_f"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.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 metaknight_special_lw_sub_f_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"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } - } -unsafe extern "C" fn metaknight_special_air_lw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_air_lw_f"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn metaknight_special_lw_sub_air_f_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"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_lw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_lw_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.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 metaknight_special_lw_sub_b_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"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_air_lw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_lw_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn metaknight_special_lw_sub_air_b_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"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_s_finish(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - JostleModule::set_status(boma, true); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - MotionModule::set_rate(boma, 2.0); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnspin", game_specialnspin); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("effect_specialnend", effect_specialnend); + agent.acmd("effect_specialnspingroundeffect", effect_specialnspingroundeffect); + agent.acmd("effect_specialnstart", effect_specialnstart); + agent.acmd("effect_specialairnend", effect_specialairnend); -unsafe extern "C" fn metaknight_special_s_drill(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), false); - } -} + agent.acmd("game_specialairsfinish", game_specialairsfinish); + agent.acmd("game_specialsend", game_specialairsfinish); + agent.acmd("game_specialsdrill", game_specialsdrill); + agent.acmd("effect_specialsdrill", effect_specialsdrill); -unsafe extern "C" fn metaknight_special_s_drill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 2.0); - for i in 1..8 { - wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); - } - } - frame(lua_state, 43.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); - } -} + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhiloop", game_specialhiloop); + agent.acmd("effect_specialhiloop", effect_specialhiloop); + agent.acmd("effect_specialhi", effect_specialhi); -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_specialnspin", metaknight_special_n_spin_game) - .acmd("game_specialairnend", metaknight_special_n_end_game) - .acmd("game_specialnend", metaknight_special_n_end_game) - .acmd("effect_specialnend", metaknight_special_n_end_effect) - .acmd("effect_specialnspingroundeffect", metaknight_special_n_spin_ground_effect) - .acmd("effect_specialnstart", metaknight_special_n_start_effect) - .acmd("effect_specialairnend", metaknight_special_air_n_end_effect) - .acmd("game_specialhi", metaknight_special_hi_game) - .acmd("game_specialhiloop", metaknight_special_hi_loop_game) - .acmd("effect_specialhiloop", metaknight_special_hi_loop_effect) - .acmd("effect_specialhi", metaknight_special_hi_effect) - .acmd("game_speciallwf", metaknight_special_lw_f_game) - .acmd("game_speciallwsubf", metaknight_special_lw_sub_f_game) - .acmd("game_specialairlwf", metaknight_special_air_lw_f_game) - .acmd("game_speciallwsubairf", metaknight_special_lw_sub_air_f_game) - .acmd("game_speciallwb", metaknight_special_lw_b_game) - .acmd("game_speciallwsubb", metaknight_special_lw_sub_b_game) - .acmd("game_specialairlwb", metaknight_special_air_lw_b_game) - .acmd("game_speciallwsubairb", metaknight_special_lw_sub_air_b_game) - .acmd("game_specialairsfinish", metaknight_special_s_finish) - .acmd("game_specialsend", metaknight_special_s_finish) - .acmd("game_specialsdrill", metaknight_special_s_drill) - .acmd("effect_specialsdrill", metaknight_special_s_drill_effect) - .install(); + agent.acmd("game_speciallwf", game_speciallwf); + agent.acmd("game_speciallwsubf", game_speciallwsubf); + agent.acmd("game_specialairlwf", game_specialairlwf); + agent.acmd("game_speciallwsubairf", game_speciallwsubairf); + agent.acmd("game_speciallwb", game_speciallwb); + agent.acmd("game_speciallwsubb", game_speciallwsubb); + agent.acmd("game_specialairlwb", game_specialairlwb); + agent.acmd("game_speciallwsubairb", game_speciallwsubairb); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/throws.rs b/fighters/metaknight/src/acmd/throws.rs index a46e019074..cb55cdae00 100644 --- a/fighters/metaknight/src/acmd/throws.rs +++ b/fighters/metaknight/src/acmd/throws.rs @@ -1,193 +1,191 @@ use super::*; -unsafe extern "C" fn metaknight_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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.5, 0.0, Some(0.0), Some(6.5), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.217); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.217); + 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 metaknight_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.18); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.18); + 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 metaknight_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-13.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-13.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.08); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.08); + 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 metaknight_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 65, 140, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 65, 140, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 6.0, 40, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 6.0, 40, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 6.0, 60, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 100, 0, 10, 4.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 6.0, 60, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 100, 0, 10, 4.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn metaknight_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 140, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 140, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 6.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 4.0, 0.0, 5.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 6.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 4.0, 0.0, 5.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 83, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 83, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 39.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 150, 0, 85, 9.0, 0.0, 7.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 7.0, 65, 150, 0, 85, 9.0, 0.0, 7.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 45.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 60, 130, 0, 62, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 100, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 60, 130, 0, 62, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 100, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); for i in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); } frame(lua_state, 73.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 200, 0, 60, 7.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 200, 0, 60, 7.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 0); + CHECK_FINISH_CAMERA(agent, 2, 0); } frame(lua_state, 75.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 82.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_catch", metaknight_catch_game) - .acmd("game_catchdash", metaknight_catch_dash_game) - .acmd("game_catchturn", metaknight_catch_turn_game) - .acmd("game_throwf", metaknight_throw_f_game) - .acmd("game_throwb", metaknight_throw_b_game) - .acmd("game_throwhi", metaknight_throw_hi_game) - .acmd("game_throwlw", metaknight_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/metaknight/src/acmd/tilts.rs b/fighters/metaknight/src/acmd/tilts.rs index 50b9fe5cf6..52d4f11ae7 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -1,184 +1,177 @@ - use super::*; -unsafe extern "C" fn metaknight_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 6.0, 0.0, 5.5, 8.5, Some(0.0), Some(5.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 6.0, 0.0, 5.5, 8.5, Some(0.0), Some(5.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn effect_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_s1_trace"), Hash40::new("top"), -0.0, 0, -0.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_s1_trace"), Hash40::new("top"), -0.0, 0, -0.5, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 4.0, 0.0, 6.0, 7.5, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 3.6, 0.0, 5.0, 16.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 4.0, 0.0, 6.0, 7.5, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 3.6, 0.0, 5.0, 16.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn metaknight_attack_s3_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 6.0, 0.0, 15.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 5.0, 0.0, 7.2, 14.0, Some(0.0), Some(7.2), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 6.0, 0.0, 15.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 5.0, 0.0, 7.2, 14.0, Some(0.0), Some(7.2), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn metaknight_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 6.2, 4.0, Some(0.0), Some(6.2), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 6.2, 4.0, Some(0.0), Some(6.2), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 6.0, 0.0, 15.7, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 20.5, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 95, 130, 0, 40, 5.0, 0.0, 25.2, 0.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 6.0, 0.0, 15.7, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 20.5, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 95, 130, 0, 40, 5.0, 0.0, 25.2, 0.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 95, 130, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 95, 130, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn metaknight_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_status_default_int64(boma, Hash40::new("mantle").hash as i64, Hash40::new("mantle_normal").hash as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } - } -unsafe extern "C" fn metaknight_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 3.5, 0.0, 2.1, 8.0, Some(0.0), Some(2.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 2.2, 0.0, 1.3, 13.0, Some(0.0), Some(2.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 3.5, 0.0, 2.1, 8.0, Some(0.0), Some(2.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 2.2, 0.0, 1.3, 13.0, Some(0.0), Some(2.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("metaknight_lw3_sword"), Hash40::new("top"), -0.371, 1.549, 15.0, 95, 10, -0.153, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("metaknight_lw3_sword"), Hash40::new("top"), -0.371, 1.549, 15.0, 95, 10, -0.153, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attacks3", metaknight_attack_s3_s_game) - .acmd("effect_attacks3", effect_attacks3) - .acmd("game_attacks3s2", metaknight_attack_s3_s2_game) - .acmd("game_attacks3s3", metaknight_attack_s3_s3_game) - .acmd("game_attackhi3", metaknight_attack_hi3_game) - .acmd("expression_attackhi3", metaknight_attack_hi3_expression) - .acmd("game_attacklw3", metaknight_attack_lw3_game) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("game_attacks3s3", game_attacks3s3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/metaknight/src/lib.rs b/fighters/metaknight/src/lib.rs index 5537dac979..42b4f95c4c 100644 --- a/fighters/metaknight/src/lib.rs +++ b/fighters/metaknight/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("metaknight"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/metaknight/src/opff.rs b/fighters/metaknight/src/opff.rs index afa8ef6015..1432905979 100644 --- a/fighters/metaknight/src/opff.rs +++ b/fighters/metaknight/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn dim_cape_early_attack_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { @@ -183,8 +182,6 @@ pub unsafe fn metaknight_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("metaknight") - .on_line(Main, metaknight_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, metaknight_frame_wrapper); } \ No newline at end of file diff --git a/fighters/metaknight/src/status/attack_100.rs b/fighters/metaknight/src/status/attack_100.rs index dabb507885..206b2bccd9 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -1,12 +1,13 @@ use super::*; -use globals::*; -unsafe extern "C" fn metaknight_attack100_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_100 + +unsafe extern "C" fn attack100_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_Attack100_common(); - fighter.sub_shift_status_main(L2CValue::Ptr(metaknight_attack100_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack100_main_loop as *const () as _)) } -unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack100_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 0.into(); @@ -86,8 +87,6 @@ unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterComm 0.into() } -pub fn install() { - smashline::Agent::new("metaknight") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, attack100_main); } \ No newline at end of file diff --git a/fighters/metaknight/src/status/mod.rs b/fighters/metaknight/src/status/mod.rs index 0076d80451..9b9df78449 100644 --- a/fighters/metaknight/src/status/mod.rs +++ b/fighters/metaknight/src/status/mod.rs @@ -1,9 +1,11 @@ use super::*; +use globals::*; +// status script import mod special_s; mod attack_100; -pub fn install() { - special_s::install(); - attack_100::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + attack_100::install(agent); } \ No newline at end of file diff --git a/fighters/metaknight/src/status/special_s.rs b/fighters/metaknight/src/status/special_s.rs index aade60eb33..0b40de65b9 100644 --- a/fighters/metaknight/src/status/special_s.rs +++ b/fighters/metaknight/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END @@ -15,8 +14,6 @@ pub unsafe extern "C" fn special_s_end_end(fighter: &mut L2CFighterCommon) -> L2 ret } -pub fn install() { - smashline::Agent::new("metaknight") - .status(End, *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END, special_s_end_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END, special_s_end_end); } \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/aerials.rs b/fighters/mewtwo/src/acmd/aerials.rs index cf9332181a..13adb0f734 100644 --- a/fighters/mewtwo/src/acmd/aerials.rs +++ b/fighters/mewtwo/src/acmd/aerials.rs @@ -1,147 +1,147 @@ - use super::*; -unsafe extern "C" fn mewtwo_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 2.0, 0.0, 7.0, 4.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 12.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 2.0, 0.0, 7.0, 4.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 12.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mewtwo_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 4.2, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 4.2, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 5.0, 10.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 5.0, 10.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 7.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 7.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_f_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_attack_g"), Hash40::new("mewtwo_pk_attack_g"), Hash40::new("top"), 0, 7.7, 1.8, 15, 0, 30, 1.13, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.4); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_attack_g"), Hash40::new("mewtwo_pk_attack_g"), Hash40::new("top"), 0, 7.7, 1.8, 15, 0, 30, 1.13, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.4); } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - EffectModule::kill_kind(fighter.module_accessor, Hash40::new("mewtwo_pk_attack_g"), true, true); + frame(lua_state, 10.0); + if is_excute(agent) { + EffectModule::kill_kind(boma, Hash40::new("mewtwo_pk_attack_g"), true, true); } } -unsafe extern "C" fn mewtwo_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (12.0 - 1.0) / 6.4); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 12.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 13.0, 361, 105, 0, 5, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 12.0, 361, 95, 0, 5, 4.1, -0.8, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 11.0, 361, 95, 0, 5, 3.8, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 13.0, 361, 105, 0, 5, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 12.0, 361, 95, 0, 5, 4.1, -0.8, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 11.0, 361, 95, 0, 5, 3.8, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 17.0); MotionModule::set_rate(boma, (37.0 - 17.0) / 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 0.84); + LAST_EFFECT_SET_RATE(agent, 0.84); } frame(lua_state, 17.5); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_01"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_02"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_03"), true, true); @@ -153,67 +153,66 @@ unsafe extern "C" fn mewtwo_attack_air_b_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (10.0 - 1.0) / 7.0); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 10.0, 55, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 11.0, 55, 93, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 12.0, 55, 103, 0, 13, 3.7, -0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 10.0, 55, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 11.0, 55, 93, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 12.0, 55, 103, 0, 13, 3.7, -0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 11.0); - if is_excute (fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 65, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 8.0, 65, 92, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 9.0, 65, 92, 0, 13, 3.7, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute (agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 65, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 8.0, 65, 92, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 9.0, 65, 92, 0, 13, 3.7, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn mewtwo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), }; } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_01"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_02"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_03"), true, true); @@ -225,55 +224,56 @@ unsafe extern "C" fn mewtwo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 0.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn mewtwo_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (19.0 - 1.0) / 14.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 270, 62, 0, 12, 5.5, 0.0, -7.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 105, 0, 20, 7.5, 0.0, -5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 270, 62, 0, 12, 5.5, 0.0, -7.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 105, 0, 20, 7.5, 0.0, -5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attackairn", mewtwo_attack_air_n_game) - .acmd("game_attackairf", mewtwo_attack_air_f_game) - .acmd("effect_attackairf", mewtwo_attack_air_f_effect) - .acmd("game_attackairb", mewtwo_attack_air_b_game) - .acmd("effect_attackairb", mewtwo_attack_air_b_effect) - .acmd("game_attackairhi", mewtwo_attack_air_hi_game) - .acmd("effect_attackairhi", mewtwo_attack_air_hi_effect) - .acmd("expression_attackairhi", mewtwo_attack_air_hi_expression) - .acmd("game_attackairlw", mewtwo_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/mewtwo/src/acmd/ground.rs b/fighters/mewtwo/src/acmd/ground.rs index 3327732c25..9b8b20358e 100644 --- a/fighters/mewtwo/src/acmd/ground.rs +++ b/fighters/mewtwo/src/acmd/ground.rs @@ -1,108 +1,104 @@ - use super::*; -unsafe extern "C" fn mewtwo_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 3.5, 0.0, 11.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.5, 0.0, 11.8, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 3.5, 0.0, 11.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.5, 0.0, 11.8, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); //Jab-Lock Hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 2.5, 1.0, 3.0, 2.0, Some(1.0), Some(3.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 2.5, 1.0, 3.0, 2.0, Some(1.0), Some(3.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn mewtwo_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 18.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 18.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mewtwo_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.5, 3.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 54, 67, 0, 80, 5.5, 0.0, 8.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 57, 0, 80, 4.3, 0.0, 8.2, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 54, 67, 0, 80, 5.5, 0.0, 8.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 57, 0, 80, 4.3, 0.0, 8.2, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 21.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 60, 60, 0, 77, 4.5, 0.0, 8.6, 14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 60, 0, 77, 3.7, 0.0, 8.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 13.0, 21.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 60, 0, 77, 4.5, 0.0, 8.6, 14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 60, 0, 77, 3.7, 0.0, 8.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.0); } frame(lua_state, 21.0); //43 - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("mewtwo_pk_attack_e"), Hash40::new("haver"), 1.9 * PostureModule::lr(boma), 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("mewtwo_pk_attack_e"), Hash40::new("haver"), 1.9 * PostureModule::lr(boma), 0, 0, 0, 0, 0, 0.9, true); EffectModule::enable_sync_init_pos_last(boma); //LAST_EFFECT_SET_RATE(fighter, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_pk_attack_e"), true, true); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attack11", mewtwo_attack_11_game) - .acmd("game_attack100end", mewtwo_attack_100_end_game) - .acmd("game_attackdash", mewtwo_attack_dash_game) - .acmd("effect_attackdash", mewtwo_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/mewtwo/src/acmd/mod.rs b/fighters/mewtwo/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/mewtwo/src/acmd/mod.rs +++ b/fighters/mewtwo/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/other.rs b/fighters/mewtwo/src/acmd/other.rs index 4e214c29d2..8b001f08b7 100644 --- a/fighters/mewtwo/src/acmd/other.rs +++ b/fighters/mewtwo/src/acmd/other.rs @@ -1,211 +1,131 @@ - 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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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(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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_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_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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, 32.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::remove(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_ESCAPEAIRDUMMY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } 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, 32.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::remove(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_ESCAPEAIRDUMMY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } 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("mewtwo") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/smashes.rs b/fighters/mewtwo/src/acmd/smashes.rs index 50007d1682..388bfa5709 100644 --- a/fighters/mewtwo/src/acmd/smashes.rs +++ b/fighters/mewtwo/src/acmd/smashes.rs @@ -1,183 +1,177 @@ - use super::*; -unsafe extern "C" fn mewtwo_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mewtwo_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mewtwo_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 3.0, 0.0, 10.0, 9.0, Some(0.0), Some(9.2), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 6.4, 18.799999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 3.0, 0.0, 10.0, 9.0, Some(0.0), Some(9.2), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 6.4, 18.799999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mewtwo_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 3.0, 0.0, 11.7, -6.0, Some(0.0), Some(11.7), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 4.0, 0.0, 5.2, -6.5, Some(0.0), Some(5.2), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 3.0, 0.0, 11.7, -6.0, Some(0.0), Some(11.7), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 4.0, 0.0, 5.2, -6.5, Some(0.0), Some(5.2), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); let hit1 = Vector2f { x: 0.0, y: 24.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 7, false); AttackModule::set_vec_target_pos(boma, 4, Hash40::new("top"), &hit1, 7, false); } frame(lua_state, 10.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, -5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, 5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 100, 40, 0, 3.5, 0.0, 14.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, -5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, 5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 100, 40, 0, 3.5, 0.0, 14.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 5.2, 0.0, 23.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 5.2, 0.0, 23.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn mewtwo_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1, 0, 1.3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1, 0, 1.3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("mewtwo_pk_attack_a"), Hash40::new("mewtwo_pk_attack_a"), Hash40::new("top"), -2.5, 21.5, 0, 0, 0, 0, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("mewtwo_pk_attack_a"), Hash40::new("mewtwo_pk_attack_a"), Hash40::new("top"), -2.5, 21.5, 0, 0, 0, 0, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 7.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 11.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 7.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 11.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 4.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 5.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 4.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 5.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attacks4hi", mewtwo_attack_s4_hi_game) - .acmd("game_attacks4", mewtwo_attack_s4_s_game) - .acmd("game_attacks4lw", mewtwo_attack_s4_lw_game) - .acmd("game_attackhi4", mewtwo_attack_hi4_game) - .acmd("effect_attackhi4", mewtwo_attack_hi4_effect) - .acmd("game_attacklw4", mewtwo_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mewtwo/src/acmd/specials.rs b/fighters/mewtwo/src/acmd/specials.rs index 9f615de05e..5e2908a612 100644 --- a/fighters/mewtwo/src/acmd/specials.rs +++ b/fighters/mewtwo/src/acmd/specials.rs @@ -1,148 +1,135 @@ - use super::*; -unsafe extern "C" fn mewtwo_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 7.4, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 10.2, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_G); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 280, 16, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 0.0, 361, 100, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 0, 1.0, 280, 50, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 7.4, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 10.2, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_G); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 280, 16, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 0.0, 361, 100, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 0, 1.0, 280, 50, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_catch_only(boma, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, true, true); } wait(lua_state, 4.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } frame(lua_state, 20.0); for _ in 0..6 { wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_TARGET_OBJECT_ID); let target_group = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_THROWN_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_THROWN_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), target, target_group, target_no); } } frame(lua_state, 32.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); - fighter.on_flag(*FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_GRAVITY_NORMAL); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); + agent.on_flag(*FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_GRAVITY_NORMAL); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_HIT); - } } -unsafe extern "C" fn mewtwo_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1.5, 0, 2, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1.5, 0, 2, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mewtwo_nenriki"), Hash40::new("top"), 0, 9, 17, 0, 90, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mewtwo_nenriki"), Hash40::new("top"), 0, 9, 17, 0, 90, 0, 0.45, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_nenriki"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_nenriki"), false, true); } } -unsafe extern "C" fn mewtwo_special_hi_start_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - GroundModule::set_correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::set_correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); } } -unsafe extern "C" fn mewtwo_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::clear_speed_all(boma); } } -unsafe extern "C" fn mewtwo_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_MEWTWO_CLIFF_HANG_DATA_SPECIAL_HI as u32); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn mewtwo_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_BINDBALL, false, -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(53.0-24.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(53.0-24.0)); } } -unsafe extern "C" fn mewtwo_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_BINDBALL, false, -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(53.0-24.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(53.0-24.0)); } } -unsafe extern "C" fn bindball_shoot_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"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_specials", mewtwo_special_s_game) - .acmd("effect_specials", mewtwo_special_s_effect) - .acmd("game_specialhistart", mewtwo_special_hi_start_game) - .acmd("game_specialairhistart", mewtwo_special_air_hi_start_game) - .acmd("game_specialairhi", mewtwo_special_air_hi_game) - .acmd("game_speciallw", mewtwo_special_lw_game) - .acmd("game_specialairlw", mewtwo_special_air_lw_game) - .install(); - smashline::Agent::new("mewtwo_bindball") - .acmd("game_shoot", bindball_shoot_game) - .install(); + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/mewtwo/src/acmd/throws.rs b/fighters/mewtwo/src/acmd/throws.rs index ee3fe14c52..cd6ee3a611 100644 --- a/fighters/mewtwo/src/acmd/throws.rs +++ b/fighters/mewtwo/src/acmd/throws.rs @@ -1,124 +1,122 @@ use super::*; -unsafe extern "C" fn mewtwo_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 8.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mewtwo_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 11.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 11.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.5, 4.5, Some(0.0), Some(8.5), Some(11.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.5, 4.5, Some(0.0), Some(8.5), Some(11.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mewtwo_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.5, -4.5, Some(0.0), Some(8.5), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.5, -4.5, Some(0.0), Some(8.5), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 mewtwo_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 80, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 80, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 43.0); - FT_MOTION_RATE_RANGE(fighter, 43.0, 78.0, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 43.0, 78.0, 27.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 78.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mewtwo_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 74, 57, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 74, 57, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail7"), 4.0, 80, 104, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 4.0, 80, 105, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail3"), 4.0, 80, 104, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail7"), 4.0, 80, 104, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 4.0, 80, 105, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail3"), 4.0, 80, 104, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_NONE, *ATTACK_REGION_TAIL); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 0); + CHECK_FINISH_CAMERA(agent, 13, 0); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.85); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.85); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_catch", mewtwo_catch_game) - .acmd("game_catchdash", mewtwo_catch_dash_game) - .acmd("game_catchturn", mewtwo_catch_turn_game) - .acmd("game_throwhi", mewtwo_throw_hi_game) - .acmd("game_throwlw", mewtwo_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index 4481f900e7..1fb8fd02d9 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -1,361 +1,362 @@ - use super::*; -unsafe extern "C" fn mewtwo_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.714); + FT_MOTION_RATE(agent, 0.714); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 9.0, 80, 81, 0, 63, 5.0, 0.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail3"), 8.0, 85, 81, 0, 54, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail5"), 6.0, 65, 71, 0, 45, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 9.0, 80, 81, 0, 63, 5.0, 0.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail3"), 8.0, 85, 81, 0, 54, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail5"), 6.0, 65, 71, 0, 45, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 9.0, 65, 81, 0, 45, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail3"), 8.0, 65, 81, 0, 45, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 9.0, 65, 81, 0, 45, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail3"), 8.0, 65, 81, 0, 45, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 0.9); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn mewtwo_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 9.0, 80, 84, 0, 60, 4.3, -0.2, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 8.0, 80, 84, 0, 60, 4.0, 1.2, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 5.0, 90, 84, 0, 60, 3.8, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 9.0, 80, 84, 0, 60, 4.3, -0.2, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 8.0, 80, 84, 0, 60, 4.0, 1.2, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 5.0, 90, 84, 0, 60, 3.8, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } } -unsafe extern "C" fn mewtwo_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 4, true); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attacks3hi", mewtwo_attack_s3_hi_game) - .acmd("effect_attacks3hi", mewtwo_attack_s3_hi_effect) - .acmd("expression_attacks3hi", mewtwo_attack_s3_hi_expression) - .acmd("game_attacks3", mewtwo_attack_s3_s_game) - .acmd("effect_attacks3", mewtwo_attack_s3_s_effect) - .acmd("expression_attacks3", mewtwo_attack_s3_expression) - .acmd("game_attacks3lw", mewtwo_attack_s3_lw_game) - .acmd("effect_attacks3lw", mewtwo_attack_s3_lw_effect) - .acmd("expression_attacks3lw", mewtwo_attack_s3_lw_expression) - .acmd("game_attackhi3", mewtwo_attack_hi3_game) - .acmd("game_attacklw3", mewtwo_attack_lw3_game) - .acmd("expression_attacklw3", mewtwo_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + //agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + //agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/mewtwo/src/bindball/acmd.rs b/fighters/mewtwo/src/bindball/acmd.rs new file mode 100644 index 0000000000..05cd2f29e0 --- /dev/null +++ b/fighters/mewtwo/src/bindball/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} diff --git a/fighters/mewtwo/src/bindball/mod.rs b/fighters/mewtwo/src/bindball/mod.rs new file mode 100644 index 0000000000..ab450f643d --- /dev/null +++ b/fighters/mewtwo/src/bindball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mewtwo_bindball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mewtwo/src/lib.rs b/fighters/mewtwo/src/lib.rs index 5537dac979..669a1f70e9 100644 --- a/fighters/mewtwo/src/lib.rs +++ b/fighters/mewtwo/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bindball; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("mewtwo"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bindball::install(); } \ No newline at end of file diff --git a/fighters/mewtwo/src/opff.rs b/fighters/mewtwo/src/opff.rs index 4d58f2f6e6..c2ec19673d 100644 --- a/fighters/mewtwo/src/opff.rs +++ b/fighters/mewtwo/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn actionable_teleport_air(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(fighter.module_accessor) @@ -59,7 +58,6 @@ unsafe fn dj_upB_jump_refresh(fighter: &mut L2CFighterCommon) { } } - pub unsafe fn mewtwo_teleport_wall_ride(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, id: usize) { // Wall Ride momentum fixes let touch_right = GroundModule::is_wall_touch_line(boma, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); @@ -144,8 +142,6 @@ pub unsafe fn mewtwo_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("mewtwo") - .on_line(Main, mewtwo_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mewtwo_frame_wrapper); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/attack_air.rs b/fighters/mewtwo/src/status/attack_air.rs index fe4b3baa68..bc544b603e 100644 --- a/fighters/mewtwo/src/status/attack_air.rs +++ b/fighters/mewtwo/src/status/attack_air.rs @@ -1,7 +1,5 @@ use super::*; -use globals::*; utils::import!(common::djc::attack_air_main_status); -// status script import extern "Rust" { #[link_name = "attack_air_float_pre"] @@ -10,6 +8,8 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::mewtwo::FLOAT.into()) } @@ -52,10 +52,8 @@ pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CV fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("mewtwo") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/fall.rs b/fighters/mewtwo/src/status/fall.rs index b264cfa733..26f26d2754 100644 --- a/fighters/mewtwo/src/status/fall.rs +++ b/fighters/mewtwo/src/status/fall.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn mewtwo_fall_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_FALL + +unsafe extern "C" fn fall_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND].get_i32() == statuses::mewtwo::FLOAT && fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_SPECIAL_S && fighter.global_table[CURRENT_FRAME].get_i32() <= 10 { @@ -9,8 +11,6 @@ unsafe extern "C" fn mewtwo_fall_end(fighter: &mut L2CFighterCommon) -> L2CValue return smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_FALL)(fighter); } -pub fn install() { - Agent::new("mewtwo") - .status(End, *FIGHTER_STATUS_KIND_FALL, mewtwo_fall_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_FALL, fall_end); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/float.rs b/fighters/mewtwo/src/status/float.rs index c9edb385e5..921cc30c94 100644 --- a/fighters/mewtwo/src/status/float.rs +++ b/fighters/mewtwo/src/status/float.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::mewtwo::FLOAT extern "Rust" { #[link_name = "float_pre_common"] @@ -29,10 +30,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("mewtwo") - .status(Pre, statuses::mewtwo::FLOAT, float_pre) - .status(Main, statuses::mewtwo::FLOAT, float_main) - .status(End, statuses::mewtwo::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::mewtwo::FLOAT, float_pre); + agent.status(Main, statuses::mewtwo::FLOAT, float_main); + agent.status(End, statuses::mewtwo::FLOAT, float_end); } diff --git a/fighters/mewtwo/src/status/jump_aerial.rs b/fighters/mewtwo/src/status/jump_aerial.rs index ff982eb8a8..6d348325ea 100644 --- a/fighters/mewtwo/src/status/jump_aerial.rs +++ b/fighters/mewtwo/src/status/jump_aerial.rs @@ -1,14 +1,14 @@ use super::*; -unsafe extern "C" fn mewtwo_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_JUMP_AERIAL + +unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_FLOAT); MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); fighter.status_JumpAerial(); 0.into() } -pub fn install() { - Agent::new("mewtwo") - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, mewtwo_jump_aerial_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status.rs b/fighters/mewtwo/src/status/mod.rs similarity index 84% rename from fighters/mewtwo/src/status.rs rename to fighters/mewtwo/src/status/mod.rs index e09785eca8..7c1b8456b6 100644 --- a/fighters/mewtwo/src/status.rs +++ b/fighters/mewtwo/src/status/mod.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod jump_aerial; mod attack_air; @@ -30,13 +31,12 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::mewtwo::FLOAT); } -pub fn install() { - jump_aerial::install(); - attack_air::install(); - float::install(); - fall::install(); - special_n::install(); - smashline::Agent::new("mewtwo") - .on_start(on_start) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + jump_aerial::install(agent); + attack_air::install(agent); + float::install(agent); + fall::install(agent); + special_n::install(agent); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/special_n.rs b/fighters/mewtwo/src/status/special_n.rs index 0e6eee125c..d126899d5d 100644 --- a/fighters/mewtwo/src/status/special_n.rs +++ b/fighters/mewtwo/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL + unsafe extern "C" fn special_n_cancel_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); @@ -51,8 +53,6 @@ unsafe extern "C" fn special_n_cancel_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -pub fn install() { - Agent::new("mewtwo") - .status(Main, *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL, special_n_cancel_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL, special_n_cancel_main); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/aerials.rs b/fighters/miifighter/src/acmd/aerials.rs index 3b66aa8a92..b48fa2cedd 100644 --- a/fighters/miifighter/src/acmd/aerials.rs +++ b/fighters/miifighter/src/acmd/aerials.rs @@ -1,190 +1,188 @@ use super::*; -unsafe extern "C" fn miifighter_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.4, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.4, 2.0); frame(lua_state, 1.4); - FT_MOTION_RATE_RANGE(fighter, 1.4, 2.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.4, 2.0, 1.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 95, 0, 30, 3.5, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 95, 0, 30, 3.5, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 30.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 30.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miifighter_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 366, 30, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 366, 30, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 5.0, 75, 30, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 75, 30, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miifighter_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 5.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 50, 100, 0, 26, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 50, 100, 0, 26, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miifighter_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.5, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.5, 5.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 75, 90, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 75, 90, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 75, 90, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 75, 90, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.5); - FT_MOTION_RATE_RANGE(fighter, 11.5, 13.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.5, 13.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miifighter_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn miifighter_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 270, 69, 0, 10, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 270, 69, 0, 10, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 270, 69, 0, 10, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 270, 69, 0, 10, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 13.0, 270, 80, 0, 40, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 270, 80, 0, 40, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 13.0, 270, 80, 0, 40, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 270, 80, 0, 40, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attackairn", miifighter_attack_air_n_game) - .acmd("game_attackairf", miifighter_attack_air_f_game) - .acmd("game_attackairb", miifighter_attack_air_b_game) - .acmd("game_attackairhi", miifighter_attack_air_hi_game) - .acmd("expression_attackairhi", miifighter_attack_air_hi_expression,) - .acmd("game_attackairlw", miifighter_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/ground.rs b/fighters/miifighter/src/acmd/ground.rs index bf23f592a7..7b3f909c96 100644 --- a/fighters/miifighter/src/acmd/ground.rs +++ b/fighters/miifighter/src/acmd/ground.rs @@ -1,100 +1,99 @@ use super::*; -unsafe extern "C" fn miifighter_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn miifighter_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.5, 0.0, 7.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.5, 0.0, 7.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn miifighter_attack_100end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 45, 130, 0, 65, 3.5, 0.0, 7.0, 11.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 45, 130, 0, 65, 3.5, 0.0, 7.0, 11.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 6.5, 6.5, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 45, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 45, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 2.9, 7.2, 7.2); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attack11", miifighter_attack_11_game) - .acmd("game_attack12", miifighter_attack_12_game) - .acmd("game_attack100end", miifighter_attack_100end_game) - .acmd("game_attackdash", miifighter_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/miifighter/src/acmd/mod.rs b/fighters/miifighter/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/miifighter/src/acmd/mod.rs +++ b/fighters/miifighter/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index 3cd1d89b7b..1a52cc9b2c 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -1,195 +1,115 @@ - 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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_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(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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_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_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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, 12.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("miifighter") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miifighter/src/acmd/smashes.rs b/fighters/miifighter/src/acmd/smashes.rs index ef55659823..91978fb383 100644 --- a/fighters/miifighter/src/acmd/smashes.rs +++ b/fighters/miifighter/src/acmd/smashes.rs @@ -1,24 +1,21 @@ use super::*; -unsafe extern "C" fn miifighter_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 4.0); + frame(lua_state, 6.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(lua_state, 8.0); + frame(lua_state, 14.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 5.5, 6.5); } - wait(lua_state, 5.0); + frame(lua_state, 17.0); if is_excute(agent) { - HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 4.0, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 3.0, -0.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { @@ -26,22 +23,25 @@ unsafe extern "C" fn miifighter_attack_hi4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 6.0); + frame(lua_state, 4.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(lua_state, 14.0); + frame(lua_state, 8.0); if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 5.5, 6.5); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } - frame(lua_state, 17.0); + wait(lua_state, 5.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 4.0, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 3.0, -0.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); if is_excute(agent) { @@ -49,7 +49,7 @@ unsafe extern "C" fn miifighter_attack_s4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -69,12 +69,12 @@ unsafe extern "C" fn miifighter_attack_lw4_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attackhi4", miifighter_attack_hi4_game) - .acmd("game_attacks4", miifighter_attack_s4_game) - .acmd("game_attacks4hi", miifighter_attack_s4_game) - .acmd("game_attacks4lw", miifighter_attack_s4_game) - .acmd("game_attacklw4", miifighter_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miifighter/src/acmd/specials.rs b/fighters/miifighter/src/acmd/specials.rs deleted file mode 100644 index 8f4f44698f..0000000000 --- a/fighters/miifighter/src/acmd/specials.rs +++ /dev/null @@ -1,1174 +0,0 @@ -use super::*; - -unsafe extern "C" fn miifighter_special_n2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - FT_MOTION_RATE(fighter, 1.1); - frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_PULL_FINISH_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_n2_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - } - frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miifighter_special_air_n2_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - } - frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miifighter_special_s1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_air_s1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - KineticModule::add_speed(boma, &Vector3f{x: 0.3, y: 0.5, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - KineticModule::add_speed(boma, &Vector3f{x: -0.3, y: 0.7, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - KineticModule::add_speed(boma, &Vector3f{x: 0.85, y: 3.0, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_CONTROL_X); - } -} - -unsafe extern "C" fn miifighter_special_air_s2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); - } -} - -unsafe extern "C" fn miifighter_special_hi11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn miifighter_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); - } - -} - -unsafe extern "C" fn miifighter_special_hi12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 3.0); - if is_excute(fighter) { - if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { - PostureModule::add_pos(boma, &Vector3f::new(0.0, 0.2, 0.0)); - } - } - frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 8.5, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 8.5); - FT_MOTION_RATE_RANGE(fighter, 8.5, 11.0, 3.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let fall_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); - let fall_acl_y_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); - sv_kinetic_energy!(set_accel_y_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); - } - -} - -unsafe extern "C" fn miifighter_special_hi12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - 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); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_tenchi_arc"), -1); - } -} - -unsafe extern "C" fn miifighter_special_hi12_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_special_c1_h01")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_h01")); - } -} - -unsafe extern "C" fn miifighter_special_hi12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn miifighter_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); - } - frame(lua_state, 51.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); - } - -} - -unsafe extern "C" fn miifighter_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); - } - frame(lua_state, 51.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); - } - -} - -unsafe extern "C" fn miifighter_special_lw1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(fighter.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_lw1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_windwave"), Hash40::new("top"), &Vector3f::new(0.0, 0.0, 10.0), &Vector3f::zero(), 0.4, false, 0, 0, 0, 0, 0, false, false); - EffectModule::set_rate(boma, eff_handle as u32, 0.4); - VarModule::set_int64(fighter.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miifighter_sidekick_hold"), true, true); - } - frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(fighter.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miifighter_sidekick_flash"), true, true); - LANDING_EFFECT(fighter, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 1.1, 0.6); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn miifighter_special_lw1_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_attack03")); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miifighter_smash_s03")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_l03")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_s03")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_miifighter_special_c2_s02")); - } -} - -unsafe extern "C" fn miifighter_special_lw1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - }; - frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - AREA_WIND_2ND_arg10(fighter, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); - } - wait(lua_state, 18.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - wait(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, true, 0); - } - frame(lua_state, 52.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); - } -} - -unsafe extern "C" fn miifighter_special_air_lw1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn miifighter_special_air_lw1_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miifighter_special_l02")); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_special_c1_l01")); - PLAY_SE(fighter, Hash40::new("se_miifighter_final06")); - PLAY_SE(fighter, Hash40::new("se_miifighter_final06")); - } -} - -unsafe extern "C" fn miifighter_special_lw1_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); - app::sv_kinetic_energy::clear_speed(fighter.lua_state_agent); - KineticModule::clear_speed_all(boma); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); - SET_SPEED_EX(fighter, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - } -} - -unsafe extern "C" fn miifighter_special_lw1_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - for _ in 0..24 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); - } - wait(lua_state, 2.0); - } -} - -unsafe extern "C" fn miifighter_special_lw1_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - SET_SPEED_EX(fighter, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 2, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - -} - -unsafe extern "C" fn miifighter_special_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_pistonpunch_arc"), -1); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); - } -} - -unsafe extern "C" fn miifighter_special_air_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_pistonpunch_arc"), -1); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); - } -} - -unsafe extern "C" fn miifighter_special_lw2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.5, 3.0); - frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(fighter, 1.5, 2.0, 1.0); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 43.0, 36.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); - } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - } - frame(lua_state, 43.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn miifighter_special_air_lw2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.5, 3.0); - frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(fighter, 1.5, 2.0, 1.0); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 43.0, 36.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); - } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - } - frame(lua_state, 43.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn miifighter_special_air_lw2_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - /* - let dive_speed_x_modifier_stick_mul = 0.5; - let dive_speed_y_modifier_stick_mul = 0.5; - let mut dive_speed_x_modifier_raw = dive_speed_x_modifier_stick_mul * ControlModule::get_stick_x(boma) * PostureModule::lr(boma); - let mut dive_speed_y_modifier_raw = dive_speed_y_modifier_stick_mul * ControlModule::get_stick_y(boma); - let mut dive_speed_x_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_x_modifier_stick_mul, dive_speed_x_modifier_stick_mul * 0.5); - let mut dive_speed_y_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_y_modifier_stick_mul, dive_speed_y_modifier_stick_mul * 0.5); - SET_SPEED_EX(fighter, -3.0 + dive_speed_x_modifier, -2.5 + dive_speed_y_modifier, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - */ - SET_SPEED_EX(fighter, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_air_lw2_auto_attack_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"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_lw3_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 8.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - //SEARCH(fighter, 0, 0, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *COLLISION_KIND_MASK_ALL, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - GrabModule::set_rebound(boma, true); - CATCH(fighter, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); - } - frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.2); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(boma, false); - //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn miifighter_special_lw3_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(fighter); - //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 66, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_CATCH_STOP(fighter, 5, 1); - //CHECK_FINISH_CAMERA(fighter, 14, 0); - //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); - } - frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - let opponent_boma = fighter.get_grabbed_opponent_boma(); - if opponent_boma.is_fighter() { - VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); - } - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - } -} - -unsafe extern "C" fn miifighter_special_air_lw3_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_COUNTER_THROW_FLAG_THROW_AFTER_LANDING); - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(fighter); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_CATCH_STOP(fighter, 5, 1); - //CHECK_FINISH_CAMERA(fighter, 14, 0); - //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miifighter_special_air_lw3_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 101); - FLASH(fighter, 1, 1, 1, 0); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_specialn2start", miifighter_special_n2_start_game) - .acmd("game_specialairn2start", miifighter_special_n2_start_game) - .acmd("game_specialn2finish", miifighter_special_n2_finish_game) - .acmd("game_specialairn2finish", miifighter_special_air_n2_finish_game) - .acmd("game_specials1end", miifighter_special_s1_end_game) - .acmd("game_specialairs1end", miifighter_special_air_s1_end_game) - .acmd("game_specialairs2start", miifighter_special_air_s2_start_game) - .acmd("game_specialhi1", miifighter_special_hi11_game) - .acmd("effect_specialhi1", miifighter_special_hi1_effect) - .acmd("effect_specialairhi1", miifighter_special_hi1_effect) - .acmd("game_specialhi12", miifighter_special_hi12_game) - .acmd("game_specialairhi12", miifighter_special_hi12_game) - .acmd("effect_specialhi12", miifighter_special_hi12_effect) - .acmd("effect_specialairhi12", miifighter_special_hi12_effect) - .acmd("sound_specialhi12", miifighter_special_hi12_sound) - .acmd("sound_specialairhi12", miifighter_special_hi12_sound) - .acmd("expression_specialhi12", miifighter_special_hi12_expression) - .acmd("expression_specialairhi12", miifighter_special_hi12_expression) - .acmd("game_specialhi2", miifighter_special_hi2_game) - .acmd("game_specialairhi2", miifighter_special_air_hi2_game) - .acmd("game_speciallw1", miifighter_special_lw1_game) - .acmd("effect_speciallw1", miifighter_special_lw1_effect) - .acmd("sound_speciallw1", miifighter_special_lw1_sound) - .acmd("expression_speciallw1", miifighter_special_lw1_expression) - .acmd("effect_specialairlw1", miifighter_special_air_lw1_effect) - .acmd("sound_specialairlw1", miifighter_special_air_lw1_sound) - .acmd("game_speciallw1loop", miifighter_special_lw1_loop_game) - .acmd("effect_speciallw1loop", miifighter_special_lw1_loop_effect) - .acmd("game_speciallw1landing", miifighter_special_lw1_landing_game) - .acmd("game_specialhi3", miifighter_special_hi3_game) - .acmd("game_specialairhi3", miifighter_special_hi3_game) - .acmd("effect_specialhi3", miifighter_special_hi3_effect) - .acmd("effect_specialairhi3", miifighter_special_air_hi3_effect) - .acmd("game_speciallw2start", miifighter_special_lw2_start_game) - .acmd("game_specialairlw2start", miifighter_special_air_lw2_start_game) - .acmd("game_specialairlw2kick", miifighter_special_air_lw2_kick_game) - .acmd("game_specialairlw2autoattack", miifighter_special_air_lw2_auto_attack_game) - .acmd("game_speciallw3catch", miifighter_special_lw3_catch_game) - .acmd("game_specialairlw3catch", miifighter_special_lw3_catch_game) - .acmd("game_speciallw3throw", miifighter_special_lw3_throw_game) - .acmd("game_specialairlw3throw", miifighter_special_air_lw3_throw_game) - .acmd("effect_specialairlw3throw", miifighter_special_air_lw3_throw_effect) - .install(); -} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/mod.rs b/fighters/miifighter/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..7c584b7a28 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) {; + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_hi.rs b/fighters/miifighter/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..e914fdc400 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_hi.rs @@ -0,0 +1,445 @@ +use super::*; + +// ================================================================================================ +// ======================================== SOARING AXE KICK ====================================== +// ================================================================================================ + +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); + } +} + +unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); + if is_excute(agent) { + if agent.is_prev_situation(*SITUATION_KIND_GROUND) { + PostureModule::add_pos(boma, &Vector3f::new(0.0, 0.2, 0.0)); + } + } + frame(lua_state, 7.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.5, 2.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 8.5); + FT_MOTION_RATE_RANGE(agent, 8.5, 11.0, 3.0); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && agent.is_stick_backward() { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); + } + HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); + let fall_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); + let fall_acl_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); + sv_kinetic_energy!(set_accel_y_mul, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); + } +} + +unsafe extern "C" fn effect_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), 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(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_tenchi_arc"), -1); + } +} + +unsafe extern "C" fn sound_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_h01")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_h01")); + } +} + +unsafe extern "C" fn expression_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +// ================================================================================================ +// ======================================= HELICOPTER KICK ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); + } +} + +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); + } +} + +// ================================================================================================ +// ======================================= THRUST UPPERCUT ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + } +} + +unsafe extern "C" fn effect_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialhi1", stub); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + agent.acmd("game_specialhi12", game_specialhi12); + agent.acmd("game_specialairhi12", game_specialhi12); + agent.acmd("effect_specialhi12", effect_specialhi12); + agent.acmd("effect_specialairhi12", effect_specialhi12); + agent.acmd("sound_specialhi12", sound_specialhi12); + agent.acmd("sound_specialairhi12", sound_specialhi12); + agent.acmd("expression_specialhi12", expression_specialhi12); + agent.acmd("expression_specialairhi12", expression_specialhi12); + + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("effect_specialhi3", effect_specialhi3); + agent.acmd("effect_specialairhi3", effect_specialairhi3); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_lw.rs b/fighters/miifighter/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..5bf4e0e208 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_lw.rs @@ -0,0 +1,472 @@ +use super::*; + +// ================================================================================================ +// ======================================= EARTHQUAKE FIST ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_windwave"), Hash40::new("top"), &Vector3f::new(0.0, 0.0, 10.0), &Vector3f::zero(), 0.4, false, 0, 0, 0, 0, 0, false, false); + EffectModule::set_rate(boma, eff_handle as u32, 0.4); + VarModule::set_int64(agent.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_hold"), true, true); + } + frame(lua_state, 13.0); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_flash"), true, true); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 1.1, 0.6); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_attack03")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_smash_s03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_l03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miifighter_special_c2_s02")); + } +} + +unsafe extern "C" fn expression_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + }; + frame(lua_state, 13.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + AREA_WIND_2ND_arg10(agent, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); + } + wait(lua_state, 18.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + wait(lua_state, 18.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); + } + frame(lua_state, 52.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + } +} + +unsafe extern "C" fn effect_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_special_l02")); + } + frame(lua_state, 19.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_l01")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); + } +} + +unsafe extern "C" fn game_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); + app::sv_kinetic_energy::clear_speed(lua_state); + KineticModule::clear_speed_all(boma); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); + SET_SPEED_EX(agent, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + } +} + +unsafe extern "C" fn effect_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..24 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); + } + wait(lua_state, 2.0); + } +} + +unsafe extern "C" fn game_speciallw1landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + SET_SPEED_EX(agent, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 2, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ======================================== FEINT JUMP ============================================ +// ================================================================================================ + +unsafe extern "C" fn game_speciallw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); + frame(lua_state, 1.5); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); + } frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); + } + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); + SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_specialairlw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); + frame(lua_state, 1.5); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); + } frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); + } + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); + SEARCH(agent, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_specialairlw2kick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 7.0); + if is_excute(agent) { + /* + let dive_speed_x_modifier_stick_mul = 0.5; + let dive_speed_y_modifier_stick_mul = 0.5; + let mut dive_speed_x_modifier_raw = dive_speed_x_modifier_stick_mul * ControlModule::get_stick_x(boma) * PostureModule::lr(boma); + let mut dive_speed_y_modifier_raw = dive_speed_y_modifier_stick_mul * ControlModule::get_stick_y(boma); + let mut dive_speed_x_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_x_modifier_stick_mul, dive_speed_x_modifier_stick_mul * 0.5); + let mut dive_speed_y_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_y_modifier_stick_mul, dive_speed_y_modifier_stick_mul * 0.5); + SET_SPEED_EX(fighter, -3.0 + dive_speed_x_modifier, -2.5 + dive_speed_y_modifier, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + */ + SET_SPEED_EX(agent, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 22.0); + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw2autoattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ============================================ WILD THROW ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw3catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 8.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + //SEARCH(fighter, 0, 0, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *COLLISION_KIND_MASK_ALL, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + GrabModule::set_rebound(boma, true); + CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); + } + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); + //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_speciallw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); + //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 66, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_CATCH_STOP(agent, 5, 1); + //CHECK_FINISH_CAMERA(fighter, 14, 0); + //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); + } + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + let opponent_boma = agent.get_grabbed_opponent_boma(); + if opponent_boma.is_fighter() { + VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); + } + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } +} + +unsafe extern "C" fn game_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_COUNTER_THROW_FLAG_THROW_AFTER_LANDING); + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_CATCH_STOP(agent, 5, 1); + //CHECK_FINISH_CAMERA(fighter, 14, 0); + //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); + } + frame(lua_state, 13.0); + if is_excute(agent) { + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 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_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + COL_PRI(agent, 101); + FLASH(agent, 1, 1, 1, 0); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 3.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 12.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_speciallw1", game_speciallw1); + agent.acmd("effect_speciallw1", effect_speciallw1); + agent.acmd("sound_speciallw1", sound_speciallw1); + agent.acmd("expression_speciallw1", expression_speciallw1); + agent.acmd("effect_specialairlw1", effect_specialairlw1); + agent.acmd("sound_specialairlw1", sound_specialairlw1); + agent.acmd("game_speciallw1loop", game_speciallw1loop); + agent.acmd("effect_speciallw1loop", effect_speciallw1loop); + agent.acmd("game_speciallw1landing", game_speciallw1landing); + + agent.acmd("game_speciallw2start", game_speciallw2start); + agent.acmd("game_specialairlw2start", game_specialairlw2start); + agent.acmd("game_specialairlw2kick", game_specialairlw2kick); + agent.acmd("game_specialairlw2autoattack", game_specialairlw2autoattack); + + agent.acmd("game_speciallw3catch", game_speciallw3catch); + agent.acmd("game_specialairlw3catch", game_speciallw3catch); + agent.acmd("game_speciallw3throw", game_speciallw3throw); + agent.acmd("game_specialairlw3throw", game_specialairlw3throw); + agent.acmd("effect_specialairlw3throw", effect_specialairlw3throw); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_n.rs b/fighters/miifighter/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..3808b6ebf4 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_n.rs @@ -0,0 +1,142 @@ +use super::*; + +// ================================================================================================ +// ==================================== FLASHING MACH PUNCH ======================================= +// ================================================================================================ + +unsafe extern "C" fn game_specialn2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + FT_MOTION_RATE(agent, 1.1); + frame(lua_state, 24.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_PULL_FINISH_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + } + frame(lua_state, 2.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 68.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + } + frame(lua_state, 2.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 68.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialn2start", game_specialn2start); + agent.acmd("game_specialairn2start", game_specialn2start); + agent.acmd("game_specialn2finish", game_specialn2finish); + agent.acmd("game_specialairn2finish", game_specialairn2finish); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_s.rs b/fighters/miifighter/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..2b710e3f67 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_s.rs @@ -0,0 +1,157 @@ +use super::*; + +// ================================================================================================ +// ========================================= ONSLAUGHT ============================================ +// ================================================================================================ + +unsafe extern "C" fn game_specials1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 29.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairs1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: 0.3, y: 0.5, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: -0.3, y: 0.7, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: 0.85, y: 3.0, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 30.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING); + } + frame(lua_state, 48.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 55.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_CONTROL_X); + } +} + +// ================================================================================================ +// ===================================== BURNING DROP KICK ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialairs2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); + } +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specials1end", game_specials1end); + agent.acmd("game_specialairs1end", game_specialairs1end); + + agent.acmd("game_specialairs2start", game_specialairs2start); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/throws.rs b/fighters/miifighter/src/acmd/throws.rs index 41abc4aee0..e27787afcf 100644 --- a/fighters/miifighter/src/acmd/throws.rs +++ b/fighters/miifighter/src/acmd/throws.rs @@ -1,180 +1,180 @@ use super::*; -unsafe extern "C" fn miifighter_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miifighter_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.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(9.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + 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(9.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miifighter_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { 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(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + 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(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 16.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 42, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 16.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 42, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 6, 1); - CHECK_FINISH_CAMERA(fighter, 23, 11); + CHECK_FINISH_CAMERA(agent, 23, 11); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 39.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 39.0, 20.0); + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: 0.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 130, 0, 50, 4.0, 0.0, 12.0, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 130, 0, 50, 4.0, 0.0, 12.0, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 9); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 10, 5, 0); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 30.0, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 11.0, 30.0, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 95, 80, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 95, 80, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 8, 1); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 21); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.9); //FighterCutInManager::set_throw_finish_offset(boma, 2, 8, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: 10.0, z: 5.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 72, 65, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 72, 65, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 1.0, 361, 40, 0, 80, 6.0, -3.5, 2.0, -4.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 1.0, 361, 40, 0, 80, 6.0, -3.5, 2.0, -4.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1.0, 17.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1.0, 17.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: -2.0, z: 4.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_catch", miifighter_catch_game) - .acmd("game_catchdash", miifighter_catch_dash_game) - .acmd("game_catchturn", miifighter_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miifighter/src/acmd/tilts.rs b/fighters/miifighter/src/acmd/tilts.rs index f851bf4358..3aa348aed0 100644 --- a/fighters/miifighter/src/acmd/tilts.rs +++ b/fighters/miifighter/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miifighter_attack_s3_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -15,7 +15,7 @@ unsafe extern "C" fn miifighter_attack_s3_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -30,7 +30,7 @@ unsafe extern "C" fn miifighter_attack_s3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -46,93 +46,92 @@ unsafe extern "C" fn miifighter_attack_s3_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 5.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 3.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 77, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 80, 90, 0, 45, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 85, 90, 0, 45, 4.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 77, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 80, 90, 0, 45, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 85, 90, 0, 45, 4.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } - } -unsafe extern "C" fn miifighter_attack_lw3_expression(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_attacklw3(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attacks3hi", miifighter_attack_s3_hi_game) - .acmd("game_attacks3", miifighter_attack_s3_game) - .acmd("game_attacks3lw", miifighter_attack_s3_lw_game) - .acmd("game_attackhi3", miifighter_attack_hi3_game) - .acmd("game_attacklw3", miifighter_attack_lw3_game) - .acmd("expression_attacklw3", miifighter_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/miifighter/src/lib.rs b/fighters/miifighter/src/lib.rs index 0d1508b9f2..ebad4e4192 100644 --- a/fighters/miifighter/src/lib.rs +++ b/fighters/miifighter/src/lib.rs @@ -6,8 +6,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -39,9 +39,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miifighter"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/miifighter/src/opff.rs b/fighters/miifighter/src/opff.rs index fdadac75f3..0af03e9aa4 100644 --- a/fighters/miifighter/src/opff.rs +++ b/fighters/miifighter/src/opff.rs @@ -174,8 +174,6 @@ pub unsafe fn miifighter_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("miifighter") - .on_line(Main, miifighter_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miifighter_frame_wrapper); } \ No newline at end of file diff --git a/fighters/miifighter/src/status/mod.rs b/fighters/miifighter/src/status/mod.rs new file mode 100644 index 0000000000..0db386271c --- /dev/null +++ b/fighters/miifighter/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_lw1; + +pub fn install(agent: &mut Agent) { + special_lw1::install(agent); +} \ No newline at end of file diff --git a/fighters/miifighter/src/status.rs b/fighters/miifighter/src/status/special_lw1.rs similarity index 72% rename from fighters/miifighter/src/status.rs rename to fighters/miifighter/src/status/special_lw1.rs index 2c35a47d8a..c3d0584800 100644 --- a/fighters/miifighter/src/status.rs +++ b/fighters/miifighter/src/status/special_lw1.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -//Forces Grounded Earthquake punch on the ground +// FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND +// Forces Grounded Earthquake punch on the ground unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND)(fighter); if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { @@ -13,8 +13,6 @@ unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("miifighter") - .status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/aerials.rs b/fighters/miigunner/src/acmd/aerials.rs index 490610d8ca..7cde47cf4b 100644 --- a/fighters/miigunner/src/acmd/aerials.rs +++ b/fighters/miigunner/src/acmd/aerials.rs @@ -1,183 +1,182 @@ use super::*; use smash::app::sv_module_access::sound; -unsafe extern "C" fn miigunner_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 5.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 5.0, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 38, 0, 51, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 38, 0, 51, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 38, 0, 51, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 38, 0, 51, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miigunner_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 9.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 9.0, 4.0); frame(lua_state, 9.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 5.0); } - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 10.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 3.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 3.0); } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_ATTACKAIRF_BULLET, false, 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed1 = Vector3f{ x: -0.8, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 5.0, 120, 85, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 120, 85, 0, 60, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 5.0, 120, 85, 0, 60, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 5.0, 120, 85, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 120, 85, 0, 60, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 5.0, 120, 85, 0, 60, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 23.0, 8.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 23.0, 8.0); } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.0, 361, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 361, 85, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 4.0, 361, 85, 0, 50, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.0, 361, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 361, 85, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 4.0, 361, 85, 0, 50, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miigunner_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("handr"), 2.5, 0, 0, 0, 0, -90, 0.65, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("handr"), 5.5, 0, 0, 0, 0, -90, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("handr"), 2.5, 0, 0, 0, 0, -90, 0.65, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("handr"), 5.5, 0, 0, 0, 0, -90, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn miigunner_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_f"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 5.0)/landing_frame); +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_f"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_landing_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_atk_shot_after"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_atk_shot_after"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn miigunner_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 8.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 9.0, 7.0); } - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed1 = Vector3f{ x: 0.6, y: 0.1, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 60, 90, 0, 55, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 60, 90, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 60, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 60, 90, 0, 55, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 60, 90, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 60, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 103, 0, 29, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 103, 0, 29, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 36, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 41, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 103, 0, 29, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 103, 0, 29, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 36, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 41, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 13.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 13.0, 22.0, 7.0); - } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 361, 100, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.5, 361, 100, 0, 35, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 6.5, 361, 100, 0, 35, 3.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 13.0, 22.0, 7.0); + } + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 361, 100, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.5, 361, 100, 0, 35, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr"), 6.5, 361, 100, 0, 35, 3.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_FIRE, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } @@ -186,292 +185,289 @@ unsafe extern "C" fn miigunner_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 22.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 22.0, 32.0, 13.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 22.0, 32.0, 13.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } -unsafe extern "C" fn miigunner_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -11, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -11, 0, 0, 0, 1, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, true); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, true); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } - } -unsafe extern "C" fn miigunner_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_b"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 3.0)/landing_frame); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_b"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 3.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 11.0); frame(lua_state, 15.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 17.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 17.0, 8.0); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed = Vector3f{ x: 0.0, y: -4.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 90, 80, 0, 50, 6.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 90, 80, 0, 50, 6.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 50, 0, 70, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 50, 0, 70, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 270, 48, 0, 40, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 270, 48, 0, 40, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 140, 100, 45, 0, 4.5, 0.0, 15.0, -3.0, Some(0.0), Some(15.0), Some(3.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 140, 100, 45, 0, 4.5, 0.0, 15.0, -3.0, Some(0.0), Some(15.0), Some(3.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } } frame(lua_state, 18.0); - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 0.5); - } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 367, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 96, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 130, 100, 25, 0, 3.2, 0.0, 13.0, -0.8, Some(0.0), Some(13.0), Some(0.8), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 0.5); + } + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 367, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 96, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 130, 100, 25, 0, 3.2, 0.0, 13.0, -0.8, Some(0.0), Some(13.0), Some(0.8), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 80, 0, 50, 6.5, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 80, 0, 50, 6.5, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 27.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 72, 172, 0, 50, 4.0, 0.0, 58.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 72, 172, 0, 50, 4.0, 0.0, 58.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_ENERGY); } } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miigunner_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.0, 15, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.0, 15, 0, 0, 0, 0, 1, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_atk_shot5"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_atk_shot5"), -1); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } else { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_atk_gatling"), Hash40::new("armr"), 5.5, 0, 0, -90, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + EFFECT_FLW_POS(agent, Hash40::new("miigunner_atk_gatling"), Hash40::new("armr"), 5.5, 0, 0, -90, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 23.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn miigunner_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - PLAY_STATUS(fighter, Hash40::new("se_miigunner_attackair_h01_lp")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + PLAY_STATUS(agent, Hash40::new("se_miigunner_attackair_h01_lp")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack02")); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - PLAY_SE(fighter, Hash40::new("se_miigunner_smash_l01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack03")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + PLAY_SE(agent, Hash40::new("se_miigunner_smash_l01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack03")); } } frame(lua_state, 39.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - STOP_SE(fighter, Hash40::new("se_miigunner_attackair_h01_lp")); - STOP_SE(fighter, Hash40::new("seq_miigunner_rnd_attack02")); - PLAY_SE(fighter, Hash40::new("se_miigunner_attackair_h01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + STOP_SE(agent, Hash40::new("se_miigunner_attackair_h01_lp")); + STOP_SE(agent, Hash40::new("seq_miigunner_rnd_attack02")); + PLAY_SE(agent, Hash40::new("se_miigunner_attackair_h01")); } } } -unsafe extern "C" fn miigunner_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 17.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } -unsafe extern "C" fn miigunner_landing_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_hi"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 5.0)/landing_frame); +unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_hi"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 14.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 20.0, 4.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 20.0, 4.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 18.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 18.0, 1.0); } frame(lua_state, 18.0); - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 18.0, 20.0, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 18.0, 20.0, 1.0); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let charge_mul = 1.0 + (charge * 0.025); - let mul = if VarModule::is_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { 0.5 } else { 1.0 }; - if !VarModule::is_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { - VarModule::on_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME); + let mul = if VarModule::is_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { 0.5 } else { 1.0 }; + if !VarModule::is_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { + VarModule::on_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME); } - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0 * charge_mul, 80, 65, 0, 50, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - SET_SPEED_EX(fighter, + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0 * charge_mul, 80, 65, 0, 50, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + SET_SPEED_EX(agent, (KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * PostureModule::lr(boma) * (20.0 - charge)/20.0) * mul, (1.0 + (0.125 * charge)) * mul, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN @@ -479,114 +475,114 @@ unsafe extern "C" fn miigunner_attack_air_lw_game(fighter: &mut L2CAgentBase) { } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 90, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 90, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } } frame(lua_state, 28.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 0.75); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 0.75); } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 43.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 43.0, 50.0, 9.0 + 2.0 * VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE)); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 43.0, 50.0, 9.0 + 2.0 * VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE)); } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn miigunner_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ let handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::new(0.0, 10.0, -1.0), &Vector3f::zero(), 0.75, true, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); + VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); EffectModule::set_rate(boma, handle as u32, 0.1); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - } - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.3, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_atk_shot5"), -1); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_gimmckjump"), Hash40::new("armr"), 6, 0, 0, 0, -90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 1.0, 10.0); - if VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE) >= 10.0 { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_gimmck_attack"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + } + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.3, true); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_atk_shot5"), -1); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_gimmckjump"), Hash40::new("armr"), 6, 0, 0, 0, -90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + LAST_EFFECT_SET_COLOR(agent, 0.15, 1.0, 10.0); + if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) >= 10.0 { + EFFECT_FLW_POS(agent, Hash40::new("miigunner_gimmck_attack"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } - } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attackairn", miigunner_attack_air_n_game) - .acmd("game_attackairf", miigunner_attack_air_f_game) - .acmd("effect_attackairf", miigunner_attack_air_f_effect) - .acmd("game_landingairf", miigunner_landing_air_f_game) - .acmd("effect_landingairf", miigunner_landing_air_f_effect) - .acmd("game_attackairb", miigunner_attack_air_b_game) - .acmd("effect_attackairb", miigunner_attack_air_b_effect) - .acmd("game_landingairb", miigunner_landing_air_b_game) - .acmd("game_attackairhi", miigunner_attack_air_hi_game) - .acmd("effect_attackairhi", miigunner_attack_air_hi_effect) - .acmd("sound_attackairhi", miigunner_attack_air_hi_sound) - .acmd("expression_attackairhi", miigunner_attack_air_hi_expression) - .acmd("game_landingairhi", miigunner_landing_air_hi_game) - .acmd("game_attackairlw", miigunner_attack_air_lw_game) - .acmd("effect_attackairlw", miigunner_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("effect_landingairf", effect_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_landingairhi", game_landingairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/ground.rs b/fighters/miigunner/src/acmd/ground.rs index cc871149f1..7fc1e33e0f 100644 --- a/fighters/miigunner/src/acmd/ground.rs +++ b/fighters/miigunner/src/acmd/ground.rs @@ -1,109 +1,108 @@ use super::*; -unsafe extern "C" fn miigunner_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 18, 0, 22, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 18, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 180, 15, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 18, 0, 22, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 18, 0, 22, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 18, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 180, 15, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 18, 0, 22, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn miigunner_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.5, 361, 25, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.5, 361, 25, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.5, 361, 20, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 25, 0, 25, 3.0, 0.0, 3.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.5, 361, 25, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.5, 361, 25, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.5, 361, 20, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 25, 0, 25, 3.0, 0.0, 3.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn miigunner_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 350, 100, 20, 0, 4.0, 0.0, 7.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 10, 0, 4.0, 0.0, 7.0, 13.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 350, 100, 20, 0, 4.0, 0.0, 7.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 10, 0, 4.0, 0.0, 7.0, 13.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.66); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.66); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 7.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 7.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.77); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.77); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 53, 0, 82, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 53, 0, 82, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 361, 60, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 361, 60, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attack11", miigunner_attack_11_game) - .acmd("game_attack12", miigunner_attack_12_game) - .acmd("game_attack13", miigunner_attack_13_game) - .acmd("game_attackdash", miigunner_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/mod.rs b/fighters/miigunner/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/miigunner/src/acmd/mod.rs +++ b/fighters/miigunner/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/other.rs b/fighters/miigunner/src/acmd/other.rs index e3a49b0449..a4698c6fc3 100644 --- a/fighters/miigunner/src/acmd/other.rs +++ b/fighters/miigunner/src/acmd/other.rs @@ -1,516 +1,130 @@ use super::*; use smash::app::sv_battle_object; -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_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(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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_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_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.375); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.375); frame(lua_state, 9.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_miigunner_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miigunner_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, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miigunner_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miigunner_step_right_m")); } wait(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miigunner_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miigunner_step_left_m")); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.125); + FT_MOTION_RATE(agent, 1.125); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn miigunner_attackairf_bullet_fly_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); - } -} - -unsafe extern "C" fn miigunner_rapidshot_bullet_fly_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"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn miigunner_grenadelauncher_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, 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_BOMB); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD(fighter, 0, 1, 0.02, 1000, 1, 0, 0, 18); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - ATTACK(fighter, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn miigunner_fullthrottle_final_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let pos2dim = Vector3f {x: 0.0, y: 40.0, z: 0.0}; - PostureModule::set_pos(boma, &pos2dim); - if is_excute(fighter) { - - } - -} - -unsafe extern "C" fn miigunner_stealthbomb_tame_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 5.0); - } - frame(lua_state, 100.0); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.5, false, 0, 0, 0, 0 ,0, false, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.15, 10.0); - EffectModule::set_rgb(boma, flash_handle as u32, 0.15, 0.15, 10.0); - EffectModule::set_rate(boma, flash_handle as u32, 0.3); - VarModule::set_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER, flash_handle); - } - } - for h in 101..=120 { - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = VarModule::get_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER); - let start_color = Vector3f { x: 0.15, y: 0.15, z: 10.0 }; - let end_color = Vector3f { x: 10.0, y: 0.15, z: 0.15 }; - // Smoothly interpolate from starting to ending color - let blend_vector = Vector3f { - x: start_color.x + ((end_color.x - start_color.x) * (((h as f32) - 100.0) / 20.0)), - y: start_color.y + ((end_color.y - start_color.y) * (((h as f32) - 100.0) / 20.0)), - z: start_color.z + ((end_color.z - start_color.z) * (((h as f32) - 100.0) / 20.0)) - }; - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn miigunner_stealthbomb_s_move_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.0); - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - //AREA_WIND_2ND_RAD(0, 1, 0.02, 1000, 1, 0, 0, 12); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - //AreaModule::erase_wind(boma, 0); - } - -} - -unsafe extern "C" fn miigunner_stealthbomb_s_move_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - -} - -unsafe extern "C" fn miigunner_supermissile_straight_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, fighter.battle_object_id as i32); - } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::on_flag(gunner, vars::miigunner::instance::DETONATE_READY); - } - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 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_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if is_excute(fighter) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - EFFECT(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 10.0, 25.0); - } - else { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - } - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if is_excute(fighter) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s03")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_bomb_l")); - } - else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_bomb_s")); - } - } - } -} - -unsafe extern "C" fn miigunner_bottomshoot_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - if VarModule::get_float(owner_module_accessor.object(), vars::miigunner::status::CURRENT_CHARGE) <= 10.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } - else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn miigunner_gunnercharge_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 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_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - AttackModule::enable_safe_pos(boma); - } - for _ in 0..1000 { - wait(lua_state, 1.0); - if is_excute(fighter) { - let motion_vec = Vector3f{x: 0.5, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - } - } - } -unsafe extern "C" fn miigunner_gunnercharge_shoot_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n02")); - } - else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n03")); - } - else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n04")); - } - else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n05")); - } - } -} - -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("miigunner") - .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("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) - .install(); - smashline::Agent::new("miigunner_stealthbomb_s") - .acmd("game_move", miigunner_stealthbomb_s_move_game) - .acmd("effect_move", miigunner_stealthbomb_s_move_effect) - .install(); - smashline::Agent::new("miigunner_grenadelauncher") - .acmd("game_explode", miigunner_grenadelauncher_explode_game) - .install(); - smashline::Agent::new("miigunner_gunnercharge") - .acmd("game_shoot", miigunner_gunnercharge_shoot_game) - .acmd("sound_shoot", miigunner_gunnercharge_shoot_sound) - .install(); - smashline::Agent::new("miigunner_stealthbomb") - .acmd("effect_tame", miigunner_stealthbomb_tame_effect) - .install(); - smashline::Agent::new("miigunner_attackairf_bullet") - .acmd("effect_fly", miigunner_attackairf_bullet_fly_effect) - .install(); - smashline::Agent::new("miigunner_supermissile") - .acmd("game_straight", miigunner_supermissile_straight_game) - .acmd("game_sburst", miigunner_supermissile_burst_game) - .acmd("effect_sburst", miigunner_supermissile_burst_effect) - .acmd("sound_sburst", miigunner_supermissile_burst_sound) - .install(); - smashline::Agent::new("miigunner_fullthrottle") - .acmd("game_final", miigunner_fullthrottle_final_game) - .install(); - smashline::Agent::new("miigunner_rapidshot_bullet") - .acmd("game_fly", miigunner_rapidshot_bullet_fly_game) - .install(); - smashline::Agent::new("miigunner_bottomshoot") - .acmd("game_shoot", miigunner_bottomshoot_shoot_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miigunner/src/acmd/smashes.rs b/fighters/miigunner/src/acmd/smashes.rs index b47d264776..8a9ba26354 100644 --- a/fighters/miigunner/src/acmd/smashes.rs +++ b/fighters/miigunner/src/acmd/smashes.rs @@ -1,51 +1,50 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 180, 100, 7, 0, 3.0, 0.0, 7.5, 45.0, Some(0.0), Some(7.5), Some(45.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 0, 100, 5, 0, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(7.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 180, 100, 7, 0, 3.0, 0.0, 7.5, 45.0, Some(0.0), Some(7.5), Some(45.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 0, 100, 5, 0, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(7.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 7.0, 0.0, 7.5, 20.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.5, 0.0, 7.5, 48.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 7.0, 0.0, 7.5, 20.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.5, 0.0, 7.5, 48.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 96, 100, 30, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 86, 100, 30, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 2.0, 3.5, 3.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 3.0, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 96, 100, 30, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 86, 100, 30, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 2.0, 3.5, 3.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("armr"), 3.0, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: 8.0, y: 23.0 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hit1, 6, false); AttackModule::set_no_finish_camera(boma, 0, true, false); @@ -54,14 +53,14 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 3, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 6.0, 7.2, -2.3, 0.0, Some(5.8), Some(-0.8), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 6.0, 7.2, -2.3, 0.0, Some(5.8), Some(-0.8), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -3.0, y: 30.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_finish_camera(boma, 0, true, false); @@ -69,28 +68,28 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 2, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 90, 30, 25, 80, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 90, 30, 25, 80, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -8.0, y: 16.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 5, false); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 120, 100, 30, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 116, 100, 30, 44, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 120, 100, 30, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 116, 100, 30, 44, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -12.0, y: 12.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 5, false); AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hit1, 5, false); @@ -100,53 +99,51 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 3, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 8.0, 7.8, -0.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 8.0, 7.8, -0.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn miigunner_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 40, 110, 0, 40, 5.0, 0.0, 5.0, 18.0, Some(0.0), Some(5.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 40, 110, 0, 40, 5.0, 0.0, 5.0, 18.0, Some(0.0), Some(5.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 40, 88, 0, 70, 5.5, 0.0, 5.5, -17.0, Some(0.0), Some(5.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 88, 0, 70, 5.5, 0.0, 5.5, -17.0, Some(0.0), Some(5.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attacks4", miigunner_attack_s4_s_game) - .acmd("game_attackhi4", miigunner_attack_hi4_game) - .acmd("game_attacklw4", miigunner_attack_lw4_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials.rs b/fighters/miigunner/src/acmd/specials.rs deleted file mode 100644 index 6740640c10..0000000000 --- a/fighters/miigunner/src/acmd/specials.rs +++ /dev/null @@ -1,472 +0,0 @@ -use super::*; - -unsafe extern "C" fn miigunner_special_n1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); - } - -} - -unsafe extern "C" fn miigunner_special_n1_fire_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 10.0); - } - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - WorkModule::off_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); - } - } - frame(lua_state, 3.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 3.0, 5.0, 5.0); - } - else { - FT_MOTION_RATE(fighter, 1.0); - } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ArticleModule::remove_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - } - else { - ArticleModule::shoot_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); - } - } - frame(lua_state, 5.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 8.0, 40.0, 37.0); - } - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miigunner_special_n1_fire_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 3.0); - } - } - frame(lua_state, 2.6); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_sb_tama"), -1); - } - frame(lua_state, 2.8); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.85); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); - } - } - else { - EFFECT(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } - -} - -unsafe extern "C" fn miigunner_special_n1_fire_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("se_miigunner_final01")); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(fighter, Hash40::new("se_miigunner_final01")); - PLAY_SE(fighter, Hash40::new("se_miigunner_final04")); - } - } - -} - -unsafe extern "C" fn miigunner_special_n2_loop_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.0); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_RAPID_SHOT_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn miigunner_special_n3_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); - } - frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 30.0, 6.0); - frame(lua_state, 25.0); - -} - -unsafe extern "C" fn miigunner_special_n3_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); - LAST_EFFECT_SET_RATE(fighter, 0.15); - } -} - -unsafe extern "C" fn miigunner_special_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 23.0, 30.0); - if is_excute(fighter) { - ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GRENADELAUNCHER, false, 0); - } -} - -unsafe extern "C" fn miigunner_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 17.0); - frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 64.0, 36.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_FLAMEPILLAR, false, 0); - } -} - -unsafe extern "C" fn miigunner_special_s3_super_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 23.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_MIIMISSILE_FLAG_WEAPON); - } -} - -unsafe extern "C" fn miigunner_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 11.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_BOTTOM_SHOOT_FLAG_JUMP); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_BOTTOMSHOOT, false, 0); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } -} - -unsafe extern "C" fn miigunner_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - let handle = EffectModule::req_follow(boma, Hash40::new("miigunner_bottom_shot"), Hash40::new("armr"), &Vector3f::new(6.5, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - let handle = VarModule::get_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); - EffectModule::set_rate(boma, handle as u32, 1.0); - if VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { - EffectModule::set_rgb(boma, handle as u32, 0.15, 0.55, 10.0); - } - } - frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn miigunner_special_hi1_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_bottom_shot"), false, false); - } -} - -unsafe extern "C" fn miigunner_special_hi2_squat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.25); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miigunner_special_hi2_squat_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - else { - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn miigunner_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn miigunner_special_hi3_start_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.5); -} - -unsafe extern "C" fn miigunner_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.85); -} - -unsafe extern "C" fn miigunner_special_lw1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 3.0, 6.5, 4.0); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn miigunner_special_lw3_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 5.0); -} - -unsafe extern "C" fn miigunner_special_lw3_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } -} - -unsafe extern "C" fn miigunner_special_lw3_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EffectModule::kill_kind(boma, Hash40::new("miigunner_absorber"), false, false); - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - COL_NORMAL(fighter); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.7, 1, 0.6); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 3, 0, 0.2, 0.5, 0); - } - wait(lua_state, 3.0); -} - -unsafe extern "C" fn miigunner_special_lw3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 9.0); - if is_excute(fighter) { - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miigunner_special_lw3_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn miigunner_special_lw3_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miigunner_attackhard_s01")); - } -} - -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_specialn1start", miigunner_special_n1_start_game) - .acmd("game_specialairn1start", miigunner_special_n1_start_game) - .acmd("game_specialn1firemax", miigunner_special_n1_fire_max_game) - .acmd("game_specialairn1firemax", miigunner_special_n1_fire_max_game) - .acmd("effect_specialn1firemax", miigunner_special_n1_fire_max_effect) - .acmd("effect_specialairn1firemax", miigunner_special_n1_fire_max_effect) - .acmd("sound_specialn1firemax", miigunner_special_n1_fire_max_sound) - .acmd("sound_specialairn1firemax", miigunner_special_n1_fire_max_sound) - .acmd("game_specialn2loop", miigunner_special_n2_loop_game) - .acmd("game_specialairn2loop", miigunner_special_n2_loop_game) - .acmd("game_specialn3start", miigunner_special_n3_start_game) - .acmd("game_specialairn3start", miigunner_special_n3_start_game) - .acmd("effect_specialn3start", miigunner_special_n3_start_effect) - .acmd("game_specialn3end", miigunner_special_n3_end_game) - .acmd("game_specialairn3end", miigunner_special_n3_end_game) - .acmd("game_specials1", miigunner_special_s1_game) - .acmd("game_specialairs1", miigunner_special_s1_game) - .acmd("game_specials32", miigunner_special_s3_super_game) - .acmd("game_specialairs32", miigunner_special_s3_super_game) - .acmd("game_specialhi1", miigunner_special_hi1_game) - .acmd("game_specialairhi1", miigunner_special_hi1_game) - .acmd("effect_specialhi1", miigunner_special_hi1_effect) - .acmd("effect_specialairhi1", miigunner_special_hi1_effect) - .acmd("effect_landingfallspecial", miigunner_special_hi1_landing_effect) - .acmd("game_specialhi2squat", miigunner_special_hi2_squat_game) - .acmd("game_specialairhi2squat", miigunner_special_hi2_squat_game) - .acmd("effect_specialhi2squat", miigunner_special_hi2_squat_effect) - .acmd("effect_specialairhi2squat", miigunner_special_hi2_squat_effect) - .acmd("game_specialhi2", miigunner_special_hi2_game) - .acmd("game_specialhi3start", miigunner_special_hi3_start_game) - .acmd("game_specialairhi3start", miigunner_special_hi3_start_game) - .acmd("game_specialhi3", miigunner_special_hi3_game) - .acmd("game_speciallw1start", miigunner_special_lw1_start_game) - .acmd("game_specialairlw1start", miigunner_special_lw1_start_game) - .acmd("game_speciallw3start", miigunner_special_lw3_start_game) - .acmd("game_specialairlw3start", miigunner_special_lw3_start_game) - .acmd("game_speciallw3hold", miigunner_special_lw3_hold_game) - .acmd("game_specialairlw3hold", miigunner_special_lw3_hold_game) - .acmd("effect_speciallw3hold", miigunner_special_lw3_hold_effect) - .acmd("effect_specialairlw3hold", miigunner_special_lw3_hold_effect) - .acmd("game_speciallw3end", miigunner_special_lw3_end_game) - .acmd("game_specialairlw3end", miigunner_special_lw3_end_game) - .acmd("effect_speciallw3end", miigunner_special_lw3_end_effect) - .acmd("effect_specialairlw3end", miigunner_special_lw3_end_effect) - .acmd("sound_speciallw3end", miigunner_special_lw3_end_sound) - .acmd("sound_specialairlw3end", miigunner_special_lw3_end_sound) - .install(); -} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/mod.rs b/fighters/miigunner/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..8157d478f9 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_hi.rs b/fighters/miigunner/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..aea6d3cb86 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_hi.rs @@ -0,0 +1,162 @@ +use super::*; + +// ================================================================================================ +// ======================================== LUNAR LAUNCH ========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_BOTTOM_SHOOT_FLAG_JUMP); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_BOTTOMSHOOT, false, 0); + } + frame(lua_state, 14.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } +} + +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + let handle = EffectModule::req_follow(boma, Hash40::new("miigunner_bottom_shot"), Hash40::new("armr"), &Vector3f::new(6.5, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); + } + frame(lua_state, 9.0); + if is_excute(agent) { + let handle = VarModule::get_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); + EffectModule::set_rate(boma, handle as u32, 1.0); + if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { + EffectModule::set_rgb(boma, handle as u32, 0.15, 0.55, 10.0); + } + } + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +// ================================================================================================ +// ====================================== FLASH POINT DIVE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi2squat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 0.25); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialhi2squat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 11.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + else { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 8.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +// ================================================================================================ +// ======================================= JETPACK JOYRIDE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.5); +} + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.85); +} + +unsafe extern "C" fn effect_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_bottom_shot"), false, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + + agent.acmd("game_specialhi2squat", game_specialhi2squat); + agent.acmd("game_specialairhi2squat", game_specialhi2squat); + agent.acmd("effect_specialhi2squat", effect_specialhi2squat); + agent.acmd("effect_specialairhi2squat", effect_specialhi2squat); + + agent.acmd("game_specialhi2", game_specialhi2); + + agent.acmd("game_specialhi3start", game_specialhi3start); + agent.acmd("game_specialairhi3start", game_specialhi3start); + + agent.acmd("game_specialhi3", game_specialhi3); + + agent.acmd("effect_landingfallspecial", effect_landingfallspecial); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_lw.rs b/fighters/miigunner/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..3f445e1e48 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_lw.rs @@ -0,0 +1,121 @@ +use super::*; + +// ================================================================================================ +// ======================================== ECHO REFLECTOR ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 3.0, 6.5, 4.0); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_MAGIC, *ATTACK_REGION_ENERGY); + } +} + +// ================================================================================================ +// ====================================== ABSORBING VORTEX ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); +} + +unsafe extern "C" fn game_speciallw3hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } +} + +unsafe extern "C" fn effect_speciallw3hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EffectModule::kill_kind(boma, Hash40::new("miigunner_absorber"), false, false); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + COL_NORMAL(agent); + if is_excute(agent) { + FLASH(agent, 0.5, 0.7, 1, 0.6); + } + wait(lua_state, 2.0); + if is_excute(agent) { + FLASH_FRM(agent, 3, 0, 0.2, 0.5, 0); + } + wait(lua_state, 3.0); +} + +unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 9.0); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miigunner_attackhard_s01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1start", game_speciallw1start); + agent.acmd("game_specialairlw1start", game_speciallw1start); + + agent.acmd("game_speciallw3start", game_speciallw3start); + agent.acmd("game_specialairlw3start", game_speciallw3start); + + agent.acmd("game_speciallw3hold", game_speciallw3hold); + agent.acmd("game_specialairlw3hold", game_speciallw3hold); + agent.acmd("effect_speciallw3hold", effect_speciallw3hold); + agent.acmd("effect_specialairlw3hold", effect_speciallw3hold); + + agent.acmd("game_speciallw3end", game_speciallw3end); + agent.acmd("game_specialairlw3end", game_speciallw3end); + agent.acmd("effect_speciallw3end", effect_speciallw3end); + agent.acmd("effect_specialairlw3end", effect_speciallw3end); + agent.acmd("sound_speciallw3end", sound_speciallw3end); + agent.acmd("sound_specialairlw3end", sound_speciallw3end); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_n.rs b/fighters/miigunner/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..deb84aa679 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_n.rs @@ -0,0 +1,209 @@ +use super::*; + +// ================================================================================================ +// ================================ CHARGE BLAST / NEON CANNON ==================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); + } +} + +unsafe extern "C" fn game_specialnifiremax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 10.0); + } + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + WorkModule::off_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); + } + } + frame(lua_state, 3.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 3.0, 5.0, 5.0); + } + else { + FT_MOTION_RATE(agent, 1.0); + } + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ArticleModule::remove_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + } + else { + ArticleModule::shoot_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); + } + } + frame(lua_state, 5.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 8.0, 40.0, 37.0); + } + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); + } + } + frame(lua_state, 2.6); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); + } + frame(lua_state, 2.8); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + } + } + else { + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); + } + } +} + +// ================================================================================================ +// ======================================== LASER BLAZE =========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_RAPID_SHOT_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ========================================= BOMBS AWAY =========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); + } + frame(lua_state, 16.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 30.0, 6.0); + frame(lua_state, 25.0); +} + +unsafe extern "C" fn effect_specialn3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); + LAST_EFFECT_SET_RATE(agent, 0.15); + } +} + +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 30.0); + if is_excute(agent) { + ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GRENADELAUNCHER, false, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1start", game_specialn1start); + agent.acmd("game_specialairn1start", game_specialn1start); + + agent.acmd("game_specialn1firemax", game_specialnifiremax); + agent.acmd("game_specialairn1firemax", game_specialnifiremax); + agent.acmd("effect_specialn1firemax", effect_specialn1firemax); + agent.acmd("effect_specialairn1firemax", effect_specialn1firemax); + agent.acmd("sound_specialn1firemax", sound_specialn1firemax); + agent.acmd("sound_specialairn1firemax", sound_specialn1firemax); + + agent.acmd("game_specialn2loop", game_specialn2loop); + agent.acmd("game_specialairn2loop", game_specialn2loop); + + agent.acmd("game_specialn3start", game_specialn3start); + agent.acmd("game_specialairn3start", game_specialn3start); + agent.acmd("effect_specialn3start", effect_specialn3start); + + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialn3end); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_s.rs b/fighters/miigunner/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..e031251fbe --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_s.rs @@ -0,0 +1,38 @@ +use super::*; + +// ================================================================================================ +// ======================================== FLAME PILLAR ========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 17.0); + frame(lua_state, 21.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 64.0, 36.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_FLAMEPILLAR, false, 0); + } +} + +// ================================================================================================ +// ======================================== PULSE MISSILE ========================================= +// ================================================================================================ + +unsafe extern "C" fn game_specials32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 23.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_MIIMISSILE_FLAG_WEAPON); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + + agent.acmd("game_specials32", game_specials32); + agent.acmd("game_specialairs32", game_specials32); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/throws.rs b/fighters/miigunner/src/acmd/throws.rs index e3e725bca2..36a352adad 100644 --- a/fighters/miigunner/src/acmd/throws.rs +++ b/fighters/miigunner/src/acmd/throws.rs @@ -1,259 +1,251 @@ use super::*; -unsafe extern "C" fn miigunner_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.5, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miigunner_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.7, 0.0, Some(0.0), Some(6.7), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.7, 0.0, Some(0.0), Some(6.7), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miigunner_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.4, -4.0, Some(0.0), Some(6.4), Some(-14.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.4, -4.0, Some(0.0), Some(6.4), Some(-14.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miigunner_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 90, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 90, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 100, 140, 10, 5.5, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 100, 140, 10, 5.5, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13.0, 0.0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 9, -2, 0); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 34.0, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 12.0, 34.0, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 8.0); + // FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 8.0); // } - if is_excute(fighter) { + if is_excute(agent) { // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); - // ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 52, 56, 2, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + // ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 52, 56, 2, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } // else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 60, 45, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 60, 45, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); //} - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 10.0, 21.0, 9.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 10.0, 21.0, 9.0); // } // else { - FT_MOTION_RATE_RANGE(fighter, 10.0, 20.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 20.0, 7.0); // } - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 20.0); - // if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 20.0, 50.0, 18.0); + // if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 20.0, 50.0, 18.0); // } - if is_excute(fighter) { - // if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + // if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, -1); ArticleModule::change_motion(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, Hash40::new("fly_throw_b"), false, -1.0); // } } // frame(lua_state, 21.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 21.0, 50.0, 24.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 21.0, 50.0, 24.0); // } - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 142, 40, 0, 98, 18.0, 0.0, 22.0, -31.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 142, 40, 0, 98, 18.0, 0.0, 22.0, -31.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // } // frame(lua_state, 24.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear_all(boma); // } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowb_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"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn miigunner_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 4.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18.0, -27.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.15, 0.15); - // LAST_EFFECT_SET_RATE(fighter, 1.25); - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_RATE(fighter, 2.0); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18.0, -27.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.15, 0.15); + // LAST_EFFECT_SET_RATE(agent, 1.25); + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_RATE(agent, 2.0); // } // } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } // frame(lua_state, 19.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 13, -13, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 13, -13, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); // } // } frame(lua_state, 20.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 19.0, -26.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 19.0, -26.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); // } } } -unsafe extern "C" fn miigunner_throw_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack01")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } // wait(lua_state, 9.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } // } frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); } // frame(lua_state, 22.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s04")); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s04")); // } // } } -unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 12.0); + // FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 12.0); // } - if is_excute(fighter) { + if is_excute(agent) { // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); - // ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 54, 2, 76, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + // ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 54, 2, 76, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } // else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 100, 40, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 100, 40, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 90, 100, 40, 0, 10.0, 0.0, 42.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 90, 100, 40, 0, 10.0, 0.0, 42.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // else { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); @@ -261,19 +253,19 @@ unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { // } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } // frame(lua_state, 28.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 28.0, 52.0, 27.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 28.0, 52.0, 27.0); // } // else { - FT_MOTION_RATE_RANGE(fighter, 28.0, 52.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 28.0, 52.0, 17.0); // } - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 80, 0, 14.0, 0.0, 50.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 80, 0, 14.0, 0.0, 50.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // else { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); @@ -281,163 +273,136 @@ unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { // } } // frame(lua_state, 30.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear_all(boma); // } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi_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"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); - } + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi2_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"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); - } -} - -unsafe extern "C" fn miigunner_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(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.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_RATE(fighter, 2.0); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_RATE(agent, 2.0); // } // } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 36.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 36.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); // } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.75); } frame(lua_state, 28.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 43.0, 0.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 43.0, 0.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.5, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.5, 0, 0, 0, 0, 0, 0, true); // } } } -unsafe extern "C" fn miigunner_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack01")); } frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } // else { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } } frame(lua_state, 28.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s04")); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s04")); // } // else { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } } } -unsafe extern "C" fn miigunner_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 92, 38, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 92, 38, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: -3.0, z: 0.0}); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("miigunner_rapidshot_bullet") - .acmd("game_flythrowb", miigunner_rapidshot_bullet_flythrowb_game) - .acmd("game_flythrowhi", miigunner_rapidshot_bullet_flythrowhi_game) - .acmd("game_flythrowhi2", miigunner_rapidshot_bullet_flythrowhi2_game) - .install(); - smashline::Agent::new("miigunner") - .acmd("game_catch", miigunner_catch_game) - .acmd("game_catchdash", miigunner_catch_dash_game) - .acmd("game_catchturn", miigunner_catch_turn_game) - .acmd("game_throwf", miigunner_throw_f_game) - .acmd("game_throwb", miigunner_throw_b_game) - .acmd("effect_throwb", miigunner_throw_b_effect) - .acmd("sound_throwb", miigunner_throw_b_sound) - .acmd("game_throwhi", miigunner_throw_hi_game) - .acmd("effect_throwhi", miigunner_throw_hi_effect) - .acmd("sound_throwhi", miigunner_throw_hi_sound) - .acmd("game_throwlw", miigunner_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + agent.acmd("sound_throwb", sound_throwb); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/tilts.rs b/fighters/miigunner/src/acmd/tilts.rs index 8ebfda434e..3e09d31c14 100644 --- a/fighters/miigunner/src/acmd/tilts.rs +++ b/fighters/miigunner/src/acmd/tilts.rs @@ -1,104 +1,104 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 10.0, 5.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 56, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 56, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(15.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(2.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(15.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(2.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 3.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 3.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_POWER(fighter, 1, 10.0); - ATK_POWER(fighter, 2, 10.0); - ATK_POWER(fighter, 3, 10.0); + if is_excute(agent) { + ATK_POWER(agent, 1, 10.0); + ATK_POWER(agent, 2, 10.0); + ATK_POWER(agent, 3, 10.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 56, 0, 56, 1.5, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 56, 0, 56, 1.5, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); AttackModule::set_size(boma, 2, 2.0); AttackModule::set_size(boma, 3, 2.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn miigunner_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 95, 100, 0, 50, 6.0, 0.0, 6.0, 9.5, Some(0.0), Some(13.0), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 9.0, 90, 80, 0, 50, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 95, 100, 0, 50, 6.0, 0.0, 6.0, 9.5, Some(0.0), Some(13.0), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 9.0, 90, 80, 0, 50, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.0, 95, 100, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.0, 95, 100, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 95, 70, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 95, 70, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn miigunner_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 85, 50, 0, 82, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 85, 50, 0, 82, 3.5, 4.5, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 80, 79, 0, 70, 6.0, 0.0, 1.6, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 85, 50, 0, 82, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 85, 50, 0, 82, 3.5, 4.5, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 80, 79, 0, 70, 6.0, 0.0, 1.6, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 41.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 41.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attacks3", miigunner_attack_s3_game) - .acmd("effect_attacks3", miigunner_attack_s3_effect) - .acmd("game_attackhi3", miigunner_attack_hi3_game) - .acmd("game_attacklw3", miigunner_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miigunner/src/attackairf_bullet/acmd.rs b/fighters/miigunner/src/attackairf_bullet/acmd.rs new file mode 100644 index 0000000000..4dc7214f4d --- /dev/null +++ b/fighters/miigunner/src/attackairf_bullet/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_fly", effect_fly); +} \ No newline at end of file diff --git a/fighters/miigunner/src/attackairf_bullet/mod.rs b/fighters/miigunner/src/attackairf_bullet/mod.rs new file mode 100644 index 0000000000..737c53e5bf --- /dev/null +++ b/fighters/miigunner/src/attackairf_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_attackairf_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/bottomshoot/acmd.rs b/fighters/miigunner/src/bottomshoot/acmd.rs new file mode 100644 index 0000000000..3d0cb56982 --- /dev/null +++ b/fighters/miigunner/src/bottomshoot/acmd.rs @@ -0,0 +1,19 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + if VarModule::get_float(owner_module_accessor.object(), vars::miigunner::status::CURRENT_CHARGE) <= 10.0 { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } + else { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} \ No newline at end of file diff --git a/fighters/miigunner/src/bottomshoot/mod.rs b/fighters/miigunner/src/bottomshoot/mod.rs new file mode 100644 index 0000000000..2b62c61361 --- /dev/null +++ b/fighters/miigunner/src/bottomshoot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_bottomshoot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/fullthrottle/acmd.rs b/fighters/miigunner/src/fullthrottle/acmd.rs new file mode 100644 index 0000000000..038ce905b5 --- /dev/null +++ b/fighters/miigunner/src/fullthrottle/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pos2dim = Vector3f {x: 0.0, y: 40.0, z: 0.0}; + PostureModule::set_pos(boma, &pos2dim); + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); +} \ No newline at end of file diff --git a/fighters/miigunner/src/fullthrottle/mod.rs b/fighters/miigunner/src/fullthrottle/mod.rs new file mode 100644 index 0000000000..92508be39f --- /dev/null +++ b/fighters/miigunner/src/fullthrottle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_fullthrottle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/grenadelauncher/acmd.rs b/fighters/miigunner/src/grenadelauncher/acmd.rs new file mode 100644 index 0000000000..8844e08ac2 --- /dev/null +++ b/fighters/miigunner/src/grenadelauncher/acmd.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, 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_BOMB); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 18); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + ATTACK(agent, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 12.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/miigunner/src/grenadelauncher/mod.rs b/fighters/miigunner/src/grenadelauncher/mod.rs new file mode 100644 index 0000000000..ef7b1a51c5 --- /dev/null +++ b/fighters/miigunner/src/grenadelauncher/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_grenadelauncher"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/gunnercharge/acmd.rs b/fighters/miigunner/src/gunnercharge/acmd.rs new file mode 100644 index 0000000000..ac81ceb26f --- /dev/null +++ b/fighters/miigunner/src/gunnercharge/acmd.rs @@ -0,0 +1,44 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 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_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + AttackModule::enable_safe_pos(boma); + } + for _ in 0..1000 { + wait(lua_state, 1.0); + if is_excute(agent) { + let motion_vec = Vector3f{x: 0.5, y: 1.0, z: 1.0}; + KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + } + } +} + +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n02")); + } + else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n03")); + } + else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n05")); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} \ No newline at end of file diff --git a/fighters/miigunner/src/gunnercharge/mod.rs b/fighters/miigunner/src/gunnercharge/mod.rs new file mode 100644 index 0000000000..a8a9eae4db --- /dev/null +++ b/fighters/miigunner/src/gunnercharge/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_gunnercharge"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/lib.rs b/fighters/miigunner/src/lib.rs index 5537dac979..9c9ebab32c 100644 --- a/fighters/miigunner/src/lib.rs +++ b/fighters/miigunner/src/lib.rs @@ -4,8 +4,20 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod attackairf_bullet; +mod bottomshoot; +mod fullthrottle; +mod grenadelauncher; +mod gunnercharge; +mod rapidshot_bullet; +mod stealthbomb; +mod stealthbomb_s; +mod supermissile; use smash::{ lib::{ @@ -37,9 +49,22 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miigunner"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + attackairf_bullet::install(); + bottomshoot::install(); + fullthrottle::install(); + grenadelauncher::install(); + gunnercharge::install(); + rapidshot_bullet::install(); + stealthbomb::install(); + stealthbomb_s::install(); + supermissile::install(); } \ No newline at end of file diff --git a/fighters/miigunner/src/opff.rs b/fighters/miigunner/src/opff.rs index e20790e0fc..cecd34c0d2 100644 --- a/fighters/miigunner/src/opff.rs +++ b/fighters/miigunner/src/opff.rs @@ -316,37 +316,6 @@ pub unsafe fn miigunner_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn miigunner_missile_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - // Ensure the boma's owner is Mii Gunner - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let gunner_boma = &mut *(*gunner).module_accessor; - if StatusModule::status_kind(boma) == *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_STRAIGHT - && gunner_boma.is_cat_flag(Cat1::SpecialS) - && VarModule::is_flag(gunner, vars::miigunner::instance::DETONATE_READY) { - if WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ATTACK) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ATTACK) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_SPECIAL) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_JUMP) { - StatusModule::change_status_request_from_script(boma, *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_S_BURST, false); - VarModule::on_flag(gunner, vars::miigunner::status::MISSILE_DETONATE); - VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); - gunner_boma.clear_commands(Cat1::SpecialS); // Clear command so Gunner doesn't immediately fire another missile - } - } - } - } -} - -pub fn install() { - smashline::Agent::new("miigunner") - .on_line(Main, miigunner_frame_wrapper) - .install(); - smashline::Agent::new("miigunner_supermissile") - .on_line(Main, miigunner_missile_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miigunner_frame_wrapper); } diff --git a/fighters/miigunner/src/rapidshot_bullet/acmd.rs b/fighters/miigunner/src/rapidshot_bullet/acmd.rs new file mode 100644 index 0000000000..b09bf8b313 --- /dev/null +++ b/fighters/miigunner/src/rapidshot_bullet/acmd.rs @@ -0,0 +1,57 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + } +} + +unsafe extern "C" fn game_flythrowhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_flythrowb", game_flythrowb); + agent.acmd("game_flythrowhi", game_flythrowhi); + agent.acmd("game_flythrowhi2", game_flythrowhi2); +} \ No newline at end of file diff --git a/fighters/miigunner/src/rapidshot_bullet/mod.rs b/fighters/miigunner/src/rapidshot_bullet/mod.rs new file mode 100644 index 0000000000..9e62092748 --- /dev/null +++ b/fighters/miigunner/src/rapidshot_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_rapidshot_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/status.rs b/fighters/miigunner/src/status/mod.rs similarity index 66% rename from fighters/miigunner/src/status.rs rename to fighters/miigunner/src/status/mod.rs index f08d2a4323..cca4ade626 100644 --- a/fighters/miigunner/src/status.rs +++ b/fighters/miigunner/src/status/mod.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import // Prevents side special from being used if a missile is present unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -22,18 +24,12 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn miigunner_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_MIIGUNNER { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("miigunner") - .on_start(miigunner_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb/acmd.rs b/fighters/miigunner/src/stealthbomb/acmd.rs new file mode 100644 index 0000000000..ea5c3a2f24 --- /dev/null +++ b/fighters/miigunner/src/stealthbomb/acmd.rs @@ -0,0 +1,51 @@ +use super::*; + +unsafe extern "C" fn effect_tame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 5.0); + } + frame(lua_state, 100.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.5, false, 0, 0, 0, 0 ,0, false, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.15, 10.0); + EffectModule::set_rgb(boma, flash_handle as u32, 0.15, 0.15, 10.0); + EffectModule::set_rate(boma, flash_handle as u32, 0.3); + VarModule::set_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER, flash_handle); + } + } + for h in 101..=120 { + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = VarModule::get_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER); + let start_color = Vector3f { x: 0.15, y: 0.15, z: 10.0 }; + let end_color = Vector3f { x: 10.0, y: 0.15, z: 0.15 }; + // Smoothly interpolate from starting to ending color + let blend_vector = Vector3f { + x: start_color.x + ((end_color.x - start_color.x) * (((h as f32) - 100.0) / 20.0)), + y: start_color.y + ((end_color.y - start_color.y) * (((h as f32) - 100.0) / 20.0)), + z: start_color.z + ((end_color.z - start_color.z) * (((h as f32) - 100.0) / 20.0)) + }; + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + } + } + wait(lua_state, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_tame", effect_tame); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb/mod.rs b/fighters/miigunner/src/stealthbomb/mod.rs new file mode 100644 index 0000000000..9f626294fb --- /dev/null +++ b/fighters/miigunner/src/stealthbomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_stealthbomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb_s/acmd.rs b/fighters/miigunner/src/stealthbomb_s/acmd.rs new file mode 100644 index 0000000000..193bfad6d0 --- /dev/null +++ b/fighters/miigunner/src/stealthbomb_s/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + //AREA_WIND_2ND_RAD(0, 1, 0.02, 1000, 1, 0, 0, 12); + } + frame(lua_state, 15.0); + if is_excute(agent) { + //AreaModule::erase_wind(boma, 0); + } +} + +unsafe extern "C" fn effect_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); + agent.acmd("effect_move", effect_move); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb_s/mod.rs b/fighters/miigunner/src/stealthbomb_s/mod.rs new file mode 100644 index 0000000000..507cfb4896 --- /dev/null +++ b/fighters/miigunner/src/stealthbomb_s/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_stealthbomb_s"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/acmd.rs b/fighters/miigunner/src/supermissile/acmd.rs new file mode 100644 index 0000000000..cc8c685640 --- /dev/null +++ b/fighters/miigunner/src/supermissile/acmd.rs @@ -0,0 +1,91 @@ +use super::*; + +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, agent.battle_object_id as i32); + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::on_flag(gunner, vars::miigunner::instance::DETONATE_READY); + } + } +} + +unsafe extern "C" fn game_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); + } + frame(lua_state, 1.0); + if is_excute(agent) { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 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_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 4.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + EFFECT(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 0.5, 10.0, 25.0); + } + else { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + } + } +} + +unsafe extern "C" fn sound_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_l")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_s")); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_straight", game_straight); + agent.acmd("game_sburst", game_sburst); + agent.acmd("effect_sburst", effect_sburst); + agent.acmd("sound_sburst", sound_sburst); +} \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/mod.rs b/fighters/miigunner/src/supermissile/mod.rs new file mode 100644 index 0000000000..d901f209f5 --- /dev/null +++ b/fighters/miigunner/src/supermissile/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("miigunner_supermissile"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/opff.rs b/fighters/miigunner/src/supermissile/opff.rs new file mode 100644 index 0000000000..359cbdcce8 --- /dev/null +++ b/fighters/miigunner/src/supermissile/opff.rs @@ -0,0 +1,34 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn miigunner_missile_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + // Ensure the boma's owner is Mii Gunner + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let gunner_boma = &mut *(*gunner).module_accessor; + if StatusModule::status_kind(boma) == *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_STRAIGHT + && gunner_boma.is_cat_flag(Cat1::SpecialS) + && VarModule::is_flag(gunner, vars::miigunner::instance::DETONATE_READY) { + if WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ATTACK) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ATTACK) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_SPECIAL) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_JUMP) { + StatusModule::change_status_request_from_script(boma, *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_S_BURST, false); + VarModule::on_flag(gunner, vars::miigunner::status::MISSILE_DETONATE); + VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); + gunner_boma.clear_commands(Cat1::SpecialS); // Clear command so Gunner doesn't immediately fire another missile + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miigunner_missile_frame); +} diff --git a/fighters/miiswordsman/src/acmd/aerials.rs b/fighters/miiswordsman/src/acmd/aerials.rs index 9509ee7291..c168f9ceb0 100644 --- a/fighters/miiswordsman/src/acmd/aerials.rs +++ b/fighters/miiswordsman/src/acmd/aerials.rs @@ -1,231 +1,232 @@ - use super::*; -unsafe extern "C" fn attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.44); // 6F startup + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.44); // 6F startup } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 361, 56, 0, 59, 3.2, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 57, 0, 62, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 361, 58, 0, 62, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 361, 56, 0, 59, 3.2, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 57, 0, 62, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 361, 58, 0, 62, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/(38.0-22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/(38.0-22.0)); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.77); // 10F startup + FT_MOTION_RATE(agent, 0.77); // 10F startup } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 4.0, 66, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 4.0, 66, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 3.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 9.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 75, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 3.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 9.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 75, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 9.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 50, 130, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 9.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 50, 130, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } // Motion rates for this were done this way to best replicate previous hitbox coverage -unsafe extern "C" fn attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5) + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5) } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(37.0-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(37.0-12.0)); AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -unsafe extern "C" fn attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.88); // 10F startup + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.88); // 10F startup } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 220, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 250, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 365, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 365, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 220, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 250, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 365, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 365, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attackairn", attack_air_n_game) - .acmd("game_attackairf", attack_air_f_game) - .acmd("game_attackairb", attack_air_b_game) - .acmd("expression_attackairb", attack_air_b_expression) - .acmd("game_attackairhi", attack_air_hi_game) - .acmd("game_attackairlw", attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/miiswordsman/src/acmd/ground.rs b/fighters/miiswordsman/src/acmd/ground.rs index a7bd4580de..d0a0056a6a 100644 --- a/fighters/miiswordsman/src/acmd/ground.rs +++ b/fighters/miiswordsman/src/acmd/ground.rs @@ -1,125 +1,120 @@ - use super::*; -unsafe extern "C" fn attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 25, 0, 27, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(8.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 25, 0, 27, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(8.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Launching hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 78, 20, 0, 30, 3.5, 0.0, 6.2, 10.0, Some(0.0), Some(6.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 78, 20, 0, 30, 3.5, 0.0, 6.2, 10.0, Some(0.0), Some(6.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Locking hitboxes - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 25, 0, 30, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 25, 0, 30, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 30, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 30, 70, 0, 70, 3.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 30, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 30, 70, 0, 70, 3.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Body/Sword Hitboxes - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.5, 361, 80, 0, 50, 3.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.5, 361, 80, 0, 50, 3.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } } -unsafe extern "C" fn attack_dash_expression(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_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn expression_attackdash(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_INTP, *SLOPE_STATUS_LR, 3); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attack11", attack_11_game) - .acmd("game_attack12", attack_12_game) - .acmd("game_attack13", attack_13_game) - .acmd("game_attackdash", attack_dash_game) - .acmd("expression_attackdash", attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/miiswordsman/src/acmd/mod.rs b/fighters/miiswordsman/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/miiswordsman/src/acmd/mod.rs +++ b/fighters/miiswordsman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 4c2845ff59..2b3e5e114e 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -1,419 +1,124 @@ - use super::*; use smash::app::sv_battle_object; -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_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(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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_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_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_miiswordsman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miiswordsman_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_miiswordsman_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miiswordsman_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miiswordsman_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miiswordsman_step_left_m")); } } -unsafe extern "C" fn 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, 16.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 miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - -} - -// #[acmd_script( agent = "miiswordsman_tornadoshot", script = "game_fly" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); -// ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 366, 100, 30, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(9.5), Some(3.2), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 50, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// } -// frame(lua_state, 37.0); -// if is_excute(fighter) { -// AttackModule::clear_all(boma); -// ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// } -// } - -unsafe extern "C" fn miiswordsman_wave_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } -} - -unsafe extern "C" fn miiswordsman_wave_fly_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let mut lead_wave : u32 = std::u32::MAX; - let mut wave_2 : u32 = std::u32::MAX; - let mut wave_3 : u32 = std::u32::MAX; - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_hikari_syuriken"), false, true); - lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, lead_wave, 0.7); - - wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_2, 0.7); - EffectModule::set_alpha(boma, wave_2, 0.4); - //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! - if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - wait(lua_state, 4.0); - if is_excute(fighter) { - EffectModule::set_rate(boma, lead_wave, 0.000001); - EffectModule::set_rate(boma, wave_2, 0.000001); - EffectModule::set_alpha(boma, wave_2, 0.4); - wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_3, 0.7); - EffectModule::set_alpha(boma, wave_3, 0.4); - if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - wait(lua_state, 4.0); - if is_excute(fighter) { - EffectModule::set_rate(boma, wave_3, 0.000001); - if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - for _ in 0..i32::MAX { - wait(lua_state, 4.0); - if is_excute(fighter) { - if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - } -} - -unsafe extern "C" fn miiswordsman_chakram_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - // Tap Input - if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ - if is_excute(fighter) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - } - // Hold Input - else{ - if is_excute(fighter) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - } -} - -unsafe extern "C" fn miiswordsman_chakram_fly_normal_sub_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"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn miiswordsman_chakram_fly_flick_sub_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"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn miiswordsman_chakram_hop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - } -} - -unsafe extern "C" fn miiswordsman_chakram_stick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - -} - -unsafe extern "C" fn miiswordsman_chakram_stick_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 142.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - -} - -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("miiswordsman") - .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("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) - .install(); - smashline::Agent::new("miiswordsman_chakram") - .acmd("game_fly", miiswordsman_chakram_fly_game) - .acmd("game_flynormalsub", miiswordsman_chakram_fly_normal_sub_game) - .acmd("game_flyflicksub", miiswordsman_chakram_fly_flick_sub_game) - //.acmd("game_hop", miiswordsman_chakram_hop_game) - .acmd("game_stick", miiswordsman_chakram_stick_game) - .acmd("effect_stick", miiswordsman_chakram_stick_effect) - .install(); - smashline::Agent::new("miiswordsman_tornadoshot") - .acmd("game_fly", miiswordsman_tornadoshot_fly_game) - .install(); - smashline::Agent::new("miiswordsman_lightshuriken") - .acmd("game_fly", miiswordsman_wave_fly_game) - .acmd("effect_fly", miiswordsman_wave_fly_effect) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miiswordsman/src/acmd/smashes.rs b/fighters/miiswordsman/src/acmd/smashes.rs index ccf7536270..81350989ee 100644 --- a/fighters/miiswordsman/src/acmd/smashes.rs +++ b/fighters/miiswordsman/src/acmd/smashes.rs @@ -1,208 +1,205 @@ use super::*; -unsafe extern "C" fn miiswordsman_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 361, 104, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 361, 104, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 104, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 361, 104, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 361, 104, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 104, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn miiswordsman_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(12.5-0.0)); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(12.5-0.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(13.0-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 8.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 5.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 2.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(13.0-12.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 8.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 5.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 2.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 12.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 130, 100, 120, 0, 3.5, 0.0, 18.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 18.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 17.8, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 130, 100, 120, 0, 3.5, 0.0, 18.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 18.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 17.8, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - + } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 115, 100, 120, 0, 3.5, 0.0, 21.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 120, 100, 100, 0, 3.5, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 150, 100, 50, 0, 3.5, 0.0, 28.0, 1.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 115, 100, 120, 0, 3.5, 0.0, 21.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 120, 100, 100, 0, 3.5, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 150, 100, 50, 0, 3.5, 0.0, 28.0, 1.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 16.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 19.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 22.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 16.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 19.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 22.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 9.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 9.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 3.0/(21.0-19.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 13.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 9.0, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(21.0-19.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 13.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 9.0, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 23.5, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 25.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 26.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 23.5, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 25.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 26.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 25.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 28.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 31.0, -11.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 25.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 28.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 31.0, -11.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 19.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 20.0, -10.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 22.0, -13.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 19.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 20.0, -10.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 22.0, -13.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 15.0, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 14.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 13.0, -12.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 15.0, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 14.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 13.0, -12.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 12.5, -2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 10.0, -4.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 8.0, -6.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 12.5, -2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 10.0, -4.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 8.0, -6.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 29.0/(58.0-26.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 29.0/(58.0-26.0)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn miiswordsman_attack_hi4_expression(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_attackhi4(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); } frame(lua_state, 10.0); app::sv_animcmd::execute(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 60.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 10); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 10); } } -unsafe extern "C" fn miiswordsman_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 27, 60, 0, 78, 4.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 27, 60, 0, 78, 4.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 32, 57, 0, 71, 4.0, 0.0, 5.0, -3.0, Some(0.0), Some(5.0), Some(-18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 32, 57, 0, 71, 4.0, 0.0, 5.0, -3.0, Some(0.0), Some(5.0), Some(-18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attacks4", miiswordsman_attack_s4_s_game) - .acmd("game_attackhi4", miiswordsman_attack_hi4_game) - .acmd("expression_attackhi4", miiswordsman_attack_hi4_expression) - .acmd("game_attacklw4", miiswordsman_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs deleted file mode 100644 index 3a4a5bfb0d..0000000000 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ /dev/null @@ -1,1852 +0,0 @@ -use super::*; - -unsafe extern "C" fn miiswordsman_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 17.0, 14.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_TORNADOSHOT, false, 0); - } - frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 48.0, 17.0); - frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miiswordsman_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 9.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); - } - else { - let x_vel = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); - app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); - } - } - frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if boma.is_button_on(Buttons::Special) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 17.0, 13.0); - } - else { - FT_MOTION_RATE(fighter, 1.0); - } - if is_excute(fighter) { - if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - } - } - frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - } - } - // light - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // heavy - else { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, false, 0); - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 33.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 33.0, 36.0, 10.0); - } - frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn miiswordsman_special_n2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 14.2); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4.0); - } -} - -unsafe extern "C" fn miiswordsman_special_n2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); - PLAY_SE(fighter, Hash40::new("se_miiswordsman_special_l03")); - } -} - -unsafe extern "C" fn miiswordsman_special_n2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 0, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } else { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } - frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 20); - } -} - -// ================================================================================================ -// ======================================== BLURRING BLADE ======================================== -// ================================================================================================ - -unsafe extern "C" fn miiswordsman_special_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let turn = fighter.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); - frame(lua_state, 6.0); - if is_excute(fighter) { - if turn { - REVERSE_LR(fighter); - } - } - for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 33.0, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let sfx = if fighter.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; - let offset = if turn { -10.0 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 80.0, 26.0); - frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miiswordsman_special_air_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let turn = fighter.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); - if is_excute(fighter) { - let flip = if turn { -1.0 } else { 1.0 }; - SET_SPEED_EX(fighter, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - if turn { - REVERSE_LR(fighter); - } - } - for _ in 0..2 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 2.0); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 33.0, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.0, 0.0)); - } - frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let sfx = if fighter.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; - let offset = if turn { -9.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 80.0, 26.0); - frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); -} - -// ================================================================================================== -// ======================================== AIRBORNE ASSAULT ======================================== -// ================================================================================================== - -unsafe extern "C" fn miiswordsman_special_s1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); - } - -} - -unsafe extern "C" fn miiswordsman_special_air_s1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); - } - -} - -unsafe extern "C" fn miiswordsman_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - - } - -} - -unsafe extern "C" fn miiswordsman_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - - } - -} -/* -#[acmd_script( agent = "miiswordsman", script = "game_specials1hit" , category = ACMD_GAME , low_priority)] -unsafe fn miiswordsman_special_s1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} -*/ - -// ============================================================================================= -// ======================================== GALE STAB ========================================== -// ============================================================================================= - -unsafe extern "C" fn miiswordsman_special_s2_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 10.0); - if is_excute(fighter) { - MotionModule::set_rate(fighter.module_accessor, 0.5); - } -} - -unsafe extern "C" fn miiswordsman_special_s2_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn miiswordsman_special_s2_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - // Vanilla Effects - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); - - //EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); - //EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_blastwind_stab"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - - - // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 1.4); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s2_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 10.0); - if is_excute(fighter) { - MotionModule::set_rate(fighter.module_accessor, 0.5); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s2_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s2_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - // Vanilla Effects - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); - - - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - - - // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - - } - frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 1.4); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); - } -} - -// ============================================================================================= -// ======================================== CHAKRAM ============================================ -// ============================================================================================= - -unsafe extern "C" fn miiswordsman_special_s3_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn miiswordsman_special_s3_1_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn miiswordsman_special_s3_1_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s3_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s3_1_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn miiswordsman_special_air_s3_1_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); - } - else{ - FT_MOTION_RATE(fighter, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -// ============================================================================================= -// ======================================== STONE SCABBARD ======================================== -// ============================================================================================= - -unsafe extern "C" fn miiswordsman_special_hi1_start_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, 0.7); - } -} - -unsafe extern "C" fn miiswordsman_special_air_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - let addSpeed = Vector3f { x: 0.0, y: 0.5, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - // Tip - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // Middle - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // Hilt - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 35.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_ROKET_UNDER_DISABLE_CONTROL_X); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); - } -} - -unsafe extern "C" fn miiswordsman_special_air_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); - } -} - -// ==================================================================================================== -// ======================================== SKYWARD SLASH DASH ======================================== -// ==================================================================================================== - -unsafe extern "C" fn miiswordsman_special_hi2_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.6); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 2.5); - } - else{ - FT_MOTION_RATE(fighter, 0.8); - } - } - frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); -} - -unsafe extern "C" fn miiswordsman_special_hi2_hold_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.6); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 2.5); - } - else{ - FT_MOTION_RATE(fighter, 0.8); - } - } - frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); -} - -unsafe extern "C" fn miiswordsman_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - for _ in 0..5 { - frame(lua_state, 2.0); - if is_excute(fighter) { - // Charged - //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // Uncharged - else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - } - if is_excute(fighter) { - - let h_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - let v_speed = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - //let angle_calc = v_speed / h_speed as f32; - //println!("Angle: {}", angle_calc); - - let mut launch_angle = if v_speed > 0.0 {(v_speed / h_speed.abs()).atan().to_degrees() as u64} else {361 as u64}; - - //println!("H speed: {}", h_speed); - //println!("V speed: {}", v_speed); - - //println!("Launch Angle (pre-calc): {}", launch_angle); - - if h_speed == 0.0 { - launch_angle = 90 as u64; - } - - //println!("Launch Angle: {}", launch_angle); - - // Charged - //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // Uncharged - else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 1.3, 1.23, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); - } - else if fighter.is_situation(*SITUATION_KIND_AIR) { - EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); - } - } - frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_sdash_hit"), -1); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_sdash"), false, true); - } -} - -unsafe extern "C" fn miiswordsman_special_hi2_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.8); - } - } -} - -unsafe extern "C" fn miiswordsman_special_hi2_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.8); - } - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { - FT_MOTION_RATE(fighter, 0.5); - } - } -} - -// ============================================================================================= -// ======================================== HERO'S SPIN ======================================== -// ============================================================================================= - -unsafe extern "C" fn miiswordsman_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn miiswordsman_special_air_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 39.0, 47.0, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } - -} - -// =============================================================================================== -// ======================================== KINESIS BLADE ======================================== -// =============================================================================================== - -unsafe extern "C" fn miiswordsman_special_lw1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 15.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 47.0, 19.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 15.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 47.0, 19.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); -} - -// Kinesis Blade - Charge Storage -// #[acmd_script( agent = "miiswordsman", script = "game_speciallw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_lw1_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// let current_level = VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); -// // Attack transition -// if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); -// if current_level > 0{ -// if current_level == 1 { -// // println!("Changing to level 1"); -// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); -// } -// else{ -// // println!("Changing to level 2"); -// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); -// } -// } -// } -// else{ -// // Increment the level -// if current_level < 2 { -// VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level -// // println!("Kinesis increment"); -// } -// // println!("Kinesis Level: {}", VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); -// } -// } -// frame(lua_state, 23.0); -// if is_excute(fighter) { -// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(fighter, 0.65); -// } -// } - -// #[acmd_script( agent = "miiswordsman", script = "game_specialairlw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_air_lw1_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// let current_level = VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); -// // Attack transition -// if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); -// if current_level > 0{ -// if current_level == 1 { -// // println!("Changing to level 1"); -// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); -// } -// else{ -// // println!("Changing to level 2"); -// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); -// } -// } -// } -// else{ -// // Increment the level -// if current_level < 2 { -// VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level -// // println!("Kinesis increment"); -// } -// // println!("Kinesis Level: {}", VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); -// } -// } -// frame(lua_state, 23.0); -// if is_excute(fighter) { -// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(fighter, 0.65); -// } -// } - -// Kinesis Blade - 1 Charge - -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_HEAVY, *ATTACK_REGION_SWORD); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_HEAVY, *ATTACK_REGION_SWORD); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } -} - -// Kinesis Blade - 2 Charges - -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 68.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 73.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 76.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 68.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 73.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 76.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -// ================================================================================================================ -// ======================================== DEFLECTING DRAFT / SHOCK SPELL ======================================== -// ================================================================================================================ - -unsafe extern "C" fn miiswordsman_special_lw2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 12.0, 16.0); - if is_excute(fighter) { - if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); - } - } - frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_OBJECT); - } - frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 23.0, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - AttackModule::clear_all(boma); - } - frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); - } - -} - -unsafe extern "C" fn miiswordsman_special_lw2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.65); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - let mut offset = 0; - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); - if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { - offset = 13; - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.1); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(fighter, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.1); - } - } - frame(lua_state, 10.5); - if is_excute(fighter) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_smokescreen"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.84, 0.17); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_paralysis"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder_flash"), true, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_hit_elec"), -1); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_reflect_sword"), false, true); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_reflect1"), -1); - } - -} - -unsafe extern "C" fn miiswordsman_special_lw2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miiswordsman_special_c2_l01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); - } - frame(lua_state, 10.5); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_m")); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_s")); - } - -} - -// ================================================================================================================ -// ======================================== HURRICANE HEAVE ======================================================= -// ================================================================================================================ - -unsafe extern "C" fn miiswordsman_special_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_lw3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - - } - frame(lua_state, 6.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 4.0, y: 5.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 0.0, y: 17.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //REVERSE_LR(fighter); - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -6.0, y: 15.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - //REVERSE_LR(fighter); - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -12.0, y: 0.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); - } - /* - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - //let hit1 = Vector2f {x: 12.0, y: 0.0}; - //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - */ - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 16.0); - sv_kinetic_energy!(set_speed_mul_2nd, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 18.0); - sv_kinetic_energy!(set_speed_mul_2nd, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw3_end_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, 0.790); - //WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 4.0, y: 5.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 0.0, y: 17.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //REVERSE_LR(fighter); - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -6.0, y: 15.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - //REVERSE_LR(fighter); - //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -12.0, y: 0.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); - } - /* - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - //let hit1 = Vector2f {x: 12.0, y: 0.0}; - //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - */ - frame(lua_state, 21.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK(fighter, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_specialn1", miiswordsman_special_n1_game) - .acmd("game_specialairn1", miiswordsman_special_n1_game) - .acmd("game_specialn2", miiswordsman_special_n2_game) - .acmd("game_specialairn2", miiswordsman_special_n2_game) - .acmd("effect_specialn2", miiswordsman_special_n2_effect) - .acmd("effect_specialairn2", miiswordsman_special_n2_effect) - .acmd("sound_specialn2", miiswordsman_special_n2_sound) - .acmd("sound_specialairn2", miiswordsman_special_n2_sound) - .acmd("expression_specialn2", miiswordsman_special_n2_expression) - .acmd("expression_specialairn2", miiswordsman_special_n2_expression) - .acmd("game_specialn3end", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endturn", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endmax", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endmaxturn", miiswordsman_special_n3_end_game) - .acmd("game_specialairn3end", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endturn", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endmax", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endmaxturn", miiswordsman_special_air_n3_end_game) - .acmd("game_specials1start", miiswordsman_special_s1_start_game) - .acmd("game_specialairs1start", miiswordsman_special_air_s1_start_game) - .acmd("game_specials1", miiswordsman_special_s1_game) - .acmd("game_specialairs1", miiswordsman_special_air_s1_game) - .acmd("game_specials2dash", miiswordsman_special_s2_dash_game) - .acmd("game_specials2attack", miiswordsman_special_s2_attack_game) - .acmd("effect_specials2attack", miiswordsman_special_s2_attack_effect) - .acmd("game_specialairs2dash", miiswordsman_special_air_s2_dash_game) - .acmd("game_specialairs2attack", miiswordsman_special_air_s2_attack_game) - .acmd("effect_specialairs2attack", miiswordsman_special_air_s2_attack_effect) - .acmd("game_specials3_1", miiswordsman_special_s3_1_game) - .acmd("game_specials3_1hi", miiswordsman_special_s3_1_hi_game) - .acmd("game_specials3_1lw", miiswordsman_special_s3_1_lw_game) - .acmd("game_specialairs3_1", miiswordsman_special_air_s3_1_game) - .acmd("game_specialairs3_1hi", miiswordsman_special_air_s3_1_hi_game) - .acmd("game_specialairs3_1lw", miiswordsman_special_air_s3_1_lw_game) - .acmd("game_specialhi1start", miiswordsman_special_hi1_start_game) - .acmd("game_specialairhi1", miiswordsman_special_air_hi1_game) - .acmd("game_specialhi1end", miiswordsman_special_hi1_end_game) - .acmd("game_specialairhi1end", miiswordsman_special_air_hi1_end_game) - .acmd("game_specialhi2hold", miiswordsman_special_hi2_hold_game) - .acmd("game_specialhi2holdair", miiswordsman_special_hi2_hold_air_game) - .acmd("game_specialhi2", miiswordsman_special_hi2_game) - .acmd("effect_specialhi2", miiswordsman_special_hi2_effect) - .acmd("game_specialhi2landing", miiswordsman_special_hi2_landing_game) - .acmd("game_specialhi2fall", miiswordsman_special_hi2_fall_game) - .acmd("game_specialhi3", miiswordsman_special_hi3_game) - .acmd("game_specialairhi3", miiswordsman_special_air_hi3_game) - .acmd("game_speciallw1hit", miiswordsman_special_lw1_hit_game) - .acmd("game_specialairlw1hit", miiswordsman_special_air_lw1_hit_game) - //.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game) - //.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game) - //.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game) - //.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game) - .acmd("game_speciallw2", miiswordsman_special_lw2_game) - .acmd("game_specialairlw2", miiswordsman_special_lw2_game) - .acmd("effect_speciallw2", miiswordsman_special_lw2_effect) - .acmd("effect_specialairlw2", miiswordsman_special_lw2_effect) - .acmd("sound_speciallw2", miiswordsman_special_lw2_sound) - .acmd("sound_specialairlw2", miiswordsman_special_lw2_sound) - .acmd("game_speciallw3", miiswordsman_special_lw3_game) - //.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game) - .acmd("game_specialairlw3", miiswordsman_special_air_lw3_game) - .acmd("game_specialairlw3end", miiswordsman_special_air_lw3_end_game) - //.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) - .install(); -} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/mod.rs b/fighters/miiswordsman/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..7c584b7a28 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) {; + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_hi.rs b/fighters/miiswordsman/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..5a84f9b33a --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_hi.rs @@ -0,0 +1,474 @@ +use super::*; + +// ============================================================================================= +// ======================================== STONE SCABBARD ===================================== +// ============================================================================================= + +unsafe extern "C" fn game_specialhi1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.7); + } +} + +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + let addSpeed = Vector3f { x: 0.0, y: 0.5, z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 29.0); + if is_excute(agent) { + // Tip + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // Middle + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // Hilt + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 35.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_ROKET_UNDER_DISABLE_CONTROL_X); + } + frame(lua_state, 60.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); + } +} + +unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); + } +} + +// ==================================================================================================== +// ======================================== SKYWARD SLASH DASH ======================================== +// ==================================================================================================== + +unsafe extern "C" fn game_specialhi2hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); + } + else{ + FT_MOTION_RATE(agent, 0.8); + } + } + frame(lua_state, 24.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); +} + +unsafe extern "C" fn game_specialhi2holdair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); + } + else{ + FT_MOTION_RATE(agent, 0.8); + } + } + frame(lua_state, 24.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); +} + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..5 { + frame(lua_state, 2.0); + if is_excute(agent) { + // Charged + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // Uncharged + else{ + ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + } + if is_excute(agent) { + + let h_speed = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let v_speed = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + //let angle_calc = v_speed / h_speed as f32; + //println!("Angle: {}", angle_calc); + + let mut launch_angle = if v_speed > 0.0 {(v_speed / h_speed.abs()).atan().to_degrees() as u64} else {361 as u64}; + + //println!("H speed: {}", h_speed); + //println!("V speed: {}", v_speed); + + //println!("Launch Angle (pre-calc): {}", launch_angle); + + if h_speed == 0.0 { + launch_angle = 90 as u64; + } + + //println!("Launch Angle: {}", launch_angle); + + // Charged + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // Uncharged + else{ + ATTACK(agent, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 1.3, 1.23, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); + } + else if agent.is_situation(*SITUATION_KIND_AIR) { + EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); + } + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_ALPHA(agent, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_sdash_hit"), -1); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_sdash"), false, true); + } +} + +unsafe extern "C" fn game_specialhi2landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); + } + } +} + +unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); + } + if VarModule::is_flag(agent.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { + FT_MOTION_RATE(agent, 0.5); + } + } +} + +// ============================================================================================= +// ======================================== HERO SPIN ========================================== +// ============================================================================================= + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + KineticModule::mul_speed(boma, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 21.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 37.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let start_speed = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(lua_state); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 38.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 39.0, 47.0, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 48.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + JostleModule::set_status(boma, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1start", game_specialhi1start); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialhi1end", game_specialhi1end); + agent.acmd("game_specialairhi1end", game_specialairhi1end); + + agent.acmd("game_specialhi2hold", game_specialhi2hold); + agent.acmd("game_specialhi2holdair", game_specialhi2holdair); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + agent.acmd("game_specialhi2landing", game_specialhi2landing); + agent.acmd("game_specialhi2fall", game_specialhi2fall); + + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialairhi3); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_lw.rs b/fighters/miiswordsman/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..d338b80342 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_lw.rs @@ -0,0 +1,630 @@ +use super::*; + +// =============================================================================================== +// ======================================== BLADE COUNTER ======================================== +// =============================================================================================== + +unsafe extern "C" fn game_speciallw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); +} + +// Kinesis Blade - Charge Storage +// unsafe fn game_speciallw1hit(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// // Attack transition +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if current_level > 0{ +// if current_level == 1 { +// // println!("Changing to level 1"); +// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); +// } +// else{ +// // println!("Changing to level 2"); +// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); +// } +// } +// } +// else{ +// // Increment the level +// if current_level < 2 { +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// // println!("Kinesis increment"); +// } +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// } +// } +// frame(lua_state, 23.0); +// if is_excute(agent) { +// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); +// //FT_MOTION_RATE(agent, 0.65); +// } +// } + +// unsafe fn game_specialairlw1hit(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// // Attack transition +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if current_level > 0{ +// if current_level == 1 { +// // println!("Changing to level 1"); +// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); +// } +// else{ +// // println!("Changing to level 2"); +// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); +// } +// } +// } +// else{ +// // Increment the level +// if current_level < 2 { +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// // println!("Kinesis increment"); +// } +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// } +// } +// frame(lua_state, 23.0); +// if is_excute(agent) { +// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); +// //FT_MOTION_RATE(agent, 0.65); +// } +// } + +// Kinesis Blade - 1 Charge + +unsafe extern "C" fn game_speciallw1hitlv1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_HEAVY, *ATTACK_REGION_SWORD); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } +} + +unsafe extern "C" fn game_specialairlw1hitlv1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_HEAVY, *ATTACK_REGION_SWORD); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } +} + +// Kinesis Blade - 2 Charges + +unsafe extern "C" fn game_speciallw1hitlv2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 73.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 76.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw1hitlv2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 73.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 76.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================================ +// ================================================ SHOCK SPELL =================================================== +// ================================================================================================================ + +unsafe extern "C" fn game_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 6.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 16.0); + if is_excute(agent) { + if boma.is_button_on(Buttons::Special) { + VarModule::on_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); + } + } + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_OBJECT); + } + frame(lua_state, 16.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 23.0, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + AttackModule::clear_all(boma); + } + frame(lua_state, 23.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); + } +} + +unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.65); + } + frame(lua_state, 6.0); + if is_excute(agent) { + let mut offset = 0; + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); + if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { + offset = 13; + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); + } + } + frame(lua_state, 10.5); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } + frame(lua_state, 12.0); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_smokescreen"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.84, 0.17); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_paralysis"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder_flash"), true, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_hit_elec"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_reflect_sword"), false, true); + } + frame(lua_state, 26.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, true); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_reflect1"), -1); + } +} + +unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_c2_l01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + } + frame(lua_state, 10.5); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_m")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); + } +} + +// ================================================================================================================ +// =========================================== POWER THRUST ======================================================= +// ================================================================================================================ + +unsafe extern "C" fn game_speciallw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } + frame(lua_state, 6.0); + if is_excute(agent) { + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 4.0, y: 5.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 0.0, y: 17.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -6.0, y: 15.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -12.0, y: 0.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); + } + /* + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //let hit1 = Vector2f {x: 12.0, y: 0.0}; + //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + */ + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 18.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); + //WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); + } +} + +unsafe extern "C" fn game_specialairlw3endair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + frame(lua_state, 6.0); + if is_excute(agent) { + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 4.0, y: 5.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 0.0, y: 17.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -6.0, y: 15.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -12.0, y: 0.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); + } + /* + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //let hit1 = Vector2f {x: 12.0, y: 0.0}; + //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + */ + frame(lua_state, 21.0); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1hit", game_speciallw1hit); + agent.acmd("game_specialairlw1hit", game_specialairlw1hit); + //agent.acmd("game_speciallw1hitlv1", game_speciallw1hitlv1); + //agent.acmd("game_specialairlw1hitlv1", game_specialairlw1hitlv1); + //agent.acmd("game_speciallw1hitlv2", game_speciallw1hitlv2); + //agent.acmd("game_specialairlw1hitlv2", game_specialairlw1hitlv2); + + agent.acmd("game_speciallw2", game_speciallw2); + agent.acmd("game_specialairlw2", game_speciallw2); + agent.acmd("effect_speciallw2", effect_speciallw2); + agent.acmd("effect_specialairlw2", effect_speciallw2); + agent.acmd("sound_speciallw2", sound_speciallw2); + agent.acmd("sound_specialairlw2", sound_speciallw2); + + agent.acmd("game_speciallw3", game_speciallw3); + //agent.acmd("game_speciallw3end", game_speciallw3end); + agent.acmd("game_specialairlw3", game_specialairlw3); + agent.acmd("game_specialairlw3end", game_specialairlw3end); + //agent.acmd("game_specialairlw3endair", game_specialairlw3endair); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_n.rs b/fighters/miiswordsman/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..0f43a6be79 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_n.rs @@ -0,0 +1,305 @@ +use super::*; + +// ================================================================================================ +// ====================================== SUMMONED CYLCONE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 14.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_TORNADOSHOT, false, 0); + } + frame(lua_state, 20.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 48.0, 17.0); + frame(lua_state, 48.0); + FT_MOTION_RATE(agent, 1.0); +} + +// ================================================================================================ +// ======================================== WARRIOR WAVE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 9.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if agent.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); + } + else { + let x_vel = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(lua_state); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); + app::sv_kinetic_energy::set_stable_speed(lua_state); + } + } + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 1.0); + if boma.is_button_on(Buttons::Special) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.0, 13.0); + } + else { + FT_MOTION_RATE(agent, 1.0); + } + if is_excute(agent) { + if boma.is_button_on(Buttons::Special) { + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + } + } + frame(lua_state, 17.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); + app::sv_kinetic_energy::set_speed(lua_state); + } + } + // light + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MotionModule::set_rate(boma, 1.0); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // heavy + else { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, false, 0); + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 33.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 33.0, 36.0, 10.0); + } + frame(lua_state, 36.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 14.2); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 29.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4.0); + } +} + +unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_l03")); + } +} + +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 0, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } else { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } + frame(lua_state, 35.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 20); + } +} + +// ================================================================================================ +// ======================================== BLURRING BLADE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); + frame(lua_state, 6.0); + if is_excute(agent) { + if turn { + REVERSE_LR(agent); + } + } + for _ in 0..4 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 33.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + let offset = if turn { -10.0 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 40.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); + frame(lua_state, 80.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); + if is_excute(agent) { + let flip = if turn { -1.0 } else { 1.0 }; + SET_SPEED_EX(agent, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 6.0); + if is_excute(agent) { + if turn { + REVERSE_LR(agent); + } + } + for _ in 0..2 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 2.0); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 25.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.0, 0.0)); + } + frame(lua_state, 33.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + let offset = if turn { -9.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 40.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); + frame(lua_state, 80.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialn3endturn", game_specialn3end); + agent.acmd("game_specialn3endmax", game_specialn3end); + agent.acmd("game_specialn3endmaxturn", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialairn3end); + agent.acmd("game_specialairn3endturn", game_specialairn3end); + agent.acmd("game_specialairn3endmax", game_specialairn3end); + agent.acmd("game_specialairn3endmaxturn", game_specialairn3end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_s.rs b/fighters/miiswordsman/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..939bc76406 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_s.rs @@ -0,0 +1,456 @@ +use super::*; + +// ================================================================================================== +// ======================================== AIRBORNE ASSAULT ======================================== +// ================================================================================================== + +unsafe extern "C" fn game_specials1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); + } +} + +unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); + } +} + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } +} + +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } +} +/* +unsafe fn game_specials1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +*/ + +// ============================================================================================= +// ===================================== KINETIC SLASH ========================================= +// ============================================================================================= + +unsafe extern "C" fn game_specials2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 0.5); + } +} + +unsafe extern "C" fn game_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + // Vanilla Effects + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); + + //EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); + //EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_blastwind_stab"), -1); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + + + // Sword Trail + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + } + frame(lua_state, 34.0); + if is_excute(agent) { + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); + } + frame(lua_state, 35.0); + if is_excute(agent) { + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 37.0); + if is_excute(agent) { + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + } +} + +unsafe extern "C" fn game_specialairs2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 0.5); + } +} + +unsafe extern "C" fn game_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + // Vanilla Effects + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); + + + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + + + // Sword Trail + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + } + frame(lua_state, 34.0); + if is_excute(agent) { + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); + } + frame(lua_state, 35.0); + if is_excute(agent) { + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 37.0); + if is_excute(agent) { + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + } +} + +// ============================================================================================= +// ======================================== CHAKRAM ============================================ +// ============================================================================================= + +unsafe extern "C" fn game_specials3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specials3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specials3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1start", game_specials1start); + agent.acmd("game_specialairs1start", game_specialairs1start); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specials2dash", game_specials2dash); + agent.acmd("game_specials2attack", game_specials2attack); + agent.acmd("effect_specials2attack", effect_specials2attack); + agent.acmd("game_specialairs2dash", game_specialairs2dash); + agent.acmd("game_specialairs2attack", game_specialairs2attack); + agent.acmd("effect_specialairs2attack", effect_specialairs2attack); + + agent.acmd("game_specials3_1", game_specials3_1); + agent.acmd("game_specials3_1hi", game_specials3_1hi); + agent.acmd("game_specials3_1lw", game_specials3_1lw); + agent.acmd("game_specialairs3_1", game_specialairs3_1); + agent.acmd("game_specialairs3_1hi", game_specialairs3_1hi); + agent.acmd("game_specialairs3_1lw", game_specialairs3_1lw); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/throws.rs b/fighters/miiswordsman/src/acmd/throws.rs index 71288b6730..e3c83f42a6 100644 --- a/fighters/miiswordsman/src/acmd/throws.rs +++ b/fighters/miiswordsman/src/acmd/throws.rs @@ -1,109 +1,105 @@ - use super::*; -unsafe extern "C" fn miiswordsman_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { 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(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miiswordsman_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.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.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 miiswordsman_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.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(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 throwf_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 40, 100, 0, 70, 5.0, 0.0, 9.0, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 40, 100, 0, 70, 5.0, 0.0, 9.0, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA(fighter, 13, 1); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 0, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn throwb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 5.0, 3.8, -1.2, 1.5, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 4.5, -3.0, 0.0, 1.0, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 5.0, 3.8, -1.2, 1.5, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 4.5, -3.0, 0.0, 1.0, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); //CHECK_FINISH_CAMERA(fighter, 12, 5); @@ -111,76 +107,78 @@ unsafe extern "C" fn throwb_game(fighter: &mut L2CAgentBase) { //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn throwhi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 84, 205, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 84, 205, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 122, 0, 30, 4.0, 0.0, 21.0, -1.0, Some(0.0), Some(30.0), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 122, 0, 30, 4.0, 0.0, 21.0, -1.0, Some(0.0), Some(30.0), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); //CHECK_FINISH_CAMERA(fighter, 2, 27); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 0, 15, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } -unsafe extern "C" fn throwlw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 80, 115, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 80, 115, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 150, 0, 30, 4.5, -7.0, 3.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 150, 0, 30, 4.5, -7.0, 3.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KNEE); AttackModule::set_catch_only_all(boma, true, false); //CHECK_FINISH_CAMERA(fighter, 5, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, -3, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_catch", miiswordsman_catch_game) - .acmd("game_catchdash", miiswordsman_catch_dash_game) - .acmd("game_catchturn", miiswordsman_catch_turn_game) - .acmd("game_throwf", throwf_game) - .acmd("game_throwb", throwb_game) - .acmd("game_throwhi", throwhi_game) - .acmd("game_throwlw", throwlw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miiswordsman/src/acmd/tilts.rs b/fighters/miiswordsman/src/acmd/tilts.rs index ffab0737d3..642fc339ec 100644 --- a/fighters/miiswordsman/src/acmd/tilts.rs +++ b/fighters/miiswordsman/src/acmd/tilts.rs @@ -2,93 +2,91 @@ use super::*; // New animation -unsafe extern "C" fn attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 4.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 3.5/(11.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 3.5/(11.0-9.0)); + if is_excute(agent) { // Body hitboxes - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 87, 50, 0, 60, 4.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 87, 50, 0, 60, 4.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE(fighter, 24.5/(37.0-10.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 24.5/(37.0-10.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_s3_expression(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_attacks3(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); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -unsafe extern "C" fn attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 76, 90, 0, 68, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 80, 93, 0, 68, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.5, 80, 94, 0, 68, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.5, 82, 98, 0, 68, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 76, 90, 0, 68, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 80, 93, 0, 68, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.5, 80, 94, 0, 68, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.5, 82, 98, 0, 68, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 70, 66, 0, 53, 3.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 85, 67, 0, 53, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 90, 68, 0, 52, 3.0, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 70, 66, 0, 53, 3.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 85, 67, 0, 53, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 90, 68, 0, 52, 3.0, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 9.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 9.0, 7.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attacks3", attack_s3_game) - .acmd("expression_attacks3", attack_s3_expression) - .acmd("game_attackhi3", attack_hi3_game) - .acmd("game_attacklw3", attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miiswordsman/src/chakram/acmd.rs b/fighters/miiswordsman/src/chakram/acmd.rs new file mode 100644 index 0000000000..996fa70712 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/acmd.rs @@ -0,0 +1,90 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + // Tap Input + if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + } + // Hold Input + else{ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + } +} + +unsafe extern "C" fn game_flynormalsub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_flyflicksub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_hop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + } +} + +unsafe extern "C" fn game_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } +} + +unsafe extern "C" fn effect_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 142.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_flynormalsub", game_flynormalsub); + agent.acmd("game_flyflicksub", game_flyflicksub); + //agent.acmd("game_hop", game_hop); + agent.acmd("game_stick", game_stick); + agent.acmd("effect_stick", effect_stick); +} diff --git a/fighters/miiswordsman/src/chakram/mod.rs b/fighters/miiswordsman/src/chakram/mod.rs new file mode 100644 index 0000000000..60f1dd4418 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_chakram"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/status.rs b/fighters/miiswordsman/src/chakram/status.rs new file mode 100644 index 0000000000..74a46bcff1 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; +// status script import + +// WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP + +unsafe extern "C" fn pre_chakram_hop(weapon: &mut L2CWeaponCommon) -> L2CValue { + let lua_state = weapon.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + smashline::original_status(Pre, weapon, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP)(weapon) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/lib.rs b/fighters/miiswordsman/src/lib.rs index a79ec350f2..14a5aa6eed 100644 --- a/fighters/miiswordsman/src/lib.rs +++ b/fighters/miiswordsman/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod chakram; +mod lightshuriken; +mod tornadoshot; use smash::{ lib::{ @@ -40,7 +46,13 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miiswordsman"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + chakram::install(); + lightshuriken::install(); + tornadoshot::install(); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/lightshuriken/acmd.rs b/fighters/miiswordsman/src/lightshuriken/acmd.rs new file mode 100644 index 0000000000..2efba1a532 --- /dev/null +++ b/fighters/miiswordsman/src/lightshuriken/acmd.rs @@ -0,0 +1,92 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } +} + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let mut lead_wave : u32 = std::u32::MAX; + let mut wave_2 : u32 = std::u32::MAX; + let mut wave_3 : u32 = std::u32::MAX; + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); + lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, lead_wave, 0.7); + + wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_2, 0.7); + EffectModule::set_alpha(boma, wave_2, 0.4); + //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! + if GroundModule::ray_check( + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + wait(lua_state, 4.0); + if is_excute(agent) { + EffectModule::set_rate(boma, lead_wave, 0.000001); + EffectModule::set_rate(boma, wave_2, 0.000001); + EffectModule::set_alpha(boma, wave_2, 0.4); + wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_3, 0.7); + EffectModule::set_alpha(boma, wave_3, 0.4); + if GroundModule::ray_check( + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + wait(lua_state, 4.0); + if is_excute(agent) { + EffectModule::set_rate(boma, wave_3, 0.000001); + if GroundModule::ray_check( + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + for _ in 0..i32::MAX { + wait(lua_state, 4.0); + if is_excute(agent) { + if GroundModule::ray_check( + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("effect_fly", effect_fly); +} diff --git a/fighters/miiswordsman/src/lightshuriken/mod.rs b/fighters/miiswordsman/src/lightshuriken/mod.rs new file mode 100644 index 0000000000..459467c7a1 --- /dev/null +++ b/fighters/miiswordsman/src/lightshuriken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_lightshurken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/opff.rs b/fighters/miiswordsman/src/opff.rs index 3ffef13f4d..c37b6c84f4 100644 --- a/fighters/miiswordsman/src/opff.rs +++ b/fighters/miiswordsman/src/opff.rs @@ -291,17 +291,6 @@ pub unsafe fn miiswordsman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) } } -pub extern "C" fn tornadoshot_frame(weapon: &mut L2CFighterBase) { - unsafe { - ModelModule::set_joint_scale(weapon.module_accessor, Hash40::new("top"), &Vector3f::new(0.6, 0.6, 0.6)); - } -} - -pub fn install() { - smashline::Agent::new("miiswordsman") - .on_line(Main, miiswordsman_frame_wrapper) - .install(); - smashline::Agent::new("miiswordsman_tornadoshot") - .on_line(Main, tornadoshot_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miiswordsman_frame_wrapper); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status.rs deleted file mode 100644 index 6759f37e84..0000000000 --- a/fighters/miiswordsman/src/status.rs +++ /dev/null @@ -1,1313 +0,0 @@ -use super::*; -use globals::*; -// status script import - - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD - -unsafe extern "C" fn pre_final_hold(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::WAVE_SPECIAL_N); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD)(fighter) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK - -unsafe extern "C" fn pre_special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - let force_air = Vector2f {x: 0.0, y: 10.0}; - - PostureModule::add_pos_2d(fighter.module_accessor, &force_air); - - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK)(fighter) - -} - -/* -#[status_script(agent = "miiswordsman", status = FIGHTER_STATUS_KIND_SPECIAL_S, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -unsafe fn miiswordsman_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { - PostureModule::set_stick_lr(fighter.module_accessor, 0.0); - PostureModule::update_rot_y_lr(fighter.module_accessor); - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_start"), 0.0, 1.0, false, 0.0, false, false); - } - else{ - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_start"), 0.0, 1.0, false, 0.0, false, false); - } - //l2c_agent.clear_lua_stack(); - //l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683 as u64)) - lua_args!(fighter, 0x20cbc92683, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - l2c_agent.clear_lua_stack(); - lua_args!(fighter, 0x3a40337e2c, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - - fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1_main as *const () as _)) - -} -*/ - -unsafe extern "C" fn miiswordsman_specials1_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if MotionModule::is_end(fighter.module_accessor) == true { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK.into(), false.into()); - return L2CValue::I32(1); - } - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - } - else if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - - } - - L2CValue::I32(0) -} - -unsafe extern "C" fn special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - let id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); // Removes on side special attack - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); - } - // Commented out but this was the original script - // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - // fighter.set_situation(SITUATION_KIND_AIR.into()); - // } - // else { - // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - // fighter.set_situation(SITUATION_KIND_GROUND.into()); - // } - // But HERE's what we (probably) want - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - // Now for whatever reason they have these change motions in the same conditions as the previous set, so I'm keeping it separate anyway. - // You can *probably* get away with not impling the ground version but eh safety first - //if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - //} - //else { - // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - //} - - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1"), 0.0, 1.0, false, 0.0, false, false); - } - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - //let x_vel = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("jump_neutral_x")); - let x_vel_flip = ControlModule::get_stick_x(fighter.module_accessor) * 1.65 + (0.1 * PostureModule::lr(fighter.module_accessor)); - let y_vel_flip = 3.5; - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, x_vel_flip, y_vel_flip); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - - /* - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_s1") { - println!("ground side special"); - } - */ - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, -0.1); - app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - - // But HERE's what we (probably) want - fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1attack_mainloop as *const () as _)) -} - -unsafe extern "C" fn miiswordsman_specials1attack_mainloop(fighter: &mut L2CFighterCommon) -> L2CValue { - // custom [ - // drift at apex of flip - if MotionModule::frame(fighter.module_accessor) > 7.0 && MotionModule::frame(fighter.module_accessor) < 32.0 { - let stick_x = fighter.global_table[STICK_X].get_f32(); - if stick_x != 0.0 { - let drift_speed = 0.15 * stick_x.signum(); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, drift_speed, 0.0); - app::sv_kinetic_energy::add_speed(fighter.lua_state_agent); - // this is here so adding speed doesn't surpass x speed cap we set earlier (by setting a slightly lower speed cap) - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, (1.75 - drift_speed.abs()), -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - } - else { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - } - } - if MotionModule::frame(fighter.module_accessor) >= 15.0 { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL); - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) - || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) - || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3 - | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 - | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - } - // ] - - // This is just (as straight of) an impl that I can get of the main loop, what the hell were the smash devs - // Can only use side special once per aerial time - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if MotionModule::is_end(fighter.module_accessor) == false { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); - return L2CValue::I32(1); - } - return L2CValue::I32(0); - } - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); - } - L2CValue::I32(0) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END - -pub unsafe extern "C" fn pre_special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, - *FS_SUCCEEDS_KEEP_SOUND - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_S | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, - 0 - ); - 0.into() -} - -unsafe extern "C" fn special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_end"), 0.0, 1.0, false, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_end"), 0.0, 1.0, false, 0.0, false, false); - } - fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_s1_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if !MotionModule::is_end(fighter.module_accessor) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_HENSOKU_SLASH_WORK_FLAG_END_LANDING) { - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s1_end"), -1.0, 1.0, 0.0, false, false); - let s1_control_limit_mul_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("s1_control_limit_mul_x")); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, 0.0, 0.0, 0.0, 0.0); - smash::app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, s1_control_limit_mul_x); - smash::app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); - return 1.into(); - } - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s1_end"), -1.0, 1.0, 0.0, false, false); - - } - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 1.into(); - } - } - } - return 0.into() - } - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } - else { - if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { - if fighter.sub_air_check_fall_common().get_bool() { - return 1.into() - } - } - } - } - return 1.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH - -unsafe extern "C" fn special_s2_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); - WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - special_s2_dash_mot_change(fighter); - // if !StopModule::is_stop(fighter.module_accessor) { - // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - // } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_s2_dash_dec_int as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main as *const () as _)) -} - -unsafe extern "C" fn special_s2_dash_mot_change(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES.into()); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_dash"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_dash"), -1.0, 1.0, 0.0, false, false); - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_NONE.into()); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_dash"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_dash"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn special_s2_dash_dec_int(fighter: &mut L2CFighterCommon, unk: L2CValue) -> L2CValue { - if unk.get_bool() { - WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - } - return 0.into() -} - -unsafe extern "C" fn special_s2_dash_unk(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut val = 0; - if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let is_status_cliff = GroundModule::is_status_cliff(fighter.module_accessor); - if is_status_cliff { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); - val = 1; - } - } - } - return val.into() -} - -unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut sub_check = fighter.sub_transition_group_check_air_cliff().get_bool(); - if sub_check { - return 0.into(); - } - sub_check = fighter.sub_ground_check_stop_wall().get_bool(); - if sub_check { - return 0.into(); - } - // custom [ - // Jump and Attack cancels - let pad_flag = ControlModule::get_pad_flag(fighter.module_accessor); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND && MotionModule::frame(fighter.module_accessor) > 7.0 { - if fighter.check_jump_cancel(true, false) { - return 1.into() - } - } - if compare_mask(pad_flag, *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) || compare_mask(pad_flag, *FIGHTER_PAD_FLAG_ATTACK_TRIGGER) { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK.into(),true.into()); - return 1.into() - } - // Wall Jump - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP) { - let touch_right = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); - let touch_left = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_LEFT_SIDE as u32); - if touch_left || touch_right { - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_TURN_DASH | *FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP); - fighter.change_status(FIGHTER_STATUS_KIND_WALL_JUMP.into(),true.into()); - return 1.into() - } - } - } - } - // ] - let slash_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - if slash_frame <= 0 { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); - } - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_dash_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_dash_mot_change(fighter); - } - } - } - else { - special_s2_dash_mot_change(fighter); - } - special_s2_dash_unk(fighter); - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK - -unsafe extern "C" fn special_s2_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); - WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - special_s2_attack_mot_change(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main as *const () as _)) -} - -unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_attack"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_attack"), -1.0, 1.0, 0.0, false, false); - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_attack"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_attack"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 0.into(); - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - special_s2_attack_main_helper(fighter); - } - else { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() { - return 0.into(); - } - } - } - return 0.into() -} - -unsafe extern "C" fn special_s2_attack_main_helper(fighter: &mut L2CFighterCommon) { - if !MotionModule::is_end(fighter.module_accessor) { - if !StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_attack_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_attack_mot_change(fighter); - } - } - } - special_s2_dash_unk(fighter); - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_AIR { - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_attack_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_attack_mot_change(fighter); - } - } - } - special_s2_dash_unk(fighter); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), true.into()); - } - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); - } - } -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END - -unsafe extern "C" fn pre_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END)(fighter) -} - -unsafe extern "C" fn special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - special_s2_end_helper(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_s2_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 0.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if !MotionModule::is_end(fighter.module_accessor) { - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - // OG [ special_s2_end_helper(fighter); ] - // custom [ - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(true) - ); - // ] - sub_special_s2_end(fighter); - return 0.into() - } - } - else { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - special_s2_end_helper(fighter); - sub_special_s2_end(fighter); - return 0.into() - } - } - } - else { - // custom [ - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_AIR { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - } - } - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(true) - ); - sub_special_s2_end(fighter); - return 0.into() - } - } - // ] - special_s2_end_helper(fighter); - } - sub_special_s2_end(fighter); - } - else { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(true) - ); - } - } - } - else { - if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { - if fighter.sub_air_check_fall_common().get_bool() { - return 0.into() - } - } - } - return 0.into() -} - -unsafe extern "C" fn special_s2_end_helper(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_end"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_end"), -1.0, 1.0, 0.0, false, false); - } - } - else { - // OG [ GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); ] - // custom [ - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - } - else { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - } - // ] - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_NONE)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_end"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_end"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn sub_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[STATUS_KIND_INTERRUPT] == FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if GroundModule::is_status_cliff(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END), - L2CValue::Bool(true) - ); - return 1.into() - } - } - } - return 0.into() -} - -// WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP - -unsafe extern "C" fn pre_chakram_hop(weapon: &mut L2CWeaponCommon) -> L2CValue { - let lua_state = weapon.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - smashline::original_status(Pre, weapon, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP)(weapon) -} - -// FIGHTER_STATUS_KIND_SPECIAL_HI - -unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH - -unsafe extern "C" fn pre_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH)(fighter) -} - -// not running for some reason - -unsafe extern "C" fn exec_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - //println!("SSD Hit"); - } - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END -// not running for some reason - -unsafe extern "C" fn exec_special_hi2_rush_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) && !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - //println!("SSD Success"); - if MotionModule::frame(fighter.module_accessor) >= 30.0 { - //println!("SSD Fall Act"); - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD - -pub unsafe extern "C" fn exec_special_hi3_hold(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let mut motion_value = 0.28; - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if stick_x != 0.0 { - KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); - } - } - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END - -pub unsafe extern "C" fn pre_special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -unsafe extern "C" fn special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.7; - - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if miisword_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi3"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi3"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - return 0.into() - } - } - if miisword_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi3"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi3"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_special_hi3_end_Main as *const () as _)); - return 0.into() - } - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - } - else { - return 1.into() - } - return 0.into() -} - -unsafe extern "C" fn sub_special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} - -unsafe extern "C" fn miisword_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - -//FIGHTER_STATUS_KIND_SPECIAL_LW - -unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - main_setup(fighter); - let mut l2c_agent = L2CAgent::new(lua_state); - l2c_agent.clear_lua_stack(); - l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(1)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); - sv_battle_object::notify_event_msc_cmd(lua_state); - l2c_agent.pop_lua_stack(1); - l2c_agent.clear_lua_stack(); - l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x3a40337e2c)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); - sv_battle_object::notify_event_msc_cmd(lua_state); - l2c_agent.pop_lua_stack(1); - fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) -} - -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1") { - if ControlModule::check_button_on_trriger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { - //println!("Kinesis activation"); - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw3") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw3") { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - //println!("Swordfighter gon' give it to ya"); - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND - || fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { - main_setup(fighter); - } - } - } - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLY_POWERUP_MOTION_RATE) == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) { - MotionModule::set_rate(fighter.module_accessor,1.0); - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); - } - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) == false { - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_motion_rate")); - MotionModule::set_rate(fighter.module_accessor,rate); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); - } - } - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - } - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - } - counter_setup(fighter); - num = 0; - } - } - if num == -1 { num = 1; } - } - L2CValue::I32(num) -} - -unsafe extern "C" fn main_setup(fighter: &mut L2CFighterCommon) { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw1"),0.0,1.0,false,0.0,false,false); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_air_lw1"),-1.0,1.0,0.0); - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw1"),0.0,1.0,false,0.0,false,false); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_lw1"),-1.0,1.0,0.0); - } - } -} - -unsafe extern "C" fn counter_setup(fighter: &mut L2CFighterCommon) { - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { - let attack_power = WorkModule::get_float(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_FLOAT_ATTACK_POWER); - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT { - return; - } - if attack_power > 0.0 { - let part = (AttackModule::part_size(fighter.module_accessor) as i32) - 1; - if -1 < part { - let mut box_num = -1; - while box_num <= part { - if AttackModule::is_attack(fighter.module_accessor,box_num + 1, false) { - AttackModule::set_power(fighter.module_accessor,box_num + 1, attack_power, false); - } - box_num += 1; - } - } - } - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK) == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { - return; - } - ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NONE),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { - return; - } - ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NORMAL),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); - } - } -} - -//FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT - -unsafe extern "C" fn miiswordsman_speciallw1hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { - if StatusModule::situation_kind(fighter.module_accessor) == WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV) { - return L2CValue::I32(0) - } - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor,*KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_AIR { - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_GROUND,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - else { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1_hit") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1_hit") { - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); - app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); - app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); - app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_MOTION); - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - else{ - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); - //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - //let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); - //app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); - //app::sv_kinetic_energy::enable(fighter.lua_state_agent); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); - //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - //let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); - //app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); - //fighter.clear_lua_stack(); - //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); - //app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); - //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - //app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_MOTION); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION); - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - } - } - return L2CValue::I32(0) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END - -unsafe extern "C" fn special_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) != *SITUATION_KIND_GROUND { - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_GROUND { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end_air"),0.0,1.0,false,0.0,false,false); - if StopModule::is_stop(fighter.module_accessor) == false { - some1(fighter,false.into()); - } - fighter.global_table[0x15].assign(&L2CValue::Ptr(some2 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(some3 as *const () as _)); - } - } - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - some4(fighter); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_air_to_ground_rate")); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,rate,false,0.0,false,false); - fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)); - } - } - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end_air"),0.0,1.0,false,0.0,false,false); - WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); - fighter.sub_shift_status_main(L2CValue::Ptr(some6 as *const () as _)); - } - } - L2CValue::I32(0) - } - else { - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_ground_to_ground_rate")); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end"),0.0,rate,false,0.0,false,false); - fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)) - } -} - -unsafe extern "C" fn some1(fighter: &mut L2CFighterCommon, unk: L2CValue) { - if unk.get_bool() == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_FALL_ONOFF) == false { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_AIR); - } - else { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_FALL); - } - } -} - -unsafe extern "C" fn some2(fighter: &mut L2CFighterCommon, unk2: L2CValue) { - some1(fighter,unk2); -} - -unsafe extern "C" fn some3(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if CancelModule::is_enable_cancel(fighter.module_accessor) == false { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - num = 0; - } - else { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - num = 0; - } - } - if num == -1 { num = 1; } - } - L2CValue::I32(num) -} - -unsafe extern "C" fn some4(fighter: &mut L2CFighterCommon) { - fighter.set_situation(SITUATION_KIND_GROUND.into()); - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); -} - -unsafe extern "C" fn some5(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - num = 0; - } - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - num = 0; - } - } - if num == -1 { num = 1; } - L2CValue::I32(num) -} - -unsafe extern "C" fn some6(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if WorkModule::is_enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL) == false { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if MotionModule::is_end(fighter.module_accessor) == false { - num = 0; - } - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - } - else { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - num = 0; - } - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_LANDING_FALL_SPECIAL) { - let landing_frame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_landing_frame")); - WorkModule::set_float(fighter.module_accessor,landing_frame as f32,*FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(),false.into()); - } - some4(fighter); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,1.0,false,0.0,false,false); - WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); - } - } - } - if num == -1 { num = 1; } - } - } - L2CValue::I32(num) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND - -pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_frame"), 0); - WorkModule::set_float(fighter.module_accessor, landing_frame, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - 0.into() -} - -pub fn install() { - smashline::Agent::new("miiswordsman") - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end) - .status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end) - .install(); - smashline::Agent::new("miiswordsman_chakram") - .status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop) - .install(); -} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/final_hold.rs b/fighters/miiswordsman/src/status/final_hold.rs new file mode 100644 index 0000000000..a86880d888 --- /dev/null +++ b/fighters/miiswordsman/src/status/final_hold.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD + +unsafe extern "C" fn final_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::WAVE_SPECIAL_N); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, final_hold_pre); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/mod.rs b/fighters/miiswordsman/src/status/mod.rs new file mode 100644 index 0000000000..dd096f977d --- /dev/null +++ b/fighters/miiswordsman/src/status/mod.rs @@ -0,0 +1,46 @@ +use super::*; +use globals::*; +// status script import + +mod special_s1; +mod special_s2; + +mod special_hi; +mod special_hi2; +mod special_hi3; + +mod special_lw; +mod special_lw1; +mod special_lw3; + +mod final_hold; + +pub unsafe extern "C" fn miisword_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + special_s1::install(agent); + special_s2::install(agent); + + special_hi::install(agent); + special_hi2::install(agent); + special_hi3::install(agent); + + special_lw::install(agent); + special_lw1::install(agent); + special_lw3::install(agent); + + final_hold::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi.rs b/fighters/miiswordsman/src/status/special_hi.rs new file mode 100644 index 0000000000..fcccb59d90 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi.rs @@ -0,0 +1,35 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi2.rs b/fighters/miiswordsman/src/status/special_hi2.rs new file mode 100644 index 0000000000..e5130fccb8 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi2.rs @@ -0,0 +1,54 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH + +unsafe extern "C" fn special_hi2_rush_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH)(fighter) +} + +// not running for some reason + +unsafe extern "C" fn special_hi2_rush_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + //println!("SSD Hit"); + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END +// not running for some reason + +unsafe extern "C" fn special_hi2_rush_end_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) && !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + //println!("SSD Success"); + if MotionModule::frame(fighter.module_accessor) >= 30.0 { + //println!("SSD Fall Act"); + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND + +pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_frame"), 0); + WorkModule::set_float(fighter.module_accessor, landing_frame, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, special_hi2_rush_pre); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, special_hi2_rush_exec); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, special_hi2_rush_end_exec); + + agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi3.rs b/fighters/miiswordsman/src/status/special_hi3.rs new file mode 100644 index 0000000000..addccc5ef7 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi3.rs @@ -0,0 +1,172 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD + +pub unsafe extern "C" fn special_hi3_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let mut motion_value = 0.28; + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if stick_x != 0.0 { + KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); + } + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END + +pub unsafe extern "C" fn special_hi3_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +unsafe extern "C" fn special_hi3_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi3_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.7; + + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if miisword_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi3"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi3"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + return 0.into() + } + } + if miisword_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi3"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi3"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_special_hi3_end_Main as *const () as _)); + return 0.into() + } + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + } + else { + return 1.into() + } + return 0.into() +} + +unsafe extern "C" fn sub_special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, special_hi3_hold_exec); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw.rs b/fighters/miiswordsman/src/status/special_lw.rs new file mode 100644 index 0000000000..bf2da38094 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw.rs @@ -0,0 +1,153 @@ +use super::*; + +//FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let lua_state = fighter.lua_state_agent; + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + main_setup(fighter); + let mut l2c_agent = L2CAgent::new(lua_state); + l2c_agent.clear_lua_stack(); + l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(1)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); + sv_battle_object::notify_event_msc_cmd(lua_state); + l2c_agent.pop_lua_stack(1); + l2c_agent.clear_lua_stack(); + l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x3a40337e2c)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); + sv_battle_object::notify_event_msc_cmd(lua_state); + l2c_agent.pop_lua_stack(1); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1") { + if ControlModule::check_button_on_trriger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { + //println!("Kinesis activation"); + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw3") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw3") { + if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { + //println!("Swordfighter gon' give it to ya"); + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND + || fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { + main_setup(fighter); + } + } + } + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLY_POWERUP_MOTION_RATE) == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) { + MotionModule::set_rate(fighter.module_accessor,1.0); + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); + } + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) == false { + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_motion_rate")); + MotionModule::set_rate(fighter.module_accessor,rate); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); + } + } + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + } + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + } + counter_setup(fighter); + num = 0; + } + } + if num == -1 { num = 1; } + } + L2CValue::I32(num) +} + +unsafe extern "C" fn main_setup(fighter: &mut L2CFighterCommon) { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw1"),0.0,1.0,false,0.0,false,false); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_air_lw1"),-1.0,1.0,0.0); + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw1"),0.0,1.0,false,0.0,false,false); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_lw1"),-1.0,1.0,0.0); + } + } +} + +unsafe extern "C" fn counter_setup(fighter: &mut L2CFighterCommon) { + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { + let attack_power = WorkModule::get_float(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_FLOAT_ATTACK_POWER); + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT { + return; + } + if attack_power > 0.0 { + let part = (AttackModule::part_size(fighter.module_accessor) as i32) - 1; + if -1 < part { + let mut box_num = -1; + while box_num <= part { + if AttackModule::is_attack(fighter.module_accessor,box_num + 1, false) { + AttackModule::set_power(fighter.module_accessor,box_num + 1, attack_power, false); + } + box_num += 1; + } + } + } + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK) == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { + return; + } + ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NONE),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { + return; + } + ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NORMAL),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw1.rs b/fighters/miiswordsman/src/status/special_lw1.rs new file mode 100644 index 0000000000..647cd794e8 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw1.rs @@ -0,0 +1,81 @@ +use super::*; + +//FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT + +unsafe extern "C" fn special_lw1_hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { + if StatusModule::situation_kind(fighter.module_accessor) == WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV) { + return L2CValue::I32(0) + } + let speed = KineticModule::get_sum_speed3f(fighter.module_accessor,*KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_AIR { + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_GROUND,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + else { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1_hit") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1_hit") { + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); + app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); + app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); + app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_MOTION); + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + else{ + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); + //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + //let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); + //app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); + //app::sv_kinetic_energy::enable(fighter.lua_state_agent); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); + //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + //let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); + //app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); + //fighter.clear_lua_stack(); + //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); + //app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); + //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + //app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_MOTION); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION); + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + } + } + return L2CValue::I32(0) +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, special_lw1_hit_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw3.rs b/fighters/miiswordsman/src/status/special_lw3.rs new file mode 100644 index 0000000000..21b7fd1ef7 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw3.rs @@ -0,0 +1,149 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END + +unsafe extern "C" fn special_lw3_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) != *SITUATION_KIND_GROUND { + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_GROUND { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end_air"),0.0,1.0,false,0.0,false,false); + if StopModule::is_stop(fighter.module_accessor) == false { + some1(fighter,false.into()); + } + fighter.global_table[0x15].assign(&L2CValue::Ptr(some2 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(some3 as *const () as _)); + } + } + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + some4(fighter); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_air_to_ground_rate")); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,rate,false,0.0,false,false); + fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)); + } + } + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end_air"),0.0,1.0,false,0.0,false,false); + WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); + fighter.sub_shift_status_main(L2CValue::Ptr(some6 as *const () as _)); + } + } + L2CValue::I32(0) + } + else { + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_ground_to_ground_rate")); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end"),0.0,rate,false,0.0,false,false); + fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)) + } +} + +unsafe extern "C" fn some1(fighter: &mut L2CFighterCommon, unk: L2CValue) { + if unk.get_bool() == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_FALL_ONOFF) == false { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_AIR); + } + else { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_FALL); + } + } +} + +unsafe extern "C" fn some2(fighter: &mut L2CFighterCommon, unk2: L2CValue) { + some1(fighter,unk2); +} + +unsafe extern "C" fn some3(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if CancelModule::is_enable_cancel(fighter.module_accessor) == false { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + num = 0; + } + else { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + num = 0; + } + } + if num == -1 { num = 1; } + } + L2CValue::I32(num) +} + +unsafe extern "C" fn some4(fighter: &mut L2CFighterCommon) { + fighter.set_situation(SITUATION_KIND_GROUND.into()); + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); +} + +unsafe extern "C" fn some5(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + num = 0; + } + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + num = 0; + } + } + if num == -1 { num = 1; } + L2CValue::I32(num) +} + +unsafe extern "C" fn some6(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if WorkModule::is_enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL) == false { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if MotionModule::is_end(fighter.module_accessor) == false { + num = 0; + } + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + } + else { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + num = 0; + } + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_LANDING_FALL_SPECIAL) { + let landing_frame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_landing_frame")); + WorkModule::set_float(fighter.module_accessor,landing_frame as f32,*FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(),false.into()); + } + some4(fighter); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,1.0,false,0.0,false,false); + WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); + } + } + } + if num == -1 { num = 1; } + } + } + L2CValue::I32(num) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s1.rs b/fighters/miiswordsman/src/status/special_s1.rs new file mode 100644 index 0000000000..70b1c23f45 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_s1.rs @@ -0,0 +1,298 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK + +unsafe extern "C" fn special_s1_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let force_air = Vector2f {x: 0.0, y: 10.0}; + + PostureModule::add_pos_2d(fighter.module_accessor, &force_air); + + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK)(fighter) + +} + +/* +#[status_script(agent = "miiswordsman", status = FIGHTER_STATUS_KIND_SPECIAL_S, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +unsafe fn miiswordsman_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { + PostureModule::set_stick_lr(fighter.module_accessor, 0.0); + PostureModule::update_rot_y_lr(fighter.module_accessor); + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_start"), 0.0, 1.0, false, 0.0, false, false); + } + else{ + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_start"), 0.0, 1.0, false, 0.0, false, false); + } + //l2c_agent.clear_lua_stack(); + //l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683 as u64)) + lua_args!(fighter, 0x20cbc92683, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(1); + l2c_agent.clear_lua_stack(); + lua_args!(fighter, 0x3a40337e2c, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(1); + + fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1_main as *const () as _)) + +} +*/ + +unsafe extern "C" fn special_s1_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if MotionModule::is_end(fighter.module_accessor) == true { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK.into(), false.into()); + return L2CValue::I32(1); + } + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + } + else if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + + } + + L2CValue::I32(0) +} + +unsafe extern "C" fn special_s1_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); // Removes on side special attack + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); + } + // Commented out but this was the original script + // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + // fighter.set_situation(SITUATION_KIND_AIR.into()); + // } + // else { + // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + // fighter.set_situation(SITUATION_KIND_GROUND.into()); + // } + // But HERE's what we (probably) want + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + // Now for whatever reason they have these change motions in the same conditions as the previous set, so I'm keeping it separate anyway. + // You can *probably* get away with not impling the ground version but eh safety first + //if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + //} + //else { + // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + //} + + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1"), 0.0, 1.0, false, 0.0, false, false); + } + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + //let x_vel = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("jump_neutral_x")); + let x_vel_flip = ControlModule::get_stick_x(fighter.module_accessor) * 1.65 + (0.1 * PostureModule::lr(fighter.module_accessor)); + let y_vel_flip = 3.5; + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, x_vel_flip, y_vel_flip); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + + /* + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_s1") { + println!("ground side special"); + } + */ + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, -0.1); + app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + + // But HERE's what we (probably) want + fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s1_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + // custom [ + // drift at apex of flip + if MotionModule::frame(fighter.module_accessor) > 7.0 && MotionModule::frame(fighter.module_accessor) < 32.0 { + let stick_x = fighter.global_table[STICK_X].get_f32(); + if stick_x != 0.0 { + let drift_speed = 0.15 * stick_x.signum(); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, drift_speed, 0.0); + app::sv_kinetic_energy::add_speed(fighter.lua_state_agent); + // this is here so adding speed doesn't surpass x speed cap we set earlier (by setting a slightly lower speed cap) + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, (1.75 - drift_speed.abs()), -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + } + else { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + } + } + if MotionModule::frame(fighter.module_accessor) >= 15.0 { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL); + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) + || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) + || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3 + | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 + | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + } + // ] + + // This is just (as straight of) an impl that I can get of the main loop, what the hell were the smash devs + // Can only use side special once per aerial time + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if MotionModule::is_end(fighter.module_accessor) == false { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); + return L2CValue::I32(1); + } + return L2CValue::I32(0); + } + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); + } + L2CValue::I32(0) +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END + +pub unsafe extern "C" fn special_s1_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, + *FS_SUCCEEDS_KEEP_SOUND + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_S | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, + 0 + ); + 0.into() +} + +unsafe extern "C" fn special_s1_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_end"), 0.0, 1.0, false, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_end"), 0.0, 1.0, false, 0.0, false, false); + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s1_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if !MotionModule::is_end(fighter.module_accessor) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_HENSOKU_SLASH_WORK_FLAG_END_LANDING) { + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s1_end"), -1.0, 1.0, 0.0, false, false); + let s1_control_limit_mul_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("s1_control_limit_mul_x")); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, 0.0, 0.0, 0.0, 0.0); + smash::app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, s1_control_limit_mul_x); + smash::app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); + return 1.into(); + } + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s1_end"), -1.0, 1.0, 0.0, false, false); + + } + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 1.into(); + } + } + } + return 0.into() + } + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } + else { + if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { + if fighter.sub_air_check_fall_common().get_bool() { + return 1.into() + } + } + } + } + return 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack_main); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s2.rs b/fighters/miiswordsman/src/status/special_s2.rs new file mode 100644 index 0000000000..bce50366fb --- /dev/null +++ b/fighters/miiswordsman/src/status/special_s2.rs @@ -0,0 +1,363 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH + +unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); + WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + special_s2_dash_mot_change(fighter); + // if !StopModule::is_stop(fighter.module_accessor) { + // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + // } + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_s2_dash_dec_int as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s2_dash_mot_change(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES.into()); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_dash"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_dash"), -1.0, 1.0, 0.0, false, false); + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_NONE.into()); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_dash"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_dash"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn special_s2_dash_dec_int(fighter: &mut L2CFighterCommon, unk: L2CValue) -> L2CValue { + if unk.get_bool() { + WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + } + return 0.into() +} + +unsafe extern "C" fn special_s2_dash_unk(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut val = 0; + if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let is_status_cliff = GroundModule::is_status_cliff(fighter.module_accessor); + if is_status_cliff { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); + val = 1; + } + } + } + return val.into() +} + +unsafe extern "C" fn special_s2_dash_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut sub_check = fighter.sub_transition_group_check_air_cliff().get_bool(); + if sub_check { + return 0.into(); + } + sub_check = fighter.sub_ground_check_stop_wall().get_bool(); + if sub_check { + return 0.into(); + } + // custom [ + // Jump and Attack cancels + let pad_flag = ControlModule::get_pad_flag(fighter.module_accessor); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND && MotionModule::frame(fighter.module_accessor) > 7.0 { + if fighter.check_jump_cancel(true, false) { + return 1.into() + } + } + if compare_mask(pad_flag, *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) || compare_mask(pad_flag, *FIGHTER_PAD_FLAG_ATTACK_TRIGGER) { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK.into(),true.into()); + return 1.into() + } + // Wall Jump + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP) { + let touch_right = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); + let touch_left = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_LEFT_SIDE as u32); + if touch_left || touch_right { + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_TURN_DASH | *FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP); + fighter.change_status(FIGHTER_STATUS_KIND_WALL_JUMP.into(),true.into()); + return 1.into() + } + } + } + } + // ] + let slash_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + if slash_frame <= 0 { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); + } + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_dash_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_dash_mot_change(fighter); + } + } + } + else { + special_s2_dash_mot_change(fighter); + } + special_s2_dash_unk(fighter); + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK + +unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); + WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + special_s2_attack_mot_change(fighter); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_attack"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_attack"), -1.0, 1.0, 0.0, false, false); + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_attack"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_attack"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn special_s2_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 0.into(); + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + special_s2_attack_main_helper(fighter); + } + else { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() { + return 0.into(); + } + } + } + return 0.into() +} + +unsafe extern "C" fn special_s2_attack_main_helper(fighter: &mut L2CFighterCommon) { + if !MotionModule::is_end(fighter.module_accessor) { + if !StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_attack_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_attack_mot_change(fighter); + } + } + } + special_s2_dash_unk(fighter); + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_AIR { + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_attack_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_attack_mot_change(fighter); + } + } + } + special_s2_dash_unk(fighter); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), true.into()); + } + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); + } + } +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END + +unsafe extern "C" fn special_s2_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END)(fighter) +} + +unsafe extern "C" fn special_s2_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + special_s2_end_helper(fighter); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s2_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 0.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if !MotionModule::is_end(fighter.module_accessor) { + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + // OG [ special_s2_end_helper(fighter); ] + // custom [ + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(true) + ); + // ] + sub_special_s2_end(fighter); + return 0.into() + } + } + else { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + special_s2_end_helper(fighter); + sub_special_s2_end(fighter); + return 0.into() + } + } + } + else { + // custom [ + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_AIR { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + } + } + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(true) + ); + sub_special_s2_end(fighter); + return 0.into() + } + } + // ] + special_s2_end_helper(fighter); + } + sub_special_s2_end(fighter); + } + else { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(true) + ); + } + } + } + else { + if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { + if fighter.sub_air_check_fall_common().get_bool() { + return 0.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn special_s2_end_helper(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_end"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_end"), -1.0, 1.0, 0.0, false, false); + } + } + else { + // OG [ GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); ] + // custom [ + if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + } + else { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + } + // ] + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_NONE)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_end"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_end"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn sub_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[STATUS_KIND_INTERRUPT] == FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if GroundModule::is_status_cliff(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END), + L2CValue::Bool(true) + ); + return 1.into() + } + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash_main); + + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack_main); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornadoshot/acmd.rs b/fighters/miiswordsman/src/tornadoshot/acmd.rs new file mode 100644 index 0000000000..df4f56e562 --- /dev/null +++ b/fighters/miiswordsman/src/tornadoshot/acmd.rs @@ -0,0 +1,20 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 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_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/miiswordsman/src/tornadoshot/mod.rs b/fighters/miiswordsman/src/tornadoshot/mod.rs new file mode 100644 index 0000000000..7c8a24408d --- /dev/null +++ b/fighters/miiswordsman/src/tornadoshot/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_tornadoshot"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornadoshot/opff.rs b/fighters/miiswordsman/src/tornadoshot/opff.rs new file mode 100644 index 0000000000..7c68411d70 --- /dev/null +++ b/fighters/miiswordsman/src/tornadoshot/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn tornadoshot_frame(weapon: &mut L2CFighterBase) { + unsafe { + ModelModule::set_joint_scale(weapon.module_accessor, Hash40::new("top"), &Vector3f::new(0.6, 0.6, 0.6)); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tornadoshot_frame); +} \ No newline at end of file diff --git a/fighters/murabito/src/acmd/aerials.rs b/fighters/murabito/src/acmd/aerials.rs index 40935bb369..2dc437c23a 100644 --- a/fighters/murabito/src/acmd/aerials.rs +++ b/fighters/murabito/src/acmd/aerials.rs @@ -1,239 +1,233 @@ - use super::*; -unsafe extern "C" fn murabito_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("handl"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn murabito_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 9.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SLINGSHOT, true, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 135, 0, 40, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 135, 0, 40, 6.0, 0.0, 5.5, -10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 135, 0, 40, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 135, 0, 40, 6.0, 0.0, 5.5, -10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 19.0/(41.0-28.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 19.0/(41.0-28.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } //Not an ideal solution as hitbox will appear a frame before effects begin. Will have to revisit this in the future for a better solution -unsafe extern "C" fn murabito_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("haver"), 0.0, -4.0, 0.0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("murabito_firework"), Hash40::new("top"), 0, 4.5, -10.0, 0, -90, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT(fighter, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -5.0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -10.0, 0, -90, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("haver"), 0.0, -4.0, 0.0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("murabito_firework"), Hash40::new("top"), 0, 4.5, -10.0, 0, -90, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT(agent, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -5.0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -10.0, 0, -90, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } - } -unsafe extern "C" fn murabito_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_murabito_attackair_b01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_murabito_attackair_b01")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_murabito_smash_h02")); } - } -unsafe extern "C" fn murabito_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn murabito_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 85, 105, 0, 30, 5.2, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 105, 0, 30, 5.2, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 85, 105, 0, 30, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 85, 105, 0, 30, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 85, 105, 0, 30, 7.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 85, 105, 0, 30, 7.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 90, 60, 0, 50, 4.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 60, 0, 50, 4.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 60, 0, 50, 5.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 60, 0, 50, 5.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 60, 0, 50, 6.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 60, 0, 50, 6.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn murabito_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.769); + FT_MOTION_RATE(agent, 0.769); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 270, 80, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 270, 86, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 270, 80, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 270, 86, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 69, 60, 0, 50, 4.2, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 69, 60, 0, 50, 4.2, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 69, 60, 0, 50, 5.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 69, 60, 0, 50, 5.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 69, 60, 0, 50, 6.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 69, 60, 0, 50, 6.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attackairn", murabito_attack_air_n_game) - .acmd("game_attackairb", murabito_attack_air_b_game) - .acmd("effect_attackairb", murabito_attack_air_b_effect) - .acmd("sound_attackairb", murabito_attack_air_b_sound) - .acmd("expression_attackairb", murabito_attack_air_b_expression) - .acmd("game_attackairhi", murabito_attack_air_hi_game) - .acmd("game_attackairlw", murabito_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/murabito/src/acmd/ground.rs b/fighters/murabito/src/acmd/ground.rs index 4bcde4c9f7..e18057c132 100644 --- a/fighters/murabito/src/acmd/ground.rs +++ b/fighters/murabito/src/acmd/ground.rs @@ -1,26 +1,23 @@ - use super::*; -unsafe extern "C" fn murabito_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FLOWERPOT, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FLOWERPOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 30.0/(44.0-10.0)); + FT_MOTION_RATE(agent, 30.0/(44.0-10.0)); } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attackdash", murabito_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/murabito/src/acmd/mod.rs b/fighters/murabito/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/murabito/src/acmd/mod.rs +++ b/fighters/murabito/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/murabito/src/acmd/other.rs b/fighters/murabito/src/acmd/other.rs index c08039f786..9f8660ed5a 100644 --- a/fighters/murabito/src/acmd/other.rs +++ b/fighters/murabito/src/acmd/other.rs @@ -1,157 +1,69 @@ - use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_murabito_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_murabito_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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 murabito_slingshot_attackairb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - - } - -} - -unsafe extern "C" fn murabito_bullet_shoot_f_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"), 7.0, 60, 132, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 100, 0, 10, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn murabito_clayrocket_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 110, 55, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_KICK, *ATTACK_REGION_OBJECT); - } - } -unsafe extern "C" fn murabito_flowerpot_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("have"), 10.0, 70, 60, 0, 70, 4.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn murabito_flowerpot_bound_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !WorkModule::is_flag(boma, *WEAPON_MURABITO_FLOWERPOT_INSTANCE_WORK_ID_FLAG_ASASE) { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("murabito_pot_boundsmoke"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - else { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_water_walk"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 4.0, 361, 60, 0, 40, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } -} - -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("murabito_bullet") - .acmd("game_shootf", murabito_bullet_shoot_f_game) - .install(); - smashline::Agent::new("murabito_slingshot") - .acmd("game_attackairb", murabito_slingshot_attackairb_game) - .install(); - smashline::Agent::new("murabito") - .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) - .install(); - smashline::Agent::new("murabito_clayrocket") - .acmd("game_fly", murabito_clayrocket_fly_game) - .install(); - smashline::Agent::new("murabito_flowerpot") - .acmd("game_throwed", murabito_flowerpot_throwed_game) - .acmd("effect_bound", murabito_flowerpot_bound_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/murabito/src/acmd/smashes.rs b/fighters/murabito/src/acmd/smashes.rs index 611ce3fe8a..868df8e393 100644 --- a/fighters/murabito/src/acmd/smashes.rs +++ b/fighters/murabito/src/acmd/smashes.rs @@ -1,101 +1,61 @@ - use super::*; -unsafe extern "C" fn murabito_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 60.0, 29.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 60.0, 29.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn murabito_bowlingball__game_fall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn murabito_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn murabito_firework_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -118,7 +78,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -126,18 +86,18 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -160,7 +120,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -168,44 +128,43 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -213,35 +172,35 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -249,60 +208,53 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } - } -unsafe extern "C" fn murabito_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } } -pub fn install() { - smashline::Agent::new("murabito_bowlingball") - .acmd("game_fall", murabito_bowlingball__game_fall) - .install(); - smashline::Agent::new("murabito") - .acmd("game_attacks4", murabito_attack_s4_s_game) - .acmd("game_attackhi4", murabito_attack_hi4_game) - .acmd("game_attacklw4", murabito_attack_lw4_game) - .acmd("effect_attacklw4", murabito_attack_lw4_effect) - .acmd("sound_attacklw4", murabito_attack_lw4_sound) - .install(); - smashline::Agent::new("murabito_firework") - .acmd("game_shoot", murabito_firework_shoot_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); } diff --git a/fighters/murabito/src/acmd/specials.rs b/fighters/murabito/src/acmd/specials.rs index 5ebe6bd1ed..b1dc543a46 100644 --- a/fighters/murabito/src/acmd/specials.rs +++ b/fighters/murabito/src/acmd/specials.rs @@ -1,57 +1,53 @@ - use super::*; -unsafe extern "C" fn murabito_special_lw1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw1(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) { WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_LW_PLANT_FLAG_CHECK_PLANT); - FT_MOTION_RATE(fighter, 0.661); + FT_MOTION_RATE(agent, 0.661); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SEED, false, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 72, 20, 0, 80, 4.0, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 20, 0, 80, 4.0, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_LW_PLANT_FLAG_PLANT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_special_lw3_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw3hit(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 !ItemModule::is_have_item(boma, 0){ ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } } - } -unsafe extern "C" fn murabito_special_air_lw3_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw3hit(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 !ItemModule::is_have_item(boma, 0){ ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } } - } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_speciallw1", murabito_special_lw1_game) - .acmd("game_speciallw3hit", murabito_special_lw3_hit_game) - .acmd("game_specialairlw3hit", murabito_special_air_lw3_hit_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1", game_speciallw1); + + agent.acmd("game_speciallw3hit", game_speciallw3hit); + agent.acmd("game_specialairlw3hit", game_specialairlw3hit); } diff --git a/fighters/murabito/src/acmd/throws.rs b/fighters/murabito/src/acmd/throws.rs index fac60fb0cf..3f115ebd78 100644 --- a/fighters/murabito/src/acmd/throws.rs +++ b/fighters/murabito/src/acmd/throws.rs @@ -1,164 +1,165 @@ use super::*; -unsafe extern "C" fn murabito_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BUTTERFLYNET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn murabito_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } } -unsafe extern "C" fn murabito_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } } -unsafe extern "C" fn murabito_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 7); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn murabito_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 135, 102, 0, 46, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 135, 102, 0, 46, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -2, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -2, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - REVERSE_LR(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + REVERSE_LR(agent); } } -unsafe extern "C" fn murabito_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 52, 0, 94, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 52, 0, 94, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 10, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 10, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_catch", murabito_catch_game) - .acmd("game_catchdash", murabito_catch_dash_game) - .acmd("game_catchturn", murabito_catch_turn_game) - .acmd("game_throwf", murabito_throw_f_game) - .acmd("game_throwb", murabito_throw_b_game) - .acmd("game_throwhi", murabito_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/murabito/src/acmd/tilts.rs b/fighters/murabito/src/acmd/tilts.rs index 875d5f76d4..9f448521bb 100644 --- a/fighters/murabito/src/acmd/tilts.rs +++ b/fighters/murabito/src/acmd/tilts.rs @@ -1,75 +1,72 @@ - use super::*; -unsafe extern "C" fn murabito_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_UMBRELLA, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 2.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 2.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.877); + FT_MOTION_RATE(agent, 0.877); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_UMBRELLA, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn murabito_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.850); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 3.8, 0.0, -1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 5.0, 135, 10, 0, 35, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.850); + ATTACK(agent, 0, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 3.8, 0.0, -1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 5.0, 135, 10, 0, 35, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(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) { // START DTilt Sapling Removal Logic... VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); @@ -94,7 +91,7 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { } // ... END Dtilt Sapling Removal Logic - FT_MOTION_RATE(fighter, 0.746); + FT_MOTION_RATE(agent, 0.746); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); // If the flag is not set, generate weeds if !VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { @@ -102,15 +99,15 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -118,50 +115,49 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 90, 92, 0, 68, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 90, 92, 0, 68, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_WEEDS, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 78, 70, 0, 60, 5.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 89, 70, 0, 60, 5.0, 0.0, 3.0, 10.0, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 78, 70, 0, 60, 5.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 89, 70, 0, 60, 5.0, 0.0, 3.0, 10.0, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } - } -unsafe extern "C" fn murabito_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil"), Hash40::new("top"), 7.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil"), Hash40::new("top"), 7.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -169,39 +165,39 @@ unsafe extern "C" fn murabito_attack_lw3_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1.0, 0.5, 0.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), 1.0, 0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1.0, 0.5, 0.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), 1.0, 0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn murabito_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_attackhard_l01")); + PLAY_SE(agent, Hash40::new("se_murabito_attackhard_l01")); } } } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attacks3", murabito_attack_s3_s_game) - .acmd("game_attackhi3", murabito_attack_hi3_game) - .acmd("game_attacklw3", murabito_attack_lw3_game) - .acmd("effect_attacklw3", murabito_attack_lw3_effect) - .acmd("sound_attacklw3", murabito_attack_lw3_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); } diff --git a/fighters/murabito/src/bowlingball/acmd.rs b/fighters/murabito/src/bowlingball/acmd.rs new file mode 100644 index 0000000000..1d71786036 --- /dev/null +++ b/fighters/murabito/src/bowlingball/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/murabito/src/bowlingball/mod.rs b/fighters/murabito/src/bowlingball/mod.rs new file mode 100644 index 0000000000..6a42f341a5 --- /dev/null +++ b/fighters/murabito/src/bowlingball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_bowlingball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/bullet/acmd.rs b/fighters/murabito/src/bullet/acmd.rs new file mode 100644 index 0000000000..48c9762df3 --- /dev/null +++ b/fighters/murabito/src/bullet/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_shootf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 132, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 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_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 100, 0, 10, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 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_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shootf", game_shootf); +} diff --git a/fighters/murabito/src/bullet/mod.rs b/fighters/murabito/src/bullet/mod.rs new file mode 100644 index 0000000000..8a79b834f6 --- /dev/null +++ b/fighters/murabito/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/clayrocket/acmd.rs b/fighters/murabito/src/clayrocket/acmd.rs new file mode 100644 index 0000000000..7506b224b5 --- /dev/null +++ b/fighters/murabito/src/clayrocket/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 110, 55, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/murabito/src/clayrocket/mod.rs b/fighters/murabito/src/clayrocket/mod.rs new file mode 100644 index 0000000000..50e099bcc2 --- /dev/null +++ b/fighters/murabito/src/clayrocket/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("murabito_clayrocket"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/clayrocket/opff.rs b/fighters/murabito/src/clayrocket/opff.rs new file mode 100644 index 0000000000..74c9e943b9 --- /dev/null +++ b/fighters/murabito/src/clayrocket/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn clayrocket_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, clayrocket_callback); +} \ No newline at end of file diff --git a/fighters/murabito/src/firework/acmd.rs b/fighters/murabito/src/firework/acmd.rs new file mode 100644 index 0000000000..32724eaaa3 --- /dev/null +++ b/fighters/murabito/src/firework/acmd.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *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_BOMB); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} diff --git a/fighters/murabito/src/firework/mod.rs b/fighters/murabito/src/firework/mod.rs new file mode 100644 index 0000000000..fa9c9a101d --- /dev/null +++ b/fighters/murabito/src/firework/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_firework"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/flowerpot/acmd.rs b/fighters/murabito/src/flowerpot/acmd.rs new file mode 100644 index 0000000000..f6986032ac --- /dev/null +++ b/fighters/murabito/src/flowerpot/acmd.rs @@ -0,0 +1,37 @@ +use super::*; + +unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 10.0, 70, 60, 0, 70, 4.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn effect_bound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !WorkModule::is_flag(boma, *WEAPON_MURABITO_FLOWERPOT_INSTANCE_WORK_ID_FLAG_ASASE) { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("murabito_pot_boundsmoke"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + else { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_water_walk"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 4.0, 361, 60, 0, 40, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwed", game_throwed); + agent.acmd("effect_bound", effect_bound); +} diff --git a/fighters/murabito/src/flowerpot/mod.rs b/fighters/murabito/src/flowerpot/mod.rs new file mode 100644 index 0000000000..5137fa6406 --- /dev/null +++ b/fighters/murabito/src/flowerpot/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("murabito_flowerpot"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/flowerpot/opff.rs b/fighters/murabito/src/flowerpot/opff.rs new file mode 100644 index 0000000000..92c44f1170 --- /dev/null +++ b/fighters/murabito/src/flowerpot/opff.rs @@ -0,0 +1,16 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn flowerpot_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status( *WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_THROWED ) && AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { + weapon.change_status(WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_BURST.into(), false.into()); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, flowerpot_callback); +} \ No newline at end of file diff --git a/fighters/murabito/src/lib.rs b/fighters/murabito/src/lib.rs index 5537dac979..6ccb9ff693 100644 --- a/fighters/murabito/src/lib.rs +++ b/fighters/murabito/src/lib.rs @@ -4,8 +4,17 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bowlingball; +mod bullet; +mod clayrocket; +mod firework; +mod flowerpot; +mod slingshot; use smash::{ lib::{ @@ -37,9 +46,19 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("murabito"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bowlingball::install(); + bullet::install(); + clayrocket::install(); + firework::install(); + flowerpot::install(); + slingshot::install(); } \ No newline at end of file diff --git a/fighters/murabito/src/opff.rs b/fighters/murabito/src/opff.rs index f64a85697a..93c5f00d27 100644 --- a/fighters/murabito/src/opff.rs +++ b/fighters/murabito/src/opff.rs @@ -108,25 +108,6 @@ pub unsafe fn murabito_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn article_frame_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() == *WEAPON_KIND_MURABITO_FLOWERPOT { - if weapon.is_status( *WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_THROWED ) && AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { - weapon.change_status(WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_BURST.into(), false.into()); - } - } else if weapon.kind() == *WEAPON_KIND_MURABITO_CLAYROCKET { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } else { - return; - } - } -} - -pub fn install() { - smashline::Agent::new("murabito") - .on_line(Main, murabito_frame_wrapper) - .install(); - smashline::Agent::new("murabito_flowerpot") - .on_line(Main, article_frame_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, murabito_frame_wrapper); } \ No newline at end of file diff --git a/fighters/murabito/src/slingshot/acmd.rs b/fighters/murabito/src/slingshot/acmd.rs new file mode 100644 index 0000000000..53d339490d --- /dev/null +++ b/fighters/murabito/src/slingshot/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairb", stub); +} diff --git a/fighters/murabito/src/slingshot/mod.rs b/fighters/murabito/src/slingshot/mod.rs new file mode 100644 index 0000000000..5010fcfc88 --- /dev/null +++ b/fighters/murabito/src/slingshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_slingshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/status.rs b/fighters/murabito/src/status.rs deleted file mode 100644 index b63be8dc4e..0000000000 --- a/fighters/murabito/src/status.rs +++ /dev/null @@ -1,128 +0,0 @@ -use super::*; -use globals::*; -// status script import - - -// Prevents sideB from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -// Re-enables the ability to use sideB when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); - } - true.into() -} - -extern "C" fn murabito_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_MURABITO { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -// FIGHTER_STATUS_KIND_SPECIAL_S // - -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::on_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); - 0.into() -} - -// FIGHTER_STATUS_KIND_JUMP // - -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { - if !fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - } - return L2CValue::I32(1); - } - } - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_POWBLOCK_QUAKE_JUMP); - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - return L2CValue::I32(0); -} - -pub unsafe extern "C" fn jump(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { - fighter.sub_jump_item_rocketbelt(); - fighter.status_Jump_sub(L2CValue::Hash40s("invalid"), L2CValue::F32(0.0)); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) - } - else { - // uncomment to let sideB ride remove double jump on hit - //let jump_count_max = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT_MAX); - //WorkModule::set_int(fighter.module_accessor, jump_count_max, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - fighter.status_Jump_sub(L2CValue::new_hash(hash40("jump_b")), L2CValue::F32(0.0)); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) - } -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air(); - let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - if [hash40("attack_air_hi")].contains(&motion) { - // Usually there's code in here to check for the random turnip pulls. However... we don't want that. - // Instead, we want to force the turnip count to go in a rotation of 1 > 2 > 3 > 1 > 2 > 3 ... - let mut turnip_num_hi = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI); - // Adds 1 to the turnip count. If the new turnip count is not 1, 2, or 3, reset it back to 1. - turnip_num_hi += 1; - if !(1..=3).contains(&turnip_num_hi) { - turnip_num_hi = 1; - } - VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI, turnip_num_hi); - WorkModule::set_int(fighter.module_accessor, turnip_num_hi, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); - - } else if [hash40("attack_air_lw")].contains(&motion) { - let mut turnip_num_lw = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW); - turnip_num_lw += 1; - if !(1..=3).contains(&turnip_num_lw) { - turnip_num_lw = 1; - } - VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW, turnip_num_lw); - WorkModule::set_int(fighter.module_accessor, turnip_num_lw, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); - - } else if [ - hash40("attack_air_f"), - hash40("attack_air_b") - ].contains(&motion) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); - } - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) -} - -pub fn install() { - smashline::Agent::new("murabito") - .on_start(murabito_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status(Main, *FIGHTER_STATUS_KIND_JUMP, jump) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .install(); -} \ No newline at end of file diff --git a/fighters/murabito/src/status/attack_air.rs b/fighters/murabito/src/status/attack_air.rs new file mode 100644 index 0000000000..852c088515 --- /dev/null +++ b/fighters/murabito/src/status/attack_air.rs @@ -0,0 +1,40 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air(); + let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); + if [hash40("attack_air_hi")].contains(&motion) { + // Usually there's code in here to check for the random turnip pulls. However... we don't want that. + // Instead, we want to force the turnip count to go in a rotation of 1 > 2 > 3 > 1 > 2 > 3 ... + let mut turnip_num_hi = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI); + // Adds 1 to the turnip count. If the new turnip count is not 1, 2, or 3, reset it back to 1. + turnip_num_hi += 1; + if !(1..=3).contains(&turnip_num_hi) { + turnip_num_hi = 1; + } + VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI, turnip_num_hi); + WorkModule::set_int(fighter.module_accessor, turnip_num_hi, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); + + } else if [hash40("attack_air_lw")].contains(&motion) { + let mut turnip_num_lw = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW); + turnip_num_lw += 1; + if !(1..=3).contains(&turnip_num_lw) { + turnip_num_lw = 1; + } + VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW, turnip_num_lw); + WorkModule::set_int(fighter.module_accessor, turnip_num_lw, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); + + } else if [ + hash40("attack_air_f"), + hash40("attack_air_b") + ].contains(&motion) { + notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); + } + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); +} \ No newline at end of file diff --git a/fighters/murabito/src/status/jump.rs b/fighters/murabito/src/status/jump.rs new file mode 100644 index 0000000000..0409d81633 --- /dev/null +++ b/fighters/murabito/src/status/jump.rs @@ -0,0 +1,50 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP + +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { + if !fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + } + return L2CValue::I32(1); + } + } + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_POWBLOCK_QUAKE_JUMP); + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + return L2CValue::I32(0); +} + +pub unsafe extern "C" fn jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { + fighter.sub_jump_item_rocketbelt(); + fighter.status_Jump_sub(L2CValue::Hash40s("invalid"), L2CValue::F32(0.0)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) + } + else { + // uncomment to let sideB ride remove double jump on hit + //let jump_count_max = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT_MAX); + //WorkModule::set_int(fighter.module_accessor, jump_count_max, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + fighter.status_Jump_sub(L2CValue::new_hash(hash40("jump_b")), L2CValue::F32(0.0)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump_main); +} \ No newline at end of file diff --git a/fighters/murabito/src/status/mod.rs b/fighters/murabito/src/status/mod.rs new file mode 100644 index 0000000000..03c2dc31ba --- /dev/null +++ b/fighters/murabito/src/status/mod.rs @@ -0,0 +1,39 @@ +use super::*; +use globals::*; +// status script import + +mod attack_air; +mod jump; +mod special_s; + +// Prevents sideB from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +// Re-enables the ability to use sideB when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + jump::install(agent); + special_s::install(agent); +} \ No newline at end of file diff --git a/fighters/murabito/src/status/special_s.rs b/fighters/murabito/src/status/special_s.rs new file mode 100644 index 0000000000..f8dbe4dd03 --- /dev/null +++ b/fighters/murabito/src/status/special_s.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::on_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); +} \ No newline at end of file diff --git a/fighters/nana/src/acmd/aerials.rs b/fighters/nana/src/acmd/aerials.rs deleted file mode 100644 index 64a9ca2586..0000000000 --- a/fighters/nana/src/acmd/aerials.rs +++ /dev/null @@ -1,211 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn nana_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} - -unsafe extern "C" fn nana_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_effect_attackairb_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn nana_attack_air_hi_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, 5.0 / (10.0 - 1.0)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0 / (33.0 - 10.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0 / (36.0 - 33.0)); - AttackModule::clear_all(boma); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn nana_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - // skipping the frames where they bring hammer way above their head - FT_MOTION_RATE(fighter, 1.0/(11.0 - 3.0)); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0 / (54.0 - 11.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 22.0/(63.0 - 54.0)); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn effect_attackairlw_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn nana_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("havel"), 0.0, 7.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn nana_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 18.0); - if is_excute(fighter){ - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attackairn_nana", nana_attack_air_n_game) - .acmd("game_attackairf_nana", nana_attack_air_f_game) - .acmd("effect_attackairf_nana", nana_attack_air_f_effect) - .acmd("game_attackairb_nana", nana_attack_air_b_game) - .acmd("effect_attackairb_nana", nana_effect_attackairb_nana) - .acmd("game_attackairhi_nana", nana_attack_air_hi_game) - .acmd("effect_attackairhi_nana", nana_attack_air_hi_effect) - .acmd("game_attackairlw_nana", nana_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .acmd("effect_attackairlw_nana", effect_attackairlw_nana) - .acmd("effect_landingairlw_nana", nana_landing_air_lw_effect) - .acmd("expression_landingairlw_nana", nana_landing_air_lw_expression) - .install(); -} \ No newline at end of file diff --git a/fighters/nana/src/acmd/ground.rs b/fighters/nana/src/acmd/ground.rs deleted file mode 100644 index bc3b60bd75..0000000000 --- a/fighters/nana/src/acmd/ground.rs +++ /dev/null @@ -1,54 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 2.5, 3.0, 5.0, 7.0, Some(-3.0), Some(5.0), Some(7.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 3.0, 3.0, 5.0, 10.0, Some(-3.0), Some(5.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 180, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 361, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } - -} - -unsafe extern "C" fn nana_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 24.0/(41.0 - 15.0)); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attack11_nana", nana_attack_11_game) - .acmd("game_attackdash_nana", nana_attack_dash_game) - .install(); -} diff --git a/fighters/nana/src/acmd/mod.rs b/fighters/nana/src/acmd/mod.rs deleted file mode 100644 index 484e04a282..0000000000 --- a/fighters/nana/src/acmd/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -use super::*; -mod aerials; -mod tilts; -mod other; -mod smashes; -mod specials; -mod throws; -mod ground; - -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} \ No newline at end of file diff --git a/fighters/nana/src/acmd/other.rs b/fighters/nana/src/acmd/other.rs deleted file mode 100644 index 95da7b04e2..0000000000 --- a/fighters/nana/src/acmd/other.rs +++ /dev/null @@ -1,261 +0,0 @@ - -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_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_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_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_popo_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_FLIPPABLE(fighter, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); - } -} - -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - 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(); - 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) { - 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); - } -} - -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 29.0); - if is_excute(fighter) { - 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); - } -} - -unsafe extern "C" fn blizzard_fly_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"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn nana_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.8, 0.0, 7.2, 7.4, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_catch_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 11, -1.5, 10, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } -} - -unsafe extern "C" fn nana_catch_attack_expression(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_L); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .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("game_dash_nana", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash_nana", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_catchattack_nana", nana_catch_attack_game) - .acmd("effect_catchattack_nana", nana_catch_attack_effect) - .acmd("expression_catchattack_nana", nana_catch_attack_expression) - .install(); - smashline::Agent::new("nana_blizzard") - .acmd("game_fly", blizzard_fly_game) - .install(); -} diff --git a/fighters/nana/src/acmd/smashes.rs b/fighters/nana/src/acmd/smashes.rs deleted file mode 100644 index c1f5db1728..0000000000 --- a/fighters/nana/src/acmd/smashes.rs +++ /dev/null @@ -1,161 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_attack_hi4_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, 0.500); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn nana_attack_lw4_expression(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_L); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attacks4_nana", nana_attack_s4_s_game) - .acmd("effect_attacks4_nana", nana_attack_s4_s_effect) - .acmd("game_attackhi4_nana", nana_attack_hi4_game) - .acmd("game_attacklw4_nana", nana_attack_lw4_game) - .acmd("effect_attacklw4_nana", effect_attacklw4) - .acmd("expression_attacklw4_nana", nana_attack_lw4_expression) - .install(); -} diff --git a/fighters/nana/src/acmd/specials.rs b/fighters/nana/src/acmd/specials.rs deleted file mode 100644 index a99b4afdc5..0000000000 --- a/fighters/nana/src/acmd/specials.rs +++ /dev/null @@ -1,53 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); - } -} - -unsafe extern "C" fn nana_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_specialn_nana", nana_special_n_game) - .acmd("game_specialairn_nana", nana_special_air_n_game) - .install(); -} diff --git a/fighters/nana/src/acmd/throws.rs b/fighters/nana/src/acmd/throws.rs deleted file mode 100644 index 190ea7f3b8..0000000000 --- a/fighters/nana/src/acmd/throws.rs +++ /dev/null @@ -1,456 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_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); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.176); - 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 nana_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } -} - -unsafe extern "C" fn nana_catch_dash_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.285); - frame(lua_state, 7.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.21); - 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 nana_catch_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_popo_landing01")); - } -} - -unsafe extern "C" fn nana_catch_turn_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.125); - frame(lua_state, 8.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.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 nana_catch_turn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } -} - -unsafe extern "C" fn nana_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - // scale attack startup based on opponent weight - let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE(fighter, ((weight/100.00) * 32.0) / 36.0); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CHECK_FINISH_CAMERA(fighter, 10, 4); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 17.0/(49.0 - 37.0)); - } -} - -unsafe extern "C" fn nana_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4.5, 5.4, 8, -90, 0, 0, 0.9, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 9, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_throw_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack04")); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_03")); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - PLAY_DOWN_SE(fighter, Hash40::new("se_common_down_s_01")); - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_m")); - } -} - -unsafe extern "C" fn nana_throw_lw_expression(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_L); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 4, false, 0x50000000 /* default value */); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -unsafe extern "C" fn nana_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 9); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 22.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 8, 1, 163.714, 220.144, -140.09, 1.35, true, *EF_FLIP_YZ); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn nana_throw_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - PLAY_SE(fighter, Hash40::new("vc_nana_attack01")); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_popo_swing_l")); - } -} - -unsafe extern "C" fn nana_throw_f_expression(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_L); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn nana_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - FT_MOTION_RATE(fighter, 28.0/20.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 19); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 24.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), -1.5, 10, -3, 180, -90, -270, 1.3, true, *EF_FLIP_YZ); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn nana_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack03")); - PLAY_SE(fighter, Hash40::new("se_popo_swing_ll")); - } -} - -unsafe extern "C" fn nana_throw_hi_expression(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_L); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } -} - -unsafe extern "C" fn nana_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 10); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - } -} - -unsafe extern "C" fn nana_throw_b_effect(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_smash_flash_s"), Hash40::new("throw"), -5, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 16.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_throw_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack02")); - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); - } -} - -unsafe extern "C" fn nana_throw_b_expression(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_INTP, *SLOPE_STATUS_TOP, 14); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 10); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_catch_nana", nana_catch_game) - .acmd("sound_catch_nana", nana_catch_sound) - .acmd("game_catchdash_nana", nana_catch_dash_game) - .acmd("sound_catchdash_nana", nana_catch_dash_sound) - .acmd("game_catchturn_nana", nana_catch_turn_game) - .acmd("sound_catchturn_nana", nana_catch_turn_sound) - .acmd("game_throwlw_nana", nana_throw_lw_game) - .acmd("effect_throwlw_nana", nana_throw_lw_effect) - .acmd("sound_throwlw_nana", nana_throw_lw_sound) - .acmd("expression_throwlw_nana", nana_throw_lw_expression) - .acmd("game_throwf_nana", nana_throw_f_game) - .acmd("effect_throwf_nana", nana_throw_f_effect) - .acmd("sound_throwf_nana", nana_throw_f_sound) - .acmd("expression_throwf_nana", nana_throw_f_expression) - .acmd("game_throwhi_nana", nana_throw_hi_game) - .acmd("effect_throwhi_nana", nana_throw_hi_effect) - .acmd("sound_throwhi_nana", nana_throw_hi_sound) - .acmd("expression_throwhi_nana", nana_throw_hi_expression) - .acmd("game_throwb_nana", nana_throw_b_game) - .acmd("effect_throwb_nana", nana_throw_b_effect) - .acmd("sound_throwb_nana", nana_throw_b_sound) - .acmd("expression_throwb_nana", nana_throw_b_expression) - .install(); -} diff --git a/fighters/nana/src/acmd/tilts.rs b/fighters/nana/src/acmd/tilts.rs deleted file mode 100644 index 48a8d126d7..0000000000 --- a/fighters/nana/src/acmd/tilts.rs +++ /dev/null @@ -1,132 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - FT_MOTION_RATE(fighter, 16.0 / (32.0 - 9.0)); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); - } - wait(lua_state, 5.0); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } -} - -unsafe extern "C" fn nana_attack_lw3_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, 0.714); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attacks3hi_nana", nana_attack_s3_hi_game) - .acmd("game_attacks3_nana", nana_attack_s3_s_game) - .acmd("game_attacks3lw_nana", nana_attack_s3_lw_game) - .acmd("game_attackhi3_nana", nana_attack_hi3_game) - .acmd("effect_attackhi3_nana", nana_attack_hi3_effect) - .acmd("game_attacklw3_nana", nana_attack_lw3_game) - .install(); -} diff --git a/fighters/nana/src/lib.rs b/fighters/nana/src/lib.rs deleted file mode 100644 index 40e3787ac4..0000000000 --- a/fighters/nana/src/lib.rs +++ /dev/null @@ -1,57 +0,0 @@ -#![deny(deprecated)] -#![allow(unused)] -#![allow(non_snake_case)] - -pub mod acmd; - -pub mod status; -pub mod opff; - -use smash::{ - lib::{ - L2CValue, - LuaConst, - }, - app::{ - *, - self, - sv_animcmd::{ - frame, - wait - }, - lua_bind::* - }, - hash40, - lib::lua_const::*, - lua2cpp::*, - phx::* -}; -use smash_script::{ - *, - macros::* -}; -use utils::{ - *, - util::*, - ext::*, - consts::*, -}; -use smashline::*; - -pub fn install() { - acmd::install(); - status::install(); - opff::install(); - - // NOPs nana's change_status call (inner impl) to the FIGHTER_POPO_STATUS_KIND_THROW_NANA status when buffered - skyline::patching::Patch::in_text(0xfb6434).nop(); - - // NOPs nana's change_motion call (inner impl) to the throw animations (her cheer animations) status when buffered - skyline::patching::Patch::in_text(0xfb6540).nop(); - - // NOPs nana's change_status call (inner impl) to the FIGHTER_POPO_STATUS_KIND_THROW_NANA status status when not buffered - skyline::patching::Patch::in_text(0xfba3e8).nop(); - - // NOPs nana's change_motion call (inner impl) to the throw animations (her cheer animations) status when not buffered - skyline::patching::Patch::in_text(0xfbb8d0).nop(); -} diff --git a/fighters/nana/src/opff.rs b/fighters/nana/src/opff.rs deleted file mode 100644 index 9f231ec4ba..0000000000 --- a/fighters/nana/src/opff.rs +++ /dev/null @@ -1,48 +0,0 @@ -// opff import -utils::import_noreturn!(common::opff::fighter_common_opff); -use super::*; -use globals::*; - -// Ice Climbers Cheer Cancel (Techy) -unsafe fn cheer_cancel(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_POPO_STATUS_KIND_THROW_NANA) { - MotionModule::set_frame(fighter.module_accessor, MotionModule::end_frame(fighter.module_accessor), true); - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_WAIT, true); - } -} - -// symbol-based call for the shotos' common opff -extern "Rust" { - fn ice_climbers_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); -} - -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - // nothing lol -} - -pub fn cheer_cancel_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - cheer_cancel(fighter); - } -} - -pub extern "C" fn nana_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - common::opff::fighter_common_opff(fighter); - nana_frame(fighter); - ice_climbers_common(fighter); - cheer_cancel_wrapper(fighter); - } -} - -pub unsafe fn nana_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .on_line(Main, nana_frame_wrapper) - .install(); -} \ No newline at end of file diff --git a/fighters/ness/src/acmd/aerials.rs b/fighters/ness/src/acmd/aerials.rs index 251da7b770..c64609f40e 100644 --- a/fighters/ness/src/acmd/aerials.rs +++ b/fighters/ness/src/acmd/aerials.rs @@ -1,310 +1,307 @@ - use super::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 11.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 11.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 25, 5.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("handr"), 11.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("handl"), 11.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 25, 5.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + agent.clear_lua_stack(); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4.7, 4, 40, 0, -13, 0.7, true); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); + } + frame(lua_state, 11.0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); + } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 83, 0, 19, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 05, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 05, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 4.9, 0.0, 4.8, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 125, 0, 12, 2.5, 0.0, 3.8, 6.0, Some(0.0), Some(3.8), Some(3.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 361, 140, 0, 32, 8.0, 0.0, 4.8, 9.6, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 361, 140, 0, 32, 8.0, 0.0, 4.8, 9.6, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn expression_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, 11.0/(10.0-1.0)); frame(lua_state, 10.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 361, 100, 0, 16, 4.0, -1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0, 361, 100, 0, 16, 5.0, 3.7, 2.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 361, 100, 0, 16, 4.0, -1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0, 361, 100, 0, 16, 5.0, 3.7, 2.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 16, 4.0, -1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 16, 5.0, 3.7, 2.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 16, 4.0, -1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 16, 5.0, 3.7, 2.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -2, 3.7, 3, 0, 180, 0, 0.85, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 0.2, 1, 0.8); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ness_psi_atk"), Hash40::new("ness_psi_atk"), Hash40::new("top"), -3.0, 4, -8.45, 0, 180, 0, 1.24, true, *EF_FLIP_YZ); + } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, 7.5 / 7.0); frame(lua_state, 7.5); MotionModule::set_rate(boma, 1.0); frame(lua_state, 8.5); MotionModule::set_rate(boma, (14.0 - 8.5) / 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 13.0, 85, 118, 0, 13, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("handr"), 13.0, 85, 118, 0, 13, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 14.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 13.0, 85, 118, 0, 13, 5.9, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 13.0, 85, 118, 0, 13, 5.9, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 16.0); MotionModule::set_rate(boma, (37.0 - 16.0) / 28.0);//43 - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.5); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - MotionModule::set_rate(boma, 2.72); - frame(lua_state, 19.0); - MotionModule::set_rate(boma, 1.0); - frame(lua_state, 20.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 270, 74, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 270, 37, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8, 0, 0, 285, 275, 0.5, true); } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 45, 74, 0, 30, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - AttackModule::clear(boma, 1, false); + frame(lua_state, 8.2); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10.2, -5.5, 0.0, 0.0, 0.0, 0.82, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); } - frame(lua_state, 27.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 8.5); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 13.2, -1.0, 0.0, 0.0, 0.0, 0.9, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); } - frame(lua_state, 39.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + frame(lua_state, 9.75); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10, 4.8, 0.0, 0.0, 0.0, 0.82, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); + } + frame(lua_state, 13.0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 5.0, 5.4, 0.0, 0.0, 0.0, 0.78, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); + agent.pop_lua_stack(1); } - } -unsafe extern "C" fn effect_attackairn (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4.7, 4, 40, 0, -13, 0.7, true); - lua_args!(fighter, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - lua_args!(fighter, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.5); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_ness_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_ness_attackair_h01")); + PLAY_SE(agent, Hash40::new("se_ness_pk_l")); } } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -2, 3.7, 3, 0, 180, 0, 0.85, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 0.2, 1, 0.8); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ness_psi_atk"), Hash40::new("ness_psi_atk"), Hash40::new("top"), -3.0, 4, -8.45, 0, 180, 0, 1.24, true, *EF_FLIP_YZ); + frame(lua_state, 8.5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8, 0, 0, 285, 275, 0.5, true); - } - frame(lua_state, 8.2); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10.2, -5.5, 0.0, 0.0, 0.0, 0.82, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + MotionModule::set_rate(boma, 2.72); + frame(lua_state, 19.0); + MotionModule::set_rate(boma, 1.0); + frame(lua_state, 20.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 270, 74, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 270, 37, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); } - frame(lua_state, 8.5); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 13.2, -1.0, 0.0, 0.0, 0.0, 0.9, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 45, 74, 0, 30, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + AttackModule::clear(boma, 1, false); } - frame(lua_state, 9.75); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10, 4.8, 0.0, 0.0, 0.0, 0.82, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); + frame(lua_state, 27.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(lua_state, 13.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 5.0, 5.4, 0.0, 0.0, 0.0, 0.78, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(fighter.lua_state_agent); - fighter.pop_lua_stack(1); + frame(lua_state, 39.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4.0, 0, 0, 0, 0, 0.27, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4.0, 0, 0, 0, 0, 0.27, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0.3 * PostureModule::lr(boma), -0.9, 0, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0.3 * PostureModule::lr(boma), -0.9, 0, 0, 0, 0, 1.5, true); } } -unsafe extern "C" fn sound_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.5); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_ness_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_ness_attackair_h01")); - PLAY_SE(fighter, Hash40::new("se_ness_pk_l")); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); -unsafe extern "C" fn expression_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); -pub fn install() { - smashline::Agent::new("ness") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("expression_attackairf", expression_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("effect_attackairn", effect_attackairn) - .acmd("effect_attackairb", effect_attackairb) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("effect_attackairlw", effect_attackairlw) - .acmd("sound_attackairhi", sound_attackairhi) - .acmd("expression_attackairhi", expression_attackairhi) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/ness/src/acmd/ground.rs b/fighters/ness/src/acmd/ground.rs index 2920650e9c..e42706853f 100644 --- a/fighters/ness/src/acmd/ground.rs +++ b/fighters/ness/src/acmd/ground.rs @@ -1,85 +1,81 @@ - use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 2.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 2.5, 0.0, 5.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 3.0, 0.0, 5.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 2.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 2.5, 0.0, 5.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 25, 0, 30, 3.0, 0.0, 5.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_MIDDLE), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 25, 0, 30, 2.2, 0.0, 5.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 50, 25, 0, 30, 2.5, 0.0, 5.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361,25, 0, 30, 3.5, 0.0, 5.5, 13.1,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 25, 0, 30, 2.2, 0.0, 5.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 25, 0, 30, 2.5, 0.0, 5.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361,25, 0, 30, 3.5, 0.0, 5.5, 13.1,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 0, 100, 57, 0, 5.5, 0.0, 5.5, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 80, 70, 0, 60, 5.5, 0.0, 5.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 100, 80, 0, 4.2, 0.0, 4.3, 3.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 0, 100, 57, 0, 5.5, 0.0, 5.5, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 80, 70, 0, 60, 5.5, 0.0, 5.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 100, 80, 0, 4.2, 0.0, 4.3, 3.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 20, 100, 70, 0, 5.5, 0.0, 4.8, 16.3, Some(0.0), Some(4.8), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 20, 100, 70, 0, 5.5, 0.0, 4.8, 16.3, Some(0.0), Some(4.8), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 90, 0, 80, 6.5, 0.0, 4.8, 21.2, Some(0.0), Some(4.8), Some(19.2), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 90, 0, 80, 6.5, 0.0, 4.8, 21.2, Some(0.0), Some(4.8), Some(19.2), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ness") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ness/src/acmd/mod.rs b/fighters/ness/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/ness/src/acmd/mod.rs +++ b/fighters/ness/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/ness/src/acmd/other.rs b/fighters/ness/src/acmd/other.rs index 639cb30d15..f22d94e6d6 100644 --- a/fighters/ness/src/acmd/other.rs +++ b/fighters/ness/src/acmd/other.rs @@ -1,292 +1,140 @@ - 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"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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_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(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 10) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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"), 10) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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_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"), 4) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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"), 4) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_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_ness_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ness_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ness_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ness_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ness_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ness_step_left_l")); } } -unsafe extern "C" fn ness_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, 14.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 ness_pkfire_pillar_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"), 1.75, 68, 30, 0, 10, 6.5, 0.0, 3.1, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.75, 68, 30, 0, 10, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); - } - -} - -unsafe extern "C" fn ness_pkfire_pillar_air_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"), 1.75, 58, 45, 0, 14, 6.5, 0.0, 3.1, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.75, 58, 45, 0, 14, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); - } - -} - -unsafe extern "C" fn ness_pkflash_bang_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"), 1.0, 88, 65, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x27936db96d)); - } -} - -unsafe extern "C" fn ness_pkthunder_move(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"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::ness::status::THUNDER_LOOSE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } } -unsafe extern "C" fn ness_pkthunder_move_child(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::ness::status::THUNDER_LOOSE) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} - -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 effect_jumpaerialfront(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_jumpaerialfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("waist"), 0, 0, 0, 0, 0, 0, 0.6, 10, 10, 10, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("waist"), 0, 0, 0, 0, 0, 0, 0.6, 10, 10, 10, 0, 0, 0, false); } wait(lua_state, 6.0); } } -unsafe extern "C" fn effect_jumpaerialback(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("waist"), 0, 0, 0, 0, 0, 0, 0.6, 10, 10, 10, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("waist"), 0, 0, 0, 0, 0, 0, 0.6, 10, 10, 10, 0, 0, 0, false); } wait(lua_state, 6.0); } } -pub fn install() { - smashline::Agent::new("ness_pkfire") - .acmd("game_pillar", ness_pkfire_pillar_game) - .acmd("game_pillarair", ness_pkfire_pillar_air_game) - .install(); - smashline::Agent::new("ness_pkflash") - .acmd("game_bang", ness_pkflash_bang_game) - .install(); - smashline::Agent::new("ness_pkthunder") - .acmd("game_move", ness_pkthunder_move) - .acmd("game_movechild", ness_pkthunder_move_child) - .install(); - smashline::Agent::new("ness") - .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", ness_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_jumpaerialfront", effect_jumpaerialfront) - .acmd("effect_jumpaerialback", effect_jumpaerialback) - .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("effect_jumpaerialfront", effect_jumpaerialfront); + agent.acmd("effect_jumpaerialback", effect_jumpaerialback); } diff --git a/fighters/ness/src/acmd/smashes.rs b/fighters/ness/src/acmd/smashes.rs index 79a3b30c3c..63dbe7b783 100644 --- a/fighters/ness/src/acmd/smashes.rs +++ b/fighters/ness/src/acmd/smashes.rs @@ -1,144 +1,142 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_visible").hash as i64); - FT_MOTION_RATE(fighter, 11.0/(14.0-1.0)); + FT_MOTION_RATE(agent, 11.0/(14.0-1.0)); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_NESS_STATUS_ATTACK_S4_FLAG_REFLECT_START); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 18.0, 361, 70, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 18.0, 361, 70, 0, 65, 2.3, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 20.0, 361, 70, 0, 65, 2.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 22.0, 361, 70, 0, 65, 3.3, 0.0, 8.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 18.0, 361, 70, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 18.0, 361, 70, 0, 65, 2.3, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 20.0, 361, 70, 0, 65, 2.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NESS_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 22.0, 361, 70, 0, 65, 3.3, 0.0, 8.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_NESS_STATUS_ATTACK_S4_FLAG_REFLECT_END); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_invisible").hash as i64); } - } -unsafe extern "C" fn expression_attackhi4(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_INTP, *SLOPE_STATUS_TOP, 6); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.74); + frame(lua_state, 3.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 56.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn expression_attackhi4(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_INTP, *SLOPE_STATUS_TOP, 6); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 11.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); ItemModule::set_have_item_visibility(boma, false, 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn game_attackhi4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.74); +unsafe extern "C" fn game_attacklw4(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) { ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - frame(lua_state, 11.0); - if is_excute(fighter) { + frame(lua_state, 6.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(lua_state, 56.0); - if is_excute(fighter) { + frame(lua_state, 54.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn game_attacklw4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn expression_attacklw4(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_INTP, *SLOPE_STATUS_TOP, 6); +unsafe extern "C" fn expression_attacklw4(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_INTP, *SLOPE_STATUS_TOP, 6); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 11.0); app::sv_animcmd::execute(lua_state, 11.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } /*frame(lua_state, 23.0); @@ -146,94 +144,25 @@ unsafe extern "C" fn expression_attacklw4(fighter: &mut L2CAgentBase) { RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); }*/ frame(lua_state, 23.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn game_yoyo_attackhi4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.74); - frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 90, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("attach"), 13.0, 80, 79, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - frame(lua_state, 37.0); -} - -unsafe extern "C" fn game_yoyo_attacklw4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 367, 100, 12, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 28, 80, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - // frame(lua_state, 18.0); - // if is_excute(fighter) { - // AttackModule::clear_all(fighter.module_accessor); - // } - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - // frame(lua_state, 25.0); - // if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 35, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - // AttackModule::clear_all(fighter.module_accessor); - // } - // frame(lua_state, 30.0); - // if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - // } - frame(lua_state, 32.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - frame(lua_state, 40.0); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); -pub fn install() { - smashline::Agent::new("ness_yoyohead") - .acmd("game_attackhi4", game_yoyo_attackhi4) - .acmd("game_attacklw4", game_yoyo_attacklw4) - .install(); - smashline::Agent::new("ness") - .acmd("game_attacks4", game_attacks4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("expression_attacklw4", expression_attacklw4) - .install(); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index c9632d4227..bf312d1700 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -1,107 +1,101 @@ use super::*; -unsafe extern "C" fn special_n_fire_game(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn special_air_n_fire_game(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn sound_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rng = app::sv_math::rand(smash::hash40("fighter"), 2); if rng == 0 { frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_ness_002")); - PLAY_SE(fighter, Hash40::new("se_ness_special_s03")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_ness_002")); + PLAY_SE(agent, Hash40::new("se_ness_special_s03")); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ness_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ness_special_s03")); } frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_ness_attack04")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_ness_attack04")); } } } -unsafe extern "C" fn game_specials (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.85); + FT_MOTION_RATE(agent, 0.85); frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); //WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_NESS_STATUS_SPECIAL_S_FLAG_SHOOT); } - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn game_specialairs (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.85); + FT_MOTION_RATE(agent, 0.85); frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 21.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); //WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_NESS_STATUS_SPECIAL_S_FLAG_SHOOT); } - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn sound_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rng = app::sv_math::rand(smash::hash40("fighter"), 2); if rng == 0 { frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_ness_002")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_ness_002")); } } else { frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_ness_attack04")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_ness_attack04")); } } } -unsafe extern "C" fn ness_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_NESS_CLIFF_HANG_DATA_SPECIAL_HI as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 25.0, 361, 80, 0, 55, 7.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 25.0, 361, 80, 0, 55, 7.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_PSI); JostleModule::set_status(boma, false); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); //10 + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); //10 //WorkModule::on_flag(boma, *FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_CRITICAL); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 18.0, 361, 70, 0, 45, 4.8, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 18.0, 361, 70, 0, 45, 4.8, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, false, 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_KICK, *ATTACK_REGION_PSI); WorkModule::on_flag(boma, *FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL);//33 + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL);//33 //WorkModule::off_flag(boma, *FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_CRITICAL); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); JostleModule::set_status(boma, true); @@ -109,37 +103,36 @@ unsafe extern "C" fn ness_special_air_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..999 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 2.5, 0.0, 6.5, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 8.9, 0.0, 6.7, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 2.5, 0.0, 6.5, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 8.9, 0.0, 6.7, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 14.0); } } -unsafe extern "C" fn special_air_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..999 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 2.5, 0.0, 6.5, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 8.9, 0.0, 6.7, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 2.5, 0.0, 6.5, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 55, 90, 0, 27, 8.9, 0.0, 6.7, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 14.0); } - } //Implemented to remove release windbox @@ -148,66 +141,69 @@ unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { let boma = agent.boma(); } -unsafe extern "C" fn effect_speciallwstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ness_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.4, false); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ness_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.4, false); } } -unsafe extern "C" fn effect_speciallwend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("ness_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.5, false); - FLASH(fighter, 0.5, 1, 1, 0.4); +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("ness_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.5, false); + FLASH(agent, 0.5, 1, 1, 0.4); } wait(lua_state, 5.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 10, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 10, 0, 1, 1, 0.1); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn effect_specialairlwend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ness_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.5, false); - FLASH(fighter, 0.5, 1, 1, 0.4); +unsafe extern "C" fn effect_specialairlwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ness_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 0, 0, 0, 0, 0.5, false); + FLASH(agent, 0.5, 1, 1, 0.4); } wait(lua_state, 5.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 10, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 10, 0, 1, 1, 0.1); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -pub fn install() { - smashline::Agent::new("ness") - .acmd("game_specialnfire", special_n_fire_game) - .acmd("game_specialairnfire", special_air_n_fire_game) - .acmd("sound_specials", sound_specials) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specialairs) - .acmd("sound_specialairs", sound_specialairs) - .acmd("game_specialairhi", ness_special_air_hi_game) - .acmd("game_speciallwhold", special_lw_hold_game) - .acmd("game_specialairlwhold", special_air_lw_hold_game) - .acmd("game_speciallwend", game_speciallwend) - .acmd("game_specialairlwend", game_speciallwend) - .acmd("effect_speciallwstart", effect_speciallwstart) - .acmd("effect_specialairlwstart", effect_speciallwstart) - .acmd("effect_speciallwend", effect_speciallwend) - .acmd("effect_specialairlwend", effect_specialairlwend) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnfire", stub); + agent.acmd("game_specialairnfire", stub); + + agent.acmd("sound_specials", sound_specials); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("sound_specialairs", sound_specialairs); + + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_specialairlwhold); + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("game_specialairlwend", game_speciallwend); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("effect_speciallwend", effect_speciallwend); + agent.acmd("effect_specialairlwend", effect_specialairlwend); } diff --git a/fighters/ness/src/acmd/throws.rs b/fighters/ness/src/acmd/throws.rs index b6c1d8ce96..dbb6afbe51 100644 --- a/fighters/ness/src/acmd/throws.rs +++ b/fighters/ness/src/acmd/throws.rs @@ -1,186 +1,184 @@ - use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(-16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(-16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 10, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 10, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 6); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.2); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 135, 110, 0, 19, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 135, 110, 0, 19, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -5, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -5, 18); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 2.0); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: 5.0, z: 0.0}); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 55, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 55, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 11); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 11); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: 3.0, z: 0.0}); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - FT_LEAVE_NEAR_OTTOTTO(fighter, 1.5, 1.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 58, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + FT_LEAVE_NEAR_OTTOTTO(agent, 1.5, 1.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 58, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 0, 4.3, 2.0, 1.8, 0.0, Some(-2.0), Some(1.8), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 0, 4.3, 2.0, 1.8, 0.0, Some(-2.0), Some(1.8), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PSI); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 100, 0, 0, 6.0, 2.0, 2.2, 0.0, Some(-2.0), Some(2.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 100, 0, 0, 6.0, 2.0, 2.2, 0.0, Some(-2.0), Some(2.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 0); + CHECK_FINISH_CAMERA(agent, 2, 0); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: 0.0, z: 0.0}); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ness") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ness/src/acmd/tilts.rs b/fighters/ness/src/acmd/tilts.rs index 2040432215..189b8901e7 100644 --- a/fighters/ness/src/acmd/tilts.rs +++ b/fighters/ness/src/acmd/tilts.rs @@ -1,115 +1,110 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 35, 3.6, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 35, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 3.5); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 96, 125, 0, 46, 6.5, 0.0, 18.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 96, 125, 0, 46, 4.0, 0.0, 9.0, 2.2, Some(0.0), Some(9.0), Some(-0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PSI); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 96, 125, 0, 46, 6.5, 0.0, 18.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 96, 125, 0, 46, 4.0, 0.0, 9.0, 2.2, Some(0.0), Some(9.0), Some(-0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PSI); } frame(lua_state, 8.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2, 9, 2, -90, 0, 0, 0.55, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, -90, 0, 0, 0.55, true); - EFFECT(fighter, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0, 17.5, 1, 0, -90, 0, 1.65, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2, 9, 2, -90, 0, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, -90, 0, 0, 0.55, true); + EFFECT(agent, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0, 17.5, 1, 0, -90, 0, 1.65, 0, 0, 0, 0, 0, 360, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 83, 135, 0, 10, 3.5, 1.8, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 0.85, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 83, 135, 0, 10, 3.5, 5.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 0.85, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 83, 135, 0, 10, 3.5, 1.8, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 0.85, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 83, 135, 0, 10, 3.5, 5.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 0.85, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO_INPUT); } - } -pub fn install() { - smashline::Agent::new("ness") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/ness/src/lib.rs b/fighters/ness/src/lib.rs index 5537dac979..1f425ec95b 100644 --- a/fighters/ness/src/lib.rs +++ b/fighters/ness/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod pkfire; +mod pkflash; +mod pkthunder; +mod yoyohead; use smash::{ lib::{ @@ -37,9 +44,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("ness"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + pkfire::install(); + pkflash::install(); + pkthunder::install(); + yoyohead::install(); } \ No newline at end of file diff --git a/fighters/ness/src/opff.rs b/fighters/ness/src/opff.rs index 33e9e3d77b..3274766884 100644 --- a/fighters/ness/src/opff.rs +++ b/fighters/ness/src/opff.rs @@ -119,7 +119,6 @@ unsafe fn pk_thunder_wall_ride(boma: &mut BattleObjectModuleAccessor, id: usize, KineticModule::mul_speed(boma, &wall_ride, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } } - } // Allow grabbing the ledge from behind while in upSpecialEnd @@ -213,17 +212,6 @@ pub unsafe fn ness_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub unsafe extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } -} - -pub fn install() { - smashline::Agent::new("ness") - .on_line(Main, ness_frame_wrapper) - .install(); - smashline::Agent::new("ness_pkthunder") - .on_line(Main, pkthunder_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ness_frame_wrapper); } \ No newline at end of file diff --git a/fighters/ness/src/pkfire/acmd.rs b/fighters/ness/src/pkfire/acmd.rs new file mode 100644 index 0000000000..8734cf4b4f --- /dev/null +++ b/fighters/ness/src/pkfire/acmd.rs @@ -0,0 +1,26 @@ +use super::*; + +unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.75, 68, 30, 0, 10, 6.5, 0.0, 3.1, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.75, 68, 30, 0, 10, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); + } +} + +unsafe extern "C" fn game_pillarair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.75, 58, 45, 0, 14, 6.5, 0.0, 3.1, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.75, 58, 45, 0, 14, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_pillar", game_pillar); + agent.acmd("game_pillarair", game_pillarair); +} diff --git a/fighters/ness/src/pkfire/mod.rs b/fighters/ness/src/pkfire/mod.rs new file mode 100644 index 0000000000..65ccf2fbe1 --- /dev/null +++ b/fighters/ness/src/pkfire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ness_pkfire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ness/src/pkflash/acmd.rs b/fighters/ness/src/pkflash/acmd.rs new file mode 100644 index 0000000000..a3d27dc89e --- /dev/null +++ b/fighters/ness/src/pkflash/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_bang(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 88, 65, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x27936db96d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_bang", game_bang); +} diff --git a/fighters/ness/src/pkflash/mod.rs b/fighters/ness/src/pkflash/mod.rs new file mode 100644 index 0000000000..465436a8fd --- /dev/null +++ b/fighters/ness/src/pkflash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ness_pkflash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ness/src/pkthunder/acmd.rs b/fighters/ness/src/pkthunder/acmd.rs new file mode 100644 index 0000000000..ac19f44d09 --- /dev/null +++ b/fighters/ness/src/pkthunder/acmd.rs @@ -0,0 +1,34 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + +unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); + agent.acmd("game_movechild", game_movechild); +} diff --git a/fighters/ness/src/pkthunder/mod.rs b/fighters/ness/src/pkthunder/mod.rs new file mode 100644 index 0000000000..872632b8ab --- /dev/null +++ b/fighters/ness/src/pkthunder/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("ness_pkthunder"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ness/src/pkthunder/opff.rs b/fighters/ness/src/pkthunder/opff.rs new file mode 100644 index 0000000000..5d856f6729 --- /dev/null +++ b/fighters/ness/src/pkthunder/opff.rs @@ -0,0 +1,12 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pkthunder_callback); +} \ No newline at end of file diff --git a/fighters/ness/src/pkthunder/status.rs b/fighters/ness/src/pkthunder/status.rs new file mode 100644 index 0000000000..b869509b58 --- /dev/null +++ b/fighters/ness/src/pkthunder/status.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +// WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE + +unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { + if !VarModule::is_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE) { + let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let parent_object = get_battle_object_from_id(parent_id as u32); + if !parent_object.is_null() + && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_NESS + && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD { + VarModule::on_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE); + MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); + return 0.into(); + } + smashline::original_status(Exec, weapon, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); +} \ No newline at end of file diff --git a/fighters/ness/src/status/attack_air.rs b/fighters/ness/src/status/attack_air.rs new file mode 100644 index 0000000000..cefe98acf2 --- /dev/null +++ b/fighters/ness/src/status/attack_air.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); +} \ No newline at end of file diff --git a/fighters/ness/src/status/mod.rs b/fighters/ness/src/status/mod.rs new file mode 100644 index 0000000000..49290a2399 --- /dev/null +++ b/fighters/ness/src/status/mod.rs @@ -0,0 +1,12 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +mod attack_air; +mod special_hi; + +pub fn install(agent: &mut Agent) { + attack_air::install(agent); + special_hi::install(agent); +} \ No newline at end of file diff --git a/fighters/ness/src/status.rs b/fighters/ness/src/status/special_hi.rs similarity index 62% rename from fighters/ness/src/status.rs rename to fighters/ness/src/status/special_hi.rs index 4ed8afddf1..79ba2b2a3c 100644 --- a/fighters/ness/src/status.rs +++ b/fighters/ness/src/status/special_hi.rs @@ -1,27 +1,6 @@ use super::*; -use globals::*; -utils::import!(common::djc::attack_air_main_status); -// status script import -// WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE - -unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { - if !VarModule::is_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE) { - let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let parent_object = get_battle_object_from_id(parent_id as u32); - if !parent_object.is_null() - && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_NESS - && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD { - VarModule::on_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE); - MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); - return 0.into(); - } - smashline::original_status(Exec, weapon, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); - } - 0.into() -} - -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD // +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { if LinkModule::is_link(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER) { @@ -37,21 +16,15 @@ unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK // +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); if !StopModule::is_stop(fighter.module_accessor) { sub_special_hi_attack(fighter); } fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) + fighter.main_shift(special_hi_attack_main_loop) } unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -73,7 +46,7 @@ unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -104,13 +77,7 @@ unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L } } -pub fn install() { - smashline::Agent::new("ness") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status(End, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end) - .status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack) - .install(); - smashline::Agent::new("ness_pkthunder") - .status(Exec, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE, move_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); + agent.status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack_main); } \ No newline at end of file diff --git a/fighters/ness/src/yoyohead/acmd.rs b/fighters/ness/src/yoyohead/acmd.rs new file mode 100644 index 0000000000..4384777ef8 --- /dev/null +++ b/fighters/ness/src/yoyohead/acmd.rs @@ -0,0 +1,71 @@ +use super::*; + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.74); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 90, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 13.0, 80, 79, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 34.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 37.0); +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 367, 100, 12, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 28, 80, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + // frame(lua_state, 18.0); + // if is_excute(fighter) { + // AttackModule::clear_all(fighter.module_accessor); + // } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + // frame(lua_state, 25.0); + // if is_excute(fighter) { + // ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 35, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + // AttackModule::clear_all(fighter.module_accessor); + // } + // frame(lua_state, 30.0); + // if is_excute(fighter) { + // ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + // } + frame(lua_state, 32.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 40.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); +} diff --git a/fighters/ness/src/yoyohead/mod.rs b/fighters/ness/src/yoyohead/mod.rs new file mode 100644 index 0000000000..77a1ae2e20 --- /dev/null +++ b/fighters/ness/src/yoyohead/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ness_yoyohead"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/packun/src/acmd/aerials.rs b/fighters/packun/src/acmd/aerials.rs index cce085bd9b..3b68f0dc44 100644 --- a/fighters/packun/src/acmd/aerials.rs +++ b/fighters/packun/src/acmd/aerials.rs @@ -1,269 +1,264 @@ - use super::*; -unsafe extern "C" fn packun_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); if stance.label != 2 { - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let bkb = if stance.label == 2 {15} else {20}; let kbg = if stance.label == 2 {90} else {45}; - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 3.0); if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 4.0); + FT_DESIRED_RATE(agent, 6.0, 4.0); } else { - FT_DESIRED_RATE(fighter, 6.0, 7.0); + FT_DESIRED_RATE(agent, 6.0, 7.0); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 40, 94, 0, 30, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 11.0 * stance.damage_other, 40, 94, 0, 30, 7.0, -3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 40, 94, 0, 30, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 11.0 * stance.damage_other, 40, 94, 0, 30, 7.0, -3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } -unsafe extern "C" fn packun_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label != 1 { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * stance.damage_other, 366, 90, 0, 25, 7.0, 0.0, 4.0, -8.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * stance.damage_other, 366, 90, 0, 25, 7.0, 0.0, 4.0, -8.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_poison_param(boma, 0, 121, 30, 1.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } -unsafe extern "C" fn packun_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); if stance != 1 { frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); } wait(lua_state, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_atk_air_b_breath"), Hash40::new("mouth"), 7, 0.2, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_atk_air_b_breath"), Hash40::new("mouth"), 7, 0.2, 0, 0, 0, -90, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.5, -12, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.5, -12, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } else if stance == 1 { frame(lua_state, 6.0); for h in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); if h >= 2 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); } } wait(lua_state, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 16.0); for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } wait(lua_state, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.0, -10.5, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.01, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.0, -10.5, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.01, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.25); } } } -unsafe extern "C" fn packun_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if stance != 1 { - PLAY_SE(fighter, Hash40::new("se_packun_attackair_b01")); + PLAY_SE(agent, Hash40::new("se_packun_attackair_b01")); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - PLAY_SE(fighter, Hash40::new("se_packun_special_s03")); + PLAY_SE(agent, Hash40::new("se_packun_special_s03")); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - PLAY_SE(fighter, Hash40::new("se_packun_attackair_b01")); + PLAY_SE(agent, Hash40::new("se_packun_attackair_b01")); } } } -unsafe extern "C" fn packun_attack_air_b_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairbs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 19.5, 45, 95, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 19.5, 45, 95, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn packun_attack_air_b_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -283,7 +278,7 @@ unsafe extern "C" fn packun_attack_air_b_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -292,7 +287,7 @@ unsafe extern "C" fn packun_attack_air_b_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -302,114 +297,115 @@ unsafe extern "C" fn packun_attack_air_b_s_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let angle = if stance.label == 1 {105} else {75}; let bkb = if stance.label == 1 {15} else if stance.label == 0 {10} else {0}; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 7.0); + FT_DESIRED_RATE(agent, 6.0, 7.0); } else { - FT_DESIRED_RATE(fighter, 6.0, 9.0); + FT_DESIRED_RATE(agent, 6.0, 9.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, angle, 87, 0, 53 + bkb, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, sound, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, angle, 87, 0, 53 + bkb, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, sound, *ATTACK_REGION_HEAD); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_MOTION_RATE(fighter, (11.0/5.0)); + FT_MOTION_RATE(agent, (11.0/5.0)); } else { - FT_MOTION_RATE(fighter, (11.0/9.0)); + FT_MOTION_RATE(agent, (11.0/9.0)); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 3.0, 8.0, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); if stance.label == 2 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 90, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 90, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attackairn", packun_attack_air_n_game) - .acmd("game_attackairf", packun_attack_air_f_game) - .acmd("expression_attackairf", packun_attack_air_f_expression) - .acmd("game_attackairb", packun_attack_air_b_game) - .acmd("effect_attackairb", packun_attack_air_b_effect) - .acmd("sound_attackairb", packun_attack_air_b_sound) - .acmd("game_attackairbs", packun_attack_air_b_s_game) - .acmd("effect_attackairbs", packun_attack_air_b_s_effect) - .acmd("sound_attackairbs", packun_attack_air_b_s_sound) - .acmd("expression_attackairbs", packun_attack_air_b_s_expression) - .acmd("game_attackairhi", packun_attack_air_hi_game) - .acmd("game_attackairlw", packun_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + + agent.acmd("game_attackairbs", game_attackairbs); + agent.acmd("effect_attackairbs", effect_attackairbs); + agent.acmd("sound_attackairbs", sound_attackairbs); + agent.acmd("expression_attackairbs", expression_attackairbs); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/packun/src/acmd/ground.rs b/fighters/packun/src/acmd/ground.rs index 5da5cb94f1..ed7c3e01e6 100644 --- a/fighters/packun/src/acmd/ground.rs +++ b/fighters/packun/src/acmd/ground.rs @@ -1,37 +1,36 @@ - use super::*; -unsafe extern "C" fn packun_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 20, 2.5, 0.0, 6.3, 5.3, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 18, 2.5, 0.0, 6.3, 8.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4 * stance.damage_other, 180, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 20, 2.5, 0.0, 6.3, 5.3, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 18, 2.5, 0.0, 6.3, 8.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4 * stance.damage_other, 180, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_MIDDLE), false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn packun_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); if stance.label == 2 { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); @@ -41,184 +40,182 @@ unsafe extern "C" fn packun_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.2, 0.0, 6.5, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.4, 0.0, 6.5, 10.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.2 * stance.damage_other, 180, 25, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 15, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.2, 0.0, 6.5, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.4, 0.0, 6.5, 10.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.2 * stance.damage_other, 180, 25, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 15, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label != 2 { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn packun_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let bkb = if stance.label == 2 {15} else {0}; let angle = if stance.label == 2 {10} else {0}; let sound_level = if stance.label != 2 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_S }; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label == 2 { - FT_DESIRED_RATE(fighter, 7.0, 9.0); + FT_DESIRED_RATE(agent, 7.0, 9.0); } - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 5.5, 0.0, 8.0, 12.8, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 4.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 5.5, 0.0, 8.0, 12.8, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 4.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -3, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, 0.5); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -3, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, 0.5); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 9, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 9, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn packun_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 1.8, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_attack_100_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack100end(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) { let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.85, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.85, true); } } frame(lua_state, 5.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_FLIP(fighter, Hash40::new("packun_atk_100_finish"), Hash40::new("packun_atk_100_finish"), Hash40::new("top"), -8, 8, 15, 10, -90, 0, 1.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_atk_100_finish"), Hash40::new("packun_atk_100_finish"), Hash40::new("top"), -8, 8, 15, 10, -90, 0, 1.4, true, *EF_FLIP_YZ); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_bite_line"), Hash40::new("mouth"), 3, 0, 0, 0, 0, 10, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("neck"), 0, 0, 0, 0, 90, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_bite_line"), Hash40::new("mouth"), 3, 0, 0, 0, 0, 10, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("neck"), 0, 0, 0, 0, 90, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("packun_bite_line2"), Hash40::new("mouth"), 5, 0, 0, -20, 0, 0, 0.9, 0, 1, 0, 0, 0, 0, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_atk_100_finish"), -1); + if is_excute(agent) { + EFFECT(agent, Hash40::new("packun_bite_line2"), Hash40::new("mouth"), 5, 0, 0, -20, 0, 0, 0.9, 0, 1, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("packun_atk_100_finish"), -1); } } -unsafe extern "C" fn packun_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); // base 0.93 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); if stance.label == 2 { - FT_MOTION_RATE(fighter, (10.0/7.0)); + FT_MOTION_RATE(agent, (10.0/7.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 5.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 12.0 * stance.damage_other, 45, 100, 0, 45, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0 * stance.damage_other, 45, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.3); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 12.0 * stance.damage_other, 45, 100, 0, 45, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 * stance.damage_other, 45, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.3); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); } } frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 8.0 * stance.damage_other, 50, 43, 0, 90, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * stance.damage_other, 50, 43, 0, 90, 4.0, 0.0, 11.0, -2.0, Some(0.0), Some(5.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 8.0 * stance.damage_other, 50, 43, 0, 90, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * stance.damage_other, 50, 43, 0, 90, 4.0, 0.0, 11.0, -2.0, Some(0.0), Some(5.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.3); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } - } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attack11", packun_attack_11_game) - .acmd("game_attack12", packun_attack_12_game) - .acmd("game_attack13", packun_attack_13_game) - .acmd("effect_attack13", packun_attack_13_effect) - .acmd("game_attack100end", packun_attack_100_end_game) - .acmd("effect_attack100end", packun_attack_100_end_effect) - .acmd("game_attackdash", packun_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("effect_attack100end", effect_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/packun/src/acmd/mod.rs b/fighters/packun/src/acmd/mod.rs index f787fcc9b4..55d396290e 100644 --- a/fighters/packun/src/acmd/mod.rs +++ b/fighters/packun/src/acmd/mod.rs @@ -1,11 +1,12 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; #[repr(C)] pub struct StanceInfo { @@ -51,12 +52,12 @@ impl From for StanceInfo { } } -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 5fd3980bc0..de521a437b 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -1,662 +1,273 @@ - use super::*; -unsafe extern "C" fn packun_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - let damage = if stance != 1 { 0.0 } else { 0.3 }; - let effect = if stance != 1 { Hash40::new("collision_attr_normal") } else { Hash40::new("collision_attr_purple") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_packun_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_packun_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, 5.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); } } -unsafe extern "C" fn 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 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 appeal_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); VarModule::on_flag(boma.object(), vars::packun::instance::STANCE_REVERSE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let advance = if VarModule::is_flag(boma.object(), vars::packun::instance::STANCE_REVERSE) {2} else {1}; VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, (cur_stance + advance) % 3); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } wait(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn appeal_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_special_s02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_special_s02")); } } frame(lua_state, 19.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appear01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appear01")); } } } -unsafe extern "C" fn appeal_hi_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - ModelModule::set_mesh_visibility(fighter.boma(), Hash40::new("foot"), true); + if is_excute(agent) { + ModelModule::set_mesh_visibility(agent.boma(), Hash40::new("foot"), true); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 0) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 0); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } frame(lua_state, 107.0); - if is_excute(fighter) { - ModelModule::set_mesh_visibility(fighter.boma(), Hash40::new("foot"), false); + if is_excute(agent) { + ModelModule::set_mesh_visibility(agent.boma(), Hash40::new("foot"), false); } } -unsafe extern "C" fn appeal_hi_2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn appeal_hi_2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } frame(lua_state, 54.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); } frame(lua_state, 78.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } } -unsafe extern "C" fn appeal_hi_2_expression(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_appealhi2(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn appeal_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::AppealSL) { MotionModule::change_motion(boma, Hash40::new("appeal_hi_2"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_button_on(Buttons::AppealSL) && !(cur_stance == 2) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 2); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } } -unsafe extern "C" fn appeal_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s01")); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s02")); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s03")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s03")); } } frame(lua_state, 46.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s04")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s04")); } } } -unsafe extern "C" fn appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !(cur_stance == 1) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 1); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } } -unsafe extern "C" fn appeal_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_l01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_l01")); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_l02")); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - frame(lua_state, 1.0); - if is_excute(fighter) { - ModelModule::set_scale(boma, scale); - MotionModule::set_rate(boma, 1.4); - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_start_air(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - frame(lua_state, 1.0); - if is_excute(fighter) { - ModelModule::set_scale(boma, scale); - MotionModule::set_rate(boma, 1.4); - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_loop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_shoot(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if WorkModule::is_flag(boma, *WEAPON_PACKUN_SPIKEBALL_INSTANCE_WORK_ID_FLAG_REACTIVE) { - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - } - else { - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - for _ in 0..999 { - if is_excute(fighter) { - if boma.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP){ - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); - } - } - wait(lua_state, 3.0); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_fall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_fall_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_wait(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { - if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - /*frame(lua_state, 55.0); - if is_excute(fighter) { - if stance == 1 { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 361, 45, 3.0, false); - } - }*/ -} - -unsafe extern "C" fn packun_spikeball_wait_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_l02")); } } } -unsafe extern "C" fn packun_spikeball_game_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ModelModule::set_scale(boma, 0.1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 151, 30, 3.5, false); - } -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} -unsafe extern "C" fn packun_spikeball_effect_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.01, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.25); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -unsafe extern "C" fn packun_spikeball_sound_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - } -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} + agent.acmd("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); + agent.acmd("sound_appealhil", sound_appealhi); + agent.acmd("sound_appealhir", sound_appealhi); -unsafe extern "C" fn game_shootmax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} + agent.acmd("game_appealhi2", game_appealhi2); + agent.acmd("effect_appealhi2", stub); + agent.acmd("sound_appealhi2", sound_appealhi2); + agent.acmd("expression_appealhi2", expression_appealhi2); -unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn game_startmax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn packun_poisonbreath_game_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - frame(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } -} - -unsafe extern "C" fn packun_poisonbreath_effect_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath2"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_gas"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_max"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_max_smoke"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth2"), false, false); - EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 0.7); - } -} - -unsafe extern "C" fn packun_poisonbreath_sound_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - } -} + agent.acmd("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + agent.acmd("sound_appealsl", sound_appeals); + agent.acmd("sound_appealsr", sound_appeals); -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_catchattack", packun_catch_attack_game) - .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("game_appealhil", appeal_hi_game) - .acmd("game_appealhir", appeal_hi_game) - .acmd("sound_appealhil", appeal_hi_sound) - .acmd("sound_appealhir", appeal_hi_sound) - .acmd("game_appealhi2", appeal_hi_2_game) - .acmd("effect_appealhi2", appeal_hi_2_effect) - .acmd("sound_appealhi2", appeal_hi_2_sound) - .acmd("expression_appealhi2", appeal_hi_2_expression) - .acmd("game_appealsl", appeal_s_game) - .acmd("game_appealsr", appeal_s_game) - .acmd("sound_appealsl", appeal_s_sound) - .acmd("sound_appealsr", appeal_s_sound) - .acmd("game_appeallwl", appeal_lw_game) - .acmd("game_appeallwr", appeal_lw_game) - .acmd("sound_appeallwl", appeal_lw_sound) - .acmd("sound_appeallwr", appeal_lw_sound) - .install(); - smashline::Agent::new("packun_spikeball") - .acmd("game_start", packun_spikeball_game_start) - .acmd("game_startair", packun_spikeball_game_start_air) - .acmd("game_loop", packun_spikeball_game_loop) - .acmd("effect_loop", packun_spikeball_loop_effect) - .acmd("game_shoot", packun_spikeball_game_shoot) - .acmd("effect_shoot", packun_spikeball_shoot_effect) - .acmd("game_fall", packun_spikeball_game_fall) - .acmd("effect_fall", packun_spikeball_fall_effect) - .acmd("game_wait", packun_spikeball_game_wait) - .acmd("effect_wait", packun_spikeball_wait_effect) - .acmd("game_explode", packun_spikeball_game_explode) - .acmd("effect_explode", packun_spikeball_effect_explode) - .acmd("sound_explode", packun_spikeball_sound_explode) - .install(); - smashline::Agent::new("packun_poisonbreath") - .acmd("game_shoot", game_shoot) - .acmd("game_shootmax", game_shootmax) - .acmd("game_start", game_start) - .acmd("game_shoot", game_start) - .acmd("game_startmax", game_startmax) - .acmd("game_shootmax", game_startmax) - .acmd("game_explode", packun_poisonbreath_game_explode) - .acmd("effect_explode", packun_poisonbreath_effect_explode) - .acmd("sound_explode", packun_poisonbreath_sound_explode) - .install(); + agent.acmd("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("sound_appeallwl", sound_appeallw); + agent.acmd("sound_appeallwr", sound_appeallw); } diff --git a/fighters/packun/src/acmd/smashes.rs b/fighters/packun/src/acmd/smashes.rs index 24dc2fc442..2344d4623a 100644 --- a/fighters/packun/src/acmd/smashes.rs +++ b/fighters/packun/src/acmd/smashes.rs @@ -1,101 +1,97 @@ - use super::*; -unsafe extern "C" fn packun_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let kbg = if stance.label == 0 { 110 } else if stance.label == 1 { 140 } else { 100 }; let hitlag = if stance.label != 2 { 1.2 } else { 1.5 }; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 15.0 * stance.damage_head, 45, kbg, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 15.0 * stance.damage_head, 45, kbg, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label != 2 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_smash_s_arc_l"), Hash40::new("top"), 0, 13, 3.5, 40, 60, 0, 1.6, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_smash_s_arc_l"), Hash40::new("top"), 0, 13, 3.5, 40, 60, 0, 1.6, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("packun_smash_s_arc_r"), Hash40::new("top"), 0, 13, 3.5, 40, -60, 0, 1.6, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_smash_s_arc_r"), Hash40::new("top"), 0, 13, 3.5, 40, -60, 0, 1.6, true); } } frame(lua_state, 14.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn packun_attack_s4_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 25.0, 45, 100, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 25.0, 45, 100, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s4_s2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -122,7 +118,24 @@ unsafe extern "C" fn packun_attack_s4_s2_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_s2_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 24.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_packun_smash_s01")); + } + frame(lua_state, 31.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); + } +} + +unsafe extern "C" fn expression_attacks42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -156,7 +169,7 @@ unsafe extern "C" fn packun_attack_s4_s2_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_2_charge_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -169,10 +182,9 @@ unsafe extern "C" fn packun_attack_s4_2_charge_effect(agent: &mut L2CAgentBase) } wait(lua_state, 5.0); } - } -unsafe extern "C" fn packun_attack_s4_2_charge_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -181,7 +193,7 @@ unsafe extern "C" fn packun_attack_s4_2_charge_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_s2_charge_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -195,78 +207,60 @@ unsafe extern "C" fn packun_attack_s4_s2_charge_expression(agent: &mut L2CAgentB } } -unsafe extern "C" fn packun_attack_s4_s2_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 24.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_packun_smash_s01")); - } - frame(lua_state, 31.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); - } -} - -unsafe extern "C" fn packun_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_DESIRED_RATE(fighter, 8.0, 11.0); + FT_DESIRED_RATE(agent, 8.0, 11.0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 2 { VarModule::on_flag(boma.object(), vars::packun::status::BITE_START); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::packun::status::BITE_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 75, 0, 0, 75, 5.5, 0.0, 12.0, -4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 105, 0, 0, 75, 5.5, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 75, 0, 0, 75, 5.5, 0.0, 12.0, -4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 105, 0, 0, 75, 5.5, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); if VarModule::is_flag(boma.object(), vars::packun::status::BURST) { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 14.0 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("mouth"), 8.5, 90, 86, 0, 90, 9.0, 4.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 14.0 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("mouth"), 8.5, 90, 86, 0, 90, 9.0, 4.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BITE); } } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::BURST); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -307,7 +301,7 @@ unsafe extern "C" fn packun_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -331,9 +325,9 @@ unsafe extern "C" fn packun_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let angle1 = if stance.label == 0 { 175 } else { 32 }; let angle2 = if stance.label == 0 { 94 } else { 30 }; @@ -346,22 +340,22 @@ unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { let element = if stance.label == 0 { Hash40::new("collision_attr_fire") } else { Hash40::new("collision_attr_normal") }; let lvl1 = if stance.label == 0 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_L }; if stance.label == 2 { - FT_DESIRED_RATE(fighter, 6.0, 9.0); + FT_DESIRED_RATE(agent, 6.0, 9.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); if stance.label == 0 { - FT_DESIRED_RATE(fighter, 7.0, 3.0); + FT_DESIRED_RATE(agent, 7.0, 3.0); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 5.0, 0.0, 4.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 4.0, 0.0, 3.5, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 5.0, 0.0, 4.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 4.0, 0.0, 3.5, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label == 0 { VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } @@ -370,78 +364,79 @@ unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 5.0, 0.0, 4.0, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 4.0, 0.0, 3.6, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 5.0, 0.0, 4.0, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 4.0, 0.0, 3.6, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label != 0 { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } - } -unsafe extern "C" fn packun_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 4, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 4, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, 1.0, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, 1.0, 0, 0, 0, 0, 0.6, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, 3, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, 3, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("packun_smash_lw_arc"), true, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, -4, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("packun_smash_lw_arc"), true, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, -4, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attacks4", packun_attack_s4_s_game) - .acmd("effect_attacks4", packun_attack_s4_effect) - .acmd("game_attacks42", packun_attack_s4_s2_game) - .acmd("effect_attacks42", packun_attack_s4_s2_effect) - .acmd("expression_attacks42", packun_attack_s4_s2_expression) - .acmd("effect_attacks4charge2", packun_attack_s4_2_charge_effect) - .acmd("sound_attacks4charge2", packun_attack_s4_2_charge_sound) - .acmd("expression_attacks4charge2", packun_attack_s4_s2_charge_expression) - .acmd("sound_attacks42", packun_attack_s4_s2_sound) - .acmd("game_attackhi4", packun_attack_hi4_game) - .acmd("effect_attackhi4", packun_attack_hi4_effect) - .acmd("sound_attackhi4", packun_attack_hi4_sound) - .acmd("game_attacklw4", packun_attack_lw4_game) - .acmd("effect_attacklw4", packun_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attacks42", game_attacks42); + agent.acmd("effect_attacks42", effect_attacks42); + agent.acmd("sound_attacks42", sound_attacks42); + agent.acmd("expression_attacks42", expression_attacks42); + + agent.acmd("effect_attacks4charge2", effect_attacks4charge2); + agent.acmd("sound_attacks4charge2", sound_attacks4charge2); + agent.acmd("expression_attacks4charge2", expression_attacks4charge2); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/specials.rs b/fighters/packun/src/acmd/specials.rs index 7da1e62ae6..876c79b59f 100644 --- a/fighters/packun/src/acmd/specials.rs +++ b/fighters/packun/src/acmd/specials.rs @@ -1,28 +1,27 @@ - use super::*; -unsafe extern "C" fn packun_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); if stance != 2 { - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } else { - FT_MOTION_RATE(fighter, 9.0/(9.0 - 1.0)); + FT_MOTION_RATE(agent, 9.0/(9.0 - 1.0)); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE_SPIKEBALL); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } -unsafe extern "C" fn packun_special_s_shoot_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -80,7 +79,7 @@ unsafe extern "C" fn packun_special_s_shoot_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let charged = WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60; @@ -152,7 +151,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn packun_special_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -178,7 +177,7 @@ unsafe extern "C" fn packun_special_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -201,7 +200,7 @@ unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath2"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.2, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } @@ -209,7 +208,7 @@ unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.1, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); LAST_EFFECT_SET_RATE(agent, 1.6); } @@ -221,7 +220,7 @@ unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -243,7 +242,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_air_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -268,7 +267,7 @@ unsafe extern "C" fn packun_special_air_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -288,7 +287,7 @@ unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath2"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.2, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } @@ -296,7 +295,7 @@ unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.1, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); LAST_EFFECT_SET_RATE(agent, 1.6); } @@ -308,45 +307,44 @@ unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_special_s_shoot_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialsshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } if stance == 0 { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); if WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60 { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosionm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosionm"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } } } else { frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } - } -unsafe extern "C" fn packun_special_air_s_shoot_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 19.0); @@ -365,7 +363,7 @@ unsafe extern "C" fn packun_special_air_s_shoot_s_effect(agent: &mut L2CAgentBas } } -unsafe extern "C" fn packun_special_s_shoot_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -396,7 +394,7 @@ unsafe extern "C" fn packun_special_s_shoot_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 17.0); @@ -412,271 +410,270 @@ unsafe extern "C" fn packun_special_s_shoot_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsshoots(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60 { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } } -unsafe extern "C" fn packun_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - FT_MOTION_RATE(fighter, (10.0/15.0)); + FT_MOTION_RATE(agent, (10.0/15.0)); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 86.0); - FT_MOTION_RATE(fighter, 3.03); + FT_MOTION_RATE(agent, 3.03); frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } - } -unsafe extern "C" fn packun_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - FT_MOTION_RATE(fighter, (10.0/15.0)); + FT_MOTION_RATE(agent, (10.0/15.0)); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 86.0); - FT_MOTION_RATE(fighter, 3.03); + FT_MOTION_RATE(agent, 3.03); frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } - } -unsafe extern "C" fn packun_special_lw_bite_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwbiteattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if WorkModule::get_float(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_WORK_FLOAT_CHARGE_RATE) > 1.0 { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } } else { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 2.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_ATTACK_LERP); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_BITE_ATTACK); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn packun_special_lw_bite__attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwbite_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if WorkModule::get_float(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_WORK_FLOAT_CHARGE_RATE) > 1.0 { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } } else { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 2.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_ATTACK_LERP); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_BITE_ATTACK); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn packun_special_lw_bite_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.8, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.85 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_longrange_bite"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("packun_longrange_bite"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.9 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); } } -unsafe extern "C" fn packun_special_air_lw_bite_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlwbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.85 } else { 1.0 }; - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_longrange_bite"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("packun_longrange_bite"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.9 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_specialnstart", packun_special_n_start_game) - .acmd("game_specialairnstart", packun_special_n_start_game) - .acmd("game_specialsshoot", packun_special_s_shoot_game) - .acmd("game_specialairsshoot", packun_special_s_shoot_game) - .acmd("game_specialsshoots", packun_special_s_shoot_s_game) - .acmd("game_specialairsshoots", packun_special_s_shoot_s_game) - .acmd("effect_specialsend", packun_special_s_end_effect) - .acmd("effect_specialsshoot", packun_special_s_shoot_effect) - .acmd("effect_specialsshoots", packun_special_s_shoot_s_effect) - .acmd("effect_specialairsend", packun_special_air_s_end_effect) - .acmd("effect_specialairsshoot", packun_special_air_s_shoot_effect) - .acmd("expression_specialsshoot", packun_special_s_shoot_expression) - .acmd("expression_specialairsshoot", packun_special_s_shoot_expression) - .acmd("effect_specialairsshoots", packun_special_air_s_shoot_s_effect) - .acmd("sound_specialsshoot", packun_special_s_shoot_sound) - .acmd("sound_specialairsshoot", packun_special_s_shoot_sound) - .acmd("sound_specialsshoots", packun_special_s_shoot_s_sound) - .acmd("sound_specialairsshoots", packun_special_s_shoot_s_sound) - .acmd("expression_specialsshoots", packun_special_s_shoot_s_expression) - .acmd("expression_specialairsshoots", packun_special_s_shoot_s_expression) - .acmd("game_specialhi", packun_special_hi_game) - .acmd("game_specialairhi", packun_special_air_hi_game) - .acmd("game_speciallwbiteattack", packun_special_lw_bite_attack_game) - .acmd("game_speciallwbite_attack", packun_special_lw_bite__attack_game) - .acmd("effect_speciallwbite", packun_special_lw_bite_effect) - .acmd("effect_specialairlwbite", packun_special_air_lw_bite_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + + agent.acmd("game_specialsshoot", game_specialsshoot); + agent.acmd("game_specialairsshoot", game_specialsshoot); + agent.acmd("game_specialsshoots", game_specialsshoots); + agent.acmd("game_specialairsshoots", game_specialsshoots); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialsshoot", effect_specialsshoot); + agent.acmd("effect_specialsshoots", effect_specialsshoots); + agent.acmd("effect_specialairsend", effect_specialairsend); + agent.acmd("effect_specialairsshoot", effect_specialairsshoot); + agent.acmd("expression_specialsshoot", expression_specialsshoot); + agent.acmd("expression_specialairsshoot", expression_specialsshoot); + agent.acmd("effect_specialairsshoots", effect_specialairsshoots); + agent.acmd("sound_specialsshoot", sound_specialsshoot); + agent.acmd("sound_specialairsshoot", sound_specialsshoot); + agent.acmd("sound_specialsshoots", sound_specialsshoots); + agent.acmd("sound_specialairsshoots", sound_specialsshoots); + agent.acmd("expression_specialsshoots", expression_specialsshoots); + agent.acmd("expression_specialairsshoots", expression_specialsshoots); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwbiteattack", game_speciallwbiteattack); + agent.acmd("game_speciallwbite_attack", game_speciallwbite_attack); + agent.acmd("effect_speciallwbite", effect_speciallwbite); + agent.acmd("effect_specialairlwbite", effect_specialairlwbite); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/throws.rs b/fighters/packun/src/acmd/throws.rs index 3763cf9000..17e1a0ccdb 100644 --- a/fighters/packun/src/acmd/throws.rs +++ b/fighters/packun/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn packun_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 packun_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn packun_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -64,142 +63,166 @@ unsafe extern "C" fn packun_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); + } + frame(lua_state, 1.0); + if is_excute(agent) { + let damage = if stance != 1 { 0.0 } else { 0.3 }; + let effect = if stance != 1 { Hash40::new("collision_attr_normal") } else { Hash40::new("collision_attr_purple") }; + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_MOTION_RATE(fighter, (17.0/13.0)); + FT_MOTION_RATE(agent, (17.0/13.0)); } - if is_excute(fighter) { + if is_excute(agent) { let angle = if stance.label == 2 { 10 } else { 0 }; let kbg = if stance.label == 2 { 12 } else { 0 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0 * stance.damage_head, 45 - angle, 65 + kbg, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0 * stance.damage_head, 45 - angle, 65 + kbg, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let sfx_lvl = if stance.label == 2 { *ATTACK_SOUND_LEVEL_L } else { *ATTACK_SOUND_LEVEL_M }; - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 3.0 * stance.damage_head, 361, 100, 0, 50, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 3.0 * stance.damage_head, 361, 100, 0, 50, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 30, 8); + CHECK_FINISH_CAMERA(agent, 30, 8); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let kbg = if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 0 { 87 } else { 77 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, kbg, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, kbg, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 26, 11); + CHECK_FINISH_CAMERA(agent, 26, 11); } frame(lua_state, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn packun_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { let damage = if stance.label != 1 { 0.0 } else { 3.0 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0 * stance.damage_bite + damage, 90, 67, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0 * stance.damage_bite + damage, 90, 67, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("mouth"), 5.0, 90, 100, 0, 82, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("mouth"), 5.0, 90, 100, 0, 82, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_THROW); //AttackModule::set_catch_only_all(boma, true, false); - FT_CATCH_STOP(fighter, 8, 1); + FT_CATCH_STOP(agent, 8, 1); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); if stance.label == 1 { - ATTACK(fighter, 1, 1, Hash40::new("mouth"), 0.0, 90, 0, 0, 0, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); + ATTACK(agent, 1, 1, Hash40::new("mouth"), 0.0, 90, 0, 0, 0, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); //AttackModule::set_poison_param(boma, 1, 136, 45, 2.0, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); let angle = if stance.label == 0 { 66 } else if stance.label == 1 { 68 } else { 70 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0 * stance.damage_bite, angle, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0 * stance.damage_bite, angle, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 1.5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 0); + CHECK_FINISH_CAMERA(agent, 8, 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_catch", packun_catch_game) - .acmd("game_catchdash", packun_catch_dash_game) - .acmd("game_catchturn", packun_catch_turn_game) - .acmd("game_throwf", packun_throw_f_game) - .acmd("game_throwb", packun_throw_b_game) - .acmd("game_throwhi", packun_throw_hi_game) - .acmd("game_throwlw", packun_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchattack", game_catchattack); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/packun/src/acmd/tilts.rs b/fighters/packun/src/acmd/tilts.rs index d22fa1f5b6..6bf5b15f91 100644 --- a/fighters/packun/src/acmd/tilts.rs +++ b/fighters/packun/src/acmd/tilts.rs @@ -1,73 +1,71 @@ - use super::*; -unsafe extern "C" fn packun_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let shield_damage = if stance.label != 2 { 0 } else { 2 }; if stance.label == 2 { - FT_MOTION_RATE(fighter, (9.0/7.0)); + FT_MOTION_RATE(agent, (9.0/7.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5 * stance.damage_bite, 366, 20, 0, 20, 6.3, 0.0, 7.5, 12.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 2, 0, Hash40::new("virtualhit2"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5 * stance.damage_bite, 366, 20, 0, 20, 6.3, 0.0, 7.5, 12.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 2, 0, Hash40::new("virtualhit2"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_add_reaction_frame(boma, 0, 11.0, false); AttackModule::set_add_reaction_frame(boma, 1, 11.0, false); AttackModule::set_add_reaction_frame(boma, 2, 11.0, false); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn packun_attack_s3_s_a_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3a(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 5.5, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 5.5, 361, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 9.0, 361, 120, 0, 40, 6.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 5.5, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 5.5, 361, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 9.0, 361, 120, 0, 40, 6.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn packun_attack_s3_s_a_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3a(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 180, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 180, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, -1.0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, -1.0, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_hash = match color { 0 => Hash40::new("packun_atk_hi_trace_01"), @@ -80,19 +78,19 @@ unsafe extern "C" fn packun_attack_s3_s_a_effect(fighter: &mut L2CAgentBase) { 7 => Hash40::new("packun_atk_hi_trace_08"), _ => Hash40::new("packun_atk_hi_trace_01") }; - EFFECT_FOLLOW(fighter, color_hash, Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_hi_wind"), Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, color_hash, Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_hi_wind"), Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); } } -unsafe extern "C" fn packun_attack_s3_s_a_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks3a(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -105,20 +103,20 @@ unsafe extern "C" fn packun_attack_s3_s_a_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s_a_expression(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_attacks3a(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); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } -unsafe extern "C" fn packun_attack_s3_s2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -178,10 +176,9 @@ unsafe extern "C" fn packun_attack_s3_s2_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s3_s2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -214,7 +211,7 @@ unsafe extern "C" fn packun_attack_s3_s2_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -230,156 +227,155 @@ unsafe extern "C" fn packun_attack_s3_s2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let atk_frame = if stance.label == 2 { 6.0 } else { 5.0 }; - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, atk_frame); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn packun_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let sound_level_neck = if stance.label != 2 { *ATTACK_SOUND_LEVEL_S } else { *ATTACK_SOUND_LEVEL_S }; let sound_neck = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; let sound_level_head = if stance.label != 2 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_M }; let sound_head = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label == 2 { - FT_MOTION_RATE(fighter, (9.0/6.0)); + FT_MOTION_RATE(agent, (9.0/6.0)); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit1"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit2"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("virtualhit3"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, 85, 100, 0, 55, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_head, sound_head, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit1"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit2"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("virtualhit3"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, 85, 100, 0, 55, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_head, sound_head, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn packun_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let bkb = if stance.label == 1 {10} else {0}; if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 3.0); + FT_DESIRED_RATE(agent, 6.0, 3.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 4.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 3.4, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0 * stance.damage_other, 86, 75, 0, 60 + bkb, 5.0, 0.0, 2.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 4.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 3.4, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0 * stance.damage_other, 86, 75, 0, 60 + bkb, 5.0, 0.0, 2.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn packun_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), 0.7, 4.6, 4.6, -170, -20, -12, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), 0.7, 4.6, 4.6, -170, -20, -12, 1, true); } } else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), -0.7, 4.6, 4.6, -10, 200, 12, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), -0.7, 4.6, 4.6, -10, 200, 12, 1, true); } } } -unsafe extern "C" fn packun_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 4); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 14); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 14); } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attacks3", packun_attack_s3_s_game) - .acmd("game_attacks3a", packun_attack_s3_s_a_game) - .acmd("effect_attacks3a", packun_attack_s3_s_a_effect) - .acmd("sound_attacks3a", packun_attack_s3_s_a_sound) - .acmd("expression_attacks3a", packun_attack_s3_s_a_expression) - .acmd("game_attacks32", packun_attack_s3_s2_game) - .acmd("effect_attacks32", packun_attack_s3_s2_effect) - .acmd("sound_attacks32", packun_attack_s3_s2_sound) - .acmd("expression_attacks32", packun_attack_s3_s2_expression) - .acmd("game_attackhi3", packun_attack_hi3_game) - .acmd("expression_attackhi3", packun_attack_hi3_expression) - .acmd("game_attacklw3", packun_attack_lw3_game) - .acmd("effect_attacklw3", packun_attack_lw3_effect) - .acmd("expression_attacklw3", packun_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3a", game_attacks3a); + agent.acmd("effect_attacks3a", effect_attacks3a); + agent.acmd("sound_attacks3a", sound_attacks3a); + agent.acmd("expression_attacks3a", expression_attacks3a); + + agent.acmd("game_attacks32", game_attacks32); + agent.acmd("effect_attacks32", effect_attacks32); + agent.acmd("sound_attacks32", sound_attacks32); + agent.acmd("expression_attacks32", expression_attacks32); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/packun/src/lib.rs b/fighters/packun/src/lib.rs index d2eb961fea..e9b3073e05 100644 --- a/fighters/packun/src/lib.rs +++ b/fighters/packun/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod spikeball; +mod poisonbreath; use smash::{ lib::{ @@ -37,48 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -/*pub unsafe extern "C" fn guard_cont_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if ControlModule::get_stick_y(fighter.module_accessor) < 0.3 - && StatusModule::situation_kind(fighter.module_accessor) == SITUATION_KIND_GROUND { - if ((ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_S_R) - || ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_S_L)) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 0) - || (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_HI) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 1) - || (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_LW) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 2) { - fighter.change_to_custom_status(statuses::packun::ADAPTIVE_ROOTS, false, false); - return true.into(); - } - } - return false.into(); -}*/ - -extern "C" fn packun_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let fighter_kind = utility::get_kind(&mut *fighter.module_accessor); - if fighter_kind != *FIGHTER_KIND_PACKUN { - return; - } - //fighter.global_table[0x34].assign(&L2CValue::Ptr(guard_cont_pre as *const () as _)); - } -} - -extern "C" fn packun_init(fighter: &mut L2CFighterCommon) { - if fighter.global_table[globals::FIGHTER_KIND] != FIGHTER_KIND_PACKUN { - return; - } - - VarModule::set_int(fighter.battle_object, vars::packun::instance::CURRENT_STANCE, 0); -} +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); - smashline::Agent::new("packun") - .on_start(packun_reset) - .on_start(packun_init) - .install(); + let agent = &mut Agent::new("packun"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + spikeball::install(); + poisonbreath::install(); } \ No newline at end of file diff --git a/fighters/packun/src/opff.rs b/fighters/packun/src/opff.rs index 007efe3844..4ca2b437e4 100644 --- a/fighters/packun/src/opff.rs +++ b/fighters/packun/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn piranhacopter_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI @@ -310,78 +309,6 @@ pub unsafe fn packun_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn poisonbreath_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let owner_object = owner_module_accessor.object(); - let status_kind = StatusModule::status_kind(boma); - let motion_kind = MotionModule::motion_kind(boma); - if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let packun_pos_x = PostureModule::pos_x(owner_module_accessor); - let packun_pos_y = PostureModule::pos_y(owner_module_accessor); - let scale = PostureModule::scale(boma); - if ((pos_x - packun_pos_x).abs() < 12.0*scale) && - ((pos_y - packun_pos_y).abs() < 12.0*scale) && - pos_y != 0.0 { - if owner_module_accessor.is_status(*FIGHTER_STATUS_KIND_APPEAL){ - VarModule::on_flag(owner_object, vars::packun::status::CLOUD_COVER); - } - if VarModule::is_flag(owner_object, vars::packun::status::FLAME_ACTIVE) && - motion_kind != hash40("explode") { - //println!("Woo!"); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - } - if VarModule::is_flag(owner_object, vars::packun::status::BITE_START) && - motion_kind != hash40("explode") { - //println!("Woo!"); - VarModule::on_flag(owner_object, vars::packun::status::BURST); - WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - } - } - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - -pub fn install() { - smashline::Agent::new("packun") - .on_line(Main, packun_frame_wrapper) - .install(); - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install(); - smashline::Agent::new("packun_poisonbreath") - .on_line(Main, poisonbreath_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, packun_frame_wrapper); } \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/acmd.rs b/fighters/packun/src/poisonbreath/acmd.rs new file mode 100644 index 0000000000..e42d7c9a67 --- /dev/null +++ b/fighters/packun/src/poisonbreath/acmd.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_startmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_shootmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + frame(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } +} + +unsafe extern "C" fn effect_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath2"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_gas"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_max"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_max_smoke"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth2"), false, false); + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + } +} + +unsafe extern "C" fn sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); + agent.acmd("game_startmax", game_startmax); + + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_shootmax", game_shootmax); + + agent.acmd("game_explode", game_explode); + agent.acmd("effect_explode", effect_explode); + agent.acmd("sound_explode", sound_explode); +} \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/mod.rs b/fighters/packun/src/poisonbreath/mod.rs new file mode 100644 index 0000000000..6ab0343ac5 --- /dev/null +++ b/fighters/packun/src/poisonbreath/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("packun_poisonbreath"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/opff.rs b/fighters/packun/src/poisonbreath/opff.rs new file mode 100644 index 0000000000..45d5bf5151 --- /dev/null +++ b/fighters/packun/src/poisonbreath/opff.rs @@ -0,0 +1,43 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn poisonbreath_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let owner_object = owner_module_accessor.object(); + let status_kind = StatusModule::status_kind(boma); + let motion_kind = MotionModule::motion_kind(boma); + if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let packun_pos_x = PostureModule::pos_x(owner_module_accessor); + let packun_pos_y = PostureModule::pos_y(owner_module_accessor); + let scale = PostureModule::scale(boma); + if ((pos_x - packun_pos_x).abs() < 12.0*scale) && + ((pos_y - packun_pos_y).abs() < 12.0*scale) && + pos_y != 0.0 { + if owner_module_accessor.is_status(*FIGHTER_STATUS_KIND_APPEAL){ + VarModule::on_flag(owner_object, vars::packun::status::CLOUD_COVER); + } + if VarModule::is_flag(owner_object, vars::packun::status::FLAME_ACTIVE) && + motion_kind != hash40("explode") { + //println!("Woo!"); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + } + if VarModule::is_flag(owner_object, vars::packun::status::BITE_START) && + motion_kind != hash40("explode") { + //println!("Woo!"); + VarModule::on_flag(owner_object, vars::packun::status::BURST); + WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, poisonbreath_frame); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/acmd.rs b/fighters/packun/src/spikeball/acmd.rs new file mode 100644 index 0000000000..642a07fc95 --- /dev/null +++ b/fighters/packun/src/spikeball/acmd.rs @@ -0,0 +1,260 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + ModelModule::set_scale(boma, scale); + MotionModule::set_rate(boma, 1.4); + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn game_startair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + ModelModule::set_scale(boma, scale); + MotionModule::set_rate(boma, 1.4); + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn game_loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if WorkModule::is_flag(boma, *WEAPON_PACKUN_SPIKEBALL_INSTANCE_WORK_ID_FLAG_REACTIVE) { + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + } + else { + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + for _ in 0..999 { + if is_excute(agent) { + if boma.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP){ + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); + } + } + wait(lua_state, 3.0); + } + } +} + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_wait(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + /*frame(lua_state, 55.0); + if is_excute(agent) { + if stance == 1 { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 361, 45, 3.0, false); + } + }*/ +} + +unsafe extern "C" fn effect_wait(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + AttackModule::clear_all(boma); + ModelModule::set_scale(boma, 0.1); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *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_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 151, 30, 3.5, false); + } +} + +unsafe extern "C" fn effect_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.01, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.25); + } +} + +unsafe extern "C" fn sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); + agent.acmd("game_startair", game_startair); + + agent.acmd("game_loop", game_loop); + agent.acmd("effect_loop", effect_loop); + + agent.acmd("game_shoot", game_shoot); + agent.acmd("effect_shoot", effect_shoot); + + agent.acmd("game_fall", game_fall); + agent.acmd("effect_fall", effect_fall); + + agent.acmd("game_wait", game_wait); + agent.acmd("effect_wait", effect_wait); + + agent.acmd("game_explode", game_explode); + agent.acmd("effect_explode", effect_explode); + agent.acmd("sound_explode", sound_explode); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/mod.rs b/fighters/packun/src/spikeball/mod.rs new file mode 100644 index 0000000000..dae2c3f27f --- /dev/null +++ b/fighters/packun/src/spikeball/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("packun_spikeball"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/opff.rs b/fighters/packun/src/spikeball/opff.rs new file mode 100644 index 0000000000..438c445355 --- /dev/null +++ b/fighters/packun/src/spikeball/opff.rs @@ -0,0 +1,37 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { + VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("bomb"); + } + else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { + VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("not bomb"); + } + let status_kind = StatusModule::status_kind(weapon.module_accessor); + let motion_kind = MotionModule::motion_kind(weapon.module_accessor); + if [*FIGHTER_KIND_PACKUN, *FIGHTER_KIND_KIRBY].contains(&owner_module_accessor.kind()) { + if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { + /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { + println!("will bomb"); + } */ + if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + // println!("is bomb"); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, spikeball_frame); +} \ No newline at end of file diff --git a/fighters/packun/src/status.rs b/fighters/packun/src/status.rs deleted file mode 100644 index c179934e66..0000000000 --- a/fighters/packun/src/status.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::*; -use globals::*; - -mod special_hi; -mod special_s; -mod attack_s4; - -pub fn install() { - special_s::install(); - special_hi::install(); - attack_s4::install(); -} \ No newline at end of file diff --git a/fighters/packun/src/status/attack_s4.rs b/fighters/packun/src/status/attack_s4.rs index 29e1a5c784..e97dec78e0 100644 --- a/fighters/packun/src/status/attack_s4.rs +++ b/fighters/packun/src/status/attack_s4.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4_START unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackS4Start(); @@ -12,6 +13,8 @@ unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Start_Main as *const () as _)) } +// FIGHTER_STATUS_KIND_ATTACK_S4 + unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_s4(fighter, true); fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4_Main as *const () as _)) @@ -23,6 +26,8 @@ unsafe extern "C" fn sub_attack_s4(fighter: &mut L2CFighterCommon, param_1: bool WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); } +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !StopModule::is_stop(fighter.module_accessor) { fighter.sub_smash_hold_uniq(false.into()); @@ -45,10 +50,8 @@ unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CV fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold_main as *const () as _)) } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main); } \ No newline at end of file diff --git a/fighters/packun/src/status/mod.rs b/fighters/packun/src/status/mod.rs new file mode 100644 index 0000000000..89ba59574b --- /dev/null +++ b/fighters/packun/src/status/mod.rs @@ -0,0 +1,19 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; +mod special_s; +mod attack_s4; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::set_int(fighter.battle_object, vars::packun::instance::CURRENT_STANCE, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); + special_hi::install(agent); + attack_s4::install(agent); +} \ No newline at end of file diff --git a/fighters/packun/src/status/special_hi.rs b/fighters/packun/src/status/special_hi.rs index 5beb2b9e24..90d0989522 100644 --- a/fighters/packun/src/status/special_hi.rs +++ b/fighters/packun/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI pub unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { @@ -128,9 +129,7 @@ unsafe extern "C" fn special_hi_landing_main_loop(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING, special_hi_landing_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING, special_hi_landing_main); } \ No newline at end of file diff --git a/fighters/packun/src/status/special_s.rs b/fighters/packun/src/status/special_s.rs index e3a17d20ca..7ad71a2b48 100644 --- a/fighters/packun/src/status/special_s.rs +++ b/fighters/packun/src/status/special_s.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn packun_special_s_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT + +unsafe extern "C" fn special_s_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !(fighter.is_situation(*SITUATION_KIND_GROUND)) { CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); let motion = if VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) == 2 @@ -14,10 +15,10 @@ unsafe extern "C" fn packun_special_s_shoot_main(fighter: &mut L2CFighterCommon) {Hash40::new("special_s_shoot_s")} else {Hash40::new("special_s_shoot")}; MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(packun_special_s_shoot_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_shoot_main_loop as *const () as _)) } -unsafe extern "C" fn packun_special_s_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -127,6 +128,7 @@ unsafe extern "C" fn packun_special_s_shoot_main_loop(fighter: &mut L2CFighterCo return 0.into(); } + unsafe fn special_s_shoot_helper(fighter: &mut L2CFighterCommon) { if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { @@ -164,8 +166,6 @@ unsafe fn special_s_shoot_helper(fighter: &mut L2CFighterCommon) { return; } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT, packun_special_s_shoot_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT, special_s_shoot_main); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/aerials.rs b/fighters/pacman/src/acmd/aerials.rs index b2be9af752..78c9e2d76a 100644 --- a/fighters/pacman/src/acmd/aerials.rs +++ b/fighters/pacman/src/acmd/aerials.rs @@ -1,210 +1,207 @@ - use super::*; -unsafe extern "C" fn pacman_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 10.0, 50, 70, 0, 45, 8.1, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 10.0, 50, 70, 0, 45, 8.1, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 8.5, 50, 70, 0, 45, 7.2, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 8.5, 50, 70, 0, 45, 7.2, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 6.0, 50, 70, 0, 45, 4.5, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 6.0, 50, 70, 0, 45, 4.5, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pacman_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pacman_change_start"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pacman_change_start"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.8, 0, 0, 90, 0.8, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.8, 0, 0, 90, 0.8, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.7, 0, 0, 90, 0.75, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.7, 0, 0, 90, 0.75, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pacman_change_end"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind"), true, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pacman_change_end"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind"), true, true); } } -unsafe extern "C" fn pacman_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.5, 361, 29, 0, 70, 5.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 7.5, 361, 29, 0, 70, 5.0, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.5, 361, 29, 0, 70, 5.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 7.5, 361, 29, 0, 70, 5.0, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.25); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 49.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 pacman_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.769); } frame(lua_state, 8.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 115, 0, 30, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 115, 0, 30, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 115, 0, 30, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 115, 0, 30, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 25, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 7.0, 361, 80, 0, 25, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 25, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 7.0, 361, 80, 0, 25, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pacman_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.662); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.662); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 70, 85, 0, 35, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 70, 85, 0, 35, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 70, 85, 0, 35, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 70, 85, 0, 35, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 15, 70, 0, 20, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 15, 70, 0, 20, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 15, 70, 0, 20, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 15, 70, 0, 20, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pacman_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn pacman_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 245, 100, 5, 0, 4.5, 0.0, 1.8, 0.5, Some(0.0), Some(4.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 130, 100, 22, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 100, 100, 35, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 245, 100, 5, 0, 4.5, 0.0, 1.8, 0.5, Some(0.0), Some(4.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 130, 100, 22, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 100, 100, 35, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 14.0, false); AttackModule::set_add_reaction_frame(boma, 1, 9.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 5.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 69, 75, 0, 74, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 69, 75, 0, 74, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attackairn", pacman_attack_air_n_game) - .acmd("effect_attackairn", pacman_attack_air_n_effect) - .acmd("game_attackairf", pacman_attack_air_f_game) - .acmd("game_attackairb", pacman_attack_air_b_game) - .acmd("game_attackairhi", pacman_attack_air_hi_game) - .acmd("expression_attackairhi", pacman_attack_air_hi_expression) - .acmd("game_attackairlw", pacman_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pacman/src/acmd/ground.rs b/fighters/pacman/src/acmd/ground.rs index 737181d780..8d536b2190 100644 --- a/fighters/pacman/src/acmd/ground.rs +++ b/fighters/pacman/src/acmd/ground.rs @@ -1,104 +1,99 @@ - use super::*; -unsafe extern "C" fn pacman_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.5, 0.0, 7.5, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 1.7, 0.0, 7.5, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.5, 0.0, 7.5, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 1.7, 0.0, 7.5, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 4.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pacman_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 35, 0, 35, 2.5, 0.0, 7.5, 1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 35, 0, 30, 2.8, 0.0, 7.5, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 30, 3.0, 0.0, 7.5, 8.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 35, 0, 35, 2.5, 0.0, 7.5, 1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 35, 0, 30, 2.8, 0.0, 7.5, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 30, 3.0, 0.0, 7.5, 8.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn pacman_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 4.0, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 5.0, 0.0, 8.0, 13.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 4.0, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 5.0, 0.0, 8.0, 13.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pacman_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("pizzapacman"), 0.0, 361, 100, 12, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("pizzapacman"), 0.0, 361, 100, 12, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 7.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 7.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attack11", pacman_attack_11_game) - .acmd("game_attack12", pacman_attack_12_game) - .acmd("game_attackdash", pacman_attack_dash_game) - .install(); - smashline::Agent::new("pikmin") - .acmd("game_attack13", pacman_attack_13_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pacman/src/acmd/mod.rs b/fighters/pacman/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/pacman/src/acmd/mod.rs +++ b/fighters/pacman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/other.rs b/fighters/pacman/src/acmd/other.rs index 0cfee9c9fb..76b6d22ac2 100644 --- a/fighters/pacman/src/acmd/other.rs +++ b/fighters/pacman/src/acmd/other.rs @@ -1,64 +1,59 @@ - use super::*; -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_pacman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pacman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn pacman_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, 11.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("pacman") - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", pacman_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_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pacman/src/acmd/smashes.rs b/fighters/pacman/src/acmd/smashes.rs index 5fad360303..dc391f05a0 100644 --- a/fighters/pacman/src/acmd/smashes.rs +++ b/fighters/pacman/src/acmd/smashes.rs @@ -1,113 +1,109 @@ - use super::*; -unsafe extern "C" fn pacman_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 16.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 40, 3.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 16.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 40, 3.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 9.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 9.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 135, 100, 125, 0, 4.0, 0.0, 8.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 135, 100, 125, 0, 4.0, 0.0, 8.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 14.0, 83, 102, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 14.0, 83, 102, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 8.0, 83, 97, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 8.0, 83, 97, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("ghost2"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("ghost2"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("ghost2"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("ghost2"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attacks4", pacman_attack_s4_s_game) - .acmd("game_attackhi4", pacman_attack_hi4_game) - .acmd("game_attacklw4", pacman_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pacman/src/acmd/specials.rs b/fighters/pacman/src/acmd/specials.rs index b11bc985b9..805d60d193 100644 --- a/fighters/pacman/src/acmd/specials.rs +++ b/fighters/pacman/src/acmd/specials.rs @@ -1,60 +1,10 @@ - use super::*; -unsafe extern "C" fn pacman_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - let charge_level = WorkModule::get_int(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_INT_SPECIAL_N_CHARGE_RANK); - if charge_level <= 0 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANCHERRY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 1 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANSTRAWBERRY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 3 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANORANGE), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 5 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANAPPLE), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 7 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANMELON), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 9 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANBOSS), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 11 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANBELL), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 12 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANKEY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - //WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else{ - WorkModule::on_flag(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_FLAG_THROW); - } - - } - -} - -unsafe extern "C" fn pacman_special_air_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ let charge_level = WorkModule::get_int(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_INT_SPECIAL_N_CHARGE_RANK); if charge_level <= 0 { @@ -94,96 +44,71 @@ unsafe extern "C" fn pacman_special_air_n_shoot_game(fighter: &mut L2CAgentBase) else{ WorkModule::on_flag(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_FLAG_THROW); } - } - } -unsafe extern "C" fn expression_specialairsreturn(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_INTP, *SLOPE_STATUS_LR, 4); +unsafe extern "C" fn expression_specialairsreturn(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_INTP, *SLOPE_STATUS_LR, 4); } - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_none") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_normal") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn pacman_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } } -unsafe extern "C" fn pacman_special_lw_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.4); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.3, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.3, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_special_air_lw_failure_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, 2.4); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.3, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + + agent.acmd("expression_specialairsreturn", expression_specialairsreturn); + + agent.acmd("game_specialairhiend", game_specialairhiend); -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_specialnshoot", pacman_special_n_shoot_game) - .acmd("game_specialairnshoot", pacman_special_air_n_shoot_game) - .acmd("expression_specialairsreturn", expression_specialairsreturn) - .acmd("game_specialairhiend", pacman_special_air_hi_end_game) - .acmd("game_speciallwfailure", pacman_special_lw_failure_game) - .acmd("game_specialairlwfailure", pacman_special_air_lw_failure_game) - .install(); + agent.acmd("game_speciallwfailure", game_speciallwfailure); + agent.acmd("game_specialairlwfailure", game_speciallwfailure); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/throws.rs b/fighters/pacman/src/acmd/throws.rs index b38e46c702..63b8d09ec1 100644 --- a/fighters/pacman/src/acmd/throws.rs +++ b/fighters/pacman/src/acmd/throws.rs @@ -1,52 +1,51 @@ use super::*; -unsafe extern "C" fn pacman_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 82, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 82, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 3); + CHECK_FINISH_CAMERA(agent, 14, 3); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn pacman_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 80, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 80, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 22); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 22); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.842); + FT_MOTION_RATE(agent, 0.842); } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_throwb", pacman_throw_b_game) - .acmd("game_throwhi", pacman_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pacman/src/acmd/tilts.rs b/fighters/pacman/src/acmd/tilts.rs index 98de446a6e..5216468a12 100644 --- a/fighters/pacman/src/acmd/tilts.rs +++ b/fighters/pacman/src/acmd/tilts.rs @@ -1,198 +1,192 @@ - use super::*; -unsafe extern "C" fn pacman_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 7.5, 93, 75, 0, 55, 5.6, 2.4, -0.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.5, 93, 75, 0, 55, 4.0, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 7.0, -4.5, Some(0.0), Some(7.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handl"), 7.5, 93, 75, 0, 55, 5.6, 2.4, -0.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.5, 93, 75, 0, 55, 4.0, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 7.0, -4.5, Some(0.0), Some(7.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 10.0, -3.5, Some(0.0), Some(10.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 10.0, -3.5, Some(0.0), Some(10.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("rot"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("rot"), *HIT_STATUS_OFF); } - } -unsafe extern "C" fn pacman_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn pacman_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 4.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 4.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 5.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 5.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_lw3_expression(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_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw3(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_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_none") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_normal") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_none") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_OFF); - } - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_OFF); + } + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attacks3hi", pacman_attack_s3_hi_game) - .acmd("game_attacks3", pacman_attack_s3_s_game) - .acmd("game_attacks3lw", pacman_attack_s3_lw_game) - .acmd("game_attackhi3", pacman_attack_hi3_game) - .acmd("expression_attackhi3", pacman_attack_hi3_expression) - .acmd("game_attacklw3", pacman_attack_lw3_game) - .acmd("expression_attacklw3", pacman_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/pacman/src/lib.rs b/fighters/pacman/src/lib.rs index 5537dac979..63ab91a7b9 100644 --- a/fighters/pacman/src/lib.rs +++ b/fighters/pacman/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pacman"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/pacman/src/opff.rs b/fighters/pacman/src/opff.rs index 6bae8edc7c..3ee08dc953 100644 --- a/fighters/pacman/src/opff.rs +++ b/fighters/pacman/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { //PM-like neutral-b canceling if status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_N_CANCEL { @@ -110,8 +109,6 @@ pub unsafe fn pacman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("pacman") - .on_line(Main, pacman_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pacman_frame_wrapper); } \ No newline at end of file diff --git a/fighters/pacman/src/status/mod.rs b/fighters/pacman/src/status/mod.rs index e892d9885a..39bab6e6bc 100644 --- a/fighters/pacman/src/status/mod.rs +++ b/fighters/pacman/src/status/mod.rs @@ -1,8 +1,9 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_s; -pub fn install() { - special_s::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/pacman/src/status/special_s.rs b/fighters/pacman/src/status/special_s.rs index f9f940b06d..55540d03e8 100644 --- a/fighters/pacman/src/status/special_s.rs +++ b/fighters/pacman/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH @@ -46,10 +45,8 @@ pub unsafe extern "C" fn fall_special_init(fighter: &mut L2CFighterCommon) -> L2 smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_FALL_SPECIAL)(fighter) } -pub fn install() { - smashline::Agent::new("pacman") - .status(Main, *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main) - .status( Main,*FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN, special_s_return_main) - .status(Init, *FIGHTER_STATUS_KIND_FALL_SPECIAL, fall_special_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main); + agent.status( Main,*FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN, special_s_return_main); + agent.status(Init, *FIGHTER_STATUS_KIND_FALL_SPECIAL, fall_special_init); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/aerials.rs b/fighters/palutena/src/acmd/aerials.rs index 20e14df054..e664008898 100644 --- a/fighters/palutena/src/acmd/aerials.rs +++ b/fighters/palutena/src/acmd/aerials.rs @@ -1,95 +1,88 @@ - use super::*; -unsafe extern "C" fn palutena_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.870); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 95, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.870); + ATTACK(agent, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 95, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 150, 0, 37, 1.5, 0.0, 12.3, 5.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 5.0, 50, 150, 0, 37, 10.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 150, 0, 37, 1.5, 0.0, 12.3, 5.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 5.0, 50, 150, 0, 37, 10.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn palutena_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.714); - } + FT_MOTION_RATE(agent, 0.714); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 81, 0, 38, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 81, 0, 38, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn palutena_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -113,40 +106,37 @@ unsafe extern "C" fn palutena_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(8.0-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 12.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 3.5, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 98, 0, 31, 6.7, 0.0, 10.7, -13.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 3.5, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 98, 0, 31, 6.7, 0.0, 10.7, -13.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 29.0/(49.0-11.0)); + FT_MOTION_RATE_RANGE(agent, 11.0, 49.0, 29.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn palutena_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -172,49 +162,48 @@ unsafe extern "C" fn palutena_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_DESIRED_RATE(fighter, 13.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 105, 100, 45, 0, 4.0, 0.0, 20.0, 6.0, Some(0.0), Some(20.0), Some(-6.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 22.799999, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, 4.0, Some(0.0), Some(22.0), Some(9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(22.0), Some(-9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 16.0, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + FT_DESIRED_RATE(agent, 13.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 105, 100, 45, 0, 4.0, 0.0, 20.0, 6.0, Some(0.0), Some(20.0), Some(-6.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 22.799999, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, 4.0, Some(0.0), Some(22.0), Some(9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(22.0), Some(-9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 16.0, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, 4.0, Some(0.0), Some(23.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, -4.0, Some(0.0), Some(23.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, 4.0, Some(0.0), Some(23.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, -4.0, Some(0.0), Some(23.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn palutena_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -236,76 +225,58 @@ unsafe extern "C" fn palutena_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 50, 97, 0, 34, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 50, 97, 0, 34, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 95, 59, 0, 52, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 95, 59, 0, 52, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn palutena_attack_air_lw_expression(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); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn palutena_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -339,17 +310,36 @@ unsafe extern "C" fn palutena_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attackairn", palutena_attack_air_n_game) - .acmd("game_attackairf", palutena_attack_air_f_game) - .acmd("effect_attackairf", palutena_attack_air_f_effect) - .acmd("game_attackairb", palutena_attack_air_b_game) - .acmd("effect_attackairb", palutena_attack_air_b_effect) - .acmd("game_attackairhi", palutena_attack_air_hi_game) - .acmd("effect_attackairhi", palutena_attack_air_hi_effect) - .acmd("game_attackairlw", palutena_attack_air_lw_game) - .acmd("expression_attackairlw", palutena_attack_air_lw_expression) - .acmd("effect_attackairlw", palutena_attack_air_lw_effect) - .install(); +unsafe extern "C" fn expression_attackairlw(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); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/ground.rs b/fighters/palutena/src/acmd/ground.rs index 2303dde490..e46fbbeca2 100644 --- a/fighters/palutena/src/acmd/ground.rs +++ b/fighters/palutena/src/acmd/ground.rs @@ -1,112 +1,109 @@ - use super::*; -unsafe extern "C" fn palutena_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 7, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 7, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn palutena_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 16.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 16.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualshield"), *HIT_STATUS_INVINCIBLE); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualshield"), *HIT_STATUS_INVINCIBLE); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 50, 75, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 70, 75, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 50, 75, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 70, 75, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 75, 60, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 75, 60, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 75, 60, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 75, 60, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualshield"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualshield"), *HIT_STATUS_OFF); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(40.0-18.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(40.0-18.0)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn palutena_attack_dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -138,11 +135,10 @@ unsafe extern "C" fn palutena_attack_dash_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attack11", palutena_attack_11_game) - .acmd("game_attack100end", palutena_attack_100_end_game) - .acmd("game_attackdash", palutena_attack_dash_game) - .acmd("effect_attackdash", palutena_attack_dash_effect) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/mod.rs b/fighters/palutena/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/palutena/src/acmd/mod.rs +++ b/fighters/palutena/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/other.rs b/fighters/palutena/src/acmd/other.rs index 0685291c58..844c7a39af 100644 --- a/fighters/palutena/src/acmd/other.rs +++ b/fighters/palutena/src/acmd/other.rs @@ -1,392 +1,121 @@ - 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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_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(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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_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_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_palutena_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_palutena_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn palutena_explosiveflame_reserve_wait_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - FT_MOTION_RATE(fighter, 10.0); - } - -} - -unsafe extern "C" fn palutena_reflectionboard_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.1); - } - frame(lua_state, 210.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - } -unsafe extern "C" fn palutena_autoaimbullet_shot_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; - let damage = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {10.0} else {6.0}; - let paralyze = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {0.6} else {0.4}; - if !palutena { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 41, 0, 40, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.7, 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_palutena_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } - else { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 65, 40, 0, 75, 2.3, 0.0, 0.0, 0.0, None, None, None, paralyze, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } -} - -unsafe extern "C" fn palutena_autoaimbullet_shot_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; - let power = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {Hash40::new("sys_hit_elec")} else {Hash40::new("sys_hit_elec_s")}; - let size = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {2.0} else {1.0}; - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_bullet_shot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if palutena { - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - } - } - if palutena { - for _ in 0..99 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.2, 1.2, 0, 0, 0, 0.23 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 0.2, -1.4, 0, 0, 0, 0.17 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.7, 0.1, 0, 0, 0, 0.32 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - LAST_EFFECT_SET_RATE(agent, 1); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.4, 1.0, 0, 0, 0, 0.2 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.3, -1.4, 0, 0, 0, 0.15 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - } - } -} - -unsafe extern "C" fn palutena_explosiveflame_explode_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"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 6.0); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 7.2); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 8.4); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 9.6); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 10.8); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 12.0); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - //AREA_WIND_2ND_RAD(fighter, 0, 1, 0.02, 1000, 1, 0, 0, 29); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - } - wait(lua_state, 2.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(); 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("palutena") - .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("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) - .install(); - smashline::Agent::new("palutena_autoaimbullet") - .acmd("game_shot", palutena_autoaimbullet_shot_game) - .acmd("effect_shot", palutena_autoaimbullet_shot_effect) - .install(); - smashline::Agent::new("palutena_reflectionboard") - .acmd("game_shoot", palutena_reflectionboard_shoot_game) - .install(); - smashline::Agent::new("palutena_explosiveflame") - .acmd("game_explode", palutena_explosiveflame_explode_game) - .install(); - // smashline::Agent::new("palutena_explosiveflame_reserve") - // .acmd("effect_wait", palutena_explosiveflame_reserve_wait_effect) - // .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/smashes.rs b/fighters/palutena/src/acmd/smashes.rs index e7528801f8..b67da2998d 100644 --- a/fighters/palutena/src/acmd/smashes.rs +++ b/fighters/palutena/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn palutena_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -42,7 +41,7 @@ unsafe extern "C" fn palutena_attack_s4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_s4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -71,34 +70,33 @@ unsafe extern "C" fn palutena_attack_s4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 88, 91, 0, 53, 4.5, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 88, 91, 0, 53, 4.5, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 88, 91, 0, 53, 2.8, 0.0, 22.0, 9.7, Some(0.0), Some(2.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 88, 91, 0, 53, 2.8, 0.0, 22.0, 9.7, Some(0.0), Some(2.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn palutena_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -126,7 +124,7 @@ unsafe extern "C" fn palutena_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -165,7 +163,7 @@ unsafe extern "C" fn palutena_attack_lw4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -194,13 +192,13 @@ unsafe extern "C" fn palutena_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attacks4", palutena_attack_s4_game) - .acmd("effect_attacks4", palutena_attack_s4_effect) - .acmd("game_attackhi4", palutena_attack_hi4_game) - .acmd("effect_attackhi4", palutena_attack_hi4_effect) - .acmd("game_attacklw4", palutena_attack_lw4_game) - .acmd("effect_attacklw4", palutena_attack_lw4_effect) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials.rs b/fighters/palutena/src/acmd/specials.rs deleted file mode 100644 index 1230e739dc..0000000000 --- a/fighters/palutena/src/acmd/specials.rs +++ /dev/null @@ -1,931 +0,0 @@ - -use super::*; - -unsafe extern "C" fn palutena_special_n_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 40, 0, 70, 8.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 22.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn palutena_special_n_expression(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); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 5.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn palutena_special_n_r_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {4.0} else {0.0}; - let sound_lvl = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - let size = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2.0} else {0.0}; - let kbg = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {10} else {0}; - FT_DESIRED_RATE(agent, 18.0, 12.0); - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + power, 361, 95 - kbg, 0, 40, 5.6 + (size / 2.0), 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (power / 2.0), 361, 97 - kbg, 0, 40, 8.6 + size, 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 22.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn palutena_special_n_r_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 1, 21, 2.5, 0, -50, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - } - frame(lua_state, 18.0); - if power { - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_bomb_d"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - } - else { - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } - -} - -unsafe extern "C" fn palutena_special_n_r_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_bomb_l")} else {Hash40::new("se_common_bomb_s")}; - frame(lua_state, 14.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_s")); - if power { - PLAY_SE(agent, Hash40::new("se_palutena_smash_s01")); - } - PLAY_SE(agent, sound_lvl); - } -} - -unsafe extern "C" fn palutena_special_n_r_expression(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_INTP, *SLOPE_STATUS_NONE, 4); - AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 40); - } - frame(lua_state, 11.0); - app::sv_animcmd::execute(lua_state, 11.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - AREA_WIND_2ND_arg10(agent, 0, 2, 30, 300, 0.8, 25, 12, 50, 24, 80); - } - frame(lua_state, 18.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 36.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 65.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn palutena_special_n_b_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let power = if powered {5.0} else {0.0}; - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 4.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); - } - FT_DESIRED_RATE(agent, 14.0, 8.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0 + power, 88, 91, 0, 53, 4.5, 0.0, 15.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 + power, 88, 91, 0, 58, 2.8, 0.0, 30.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - if powered { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 91, 0, 62, 2.8, 0.0, 45.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - } - } - frame(lua_state, 28.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_DESIRED_RATE(agent, 17.0, 7.0); - } - } - frame(lua_state, 43.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn palutena_special_n_b_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let length = if powered { 2.7 } else { 1.8 }; - let length2 = if powered { 0.69 } else { 0.5 }; - let y_pos = if powered {25} else {16}; - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.05, 0.90); - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(agent, Hash40::new("palutena_pressure"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, length2, true); - LAST_EFFECT_SET_ALPHA(agent, 0.3); - LAST_EFFECT_SET_RATE(agent, (16.0/10.0)); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 4, 21.5, 2, 0, -60, 0, 1, true, 0.7); - LAST_EFFECT_SET_RATE(agent, 1.1); - LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); - EFFECT_FOLLOW(agent, Hash40::new("sys_ice"), Hash40::new("top"), 0, y_pos, 10, 0, 250, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); - EffectModule::set_scale_last(boma, &Vector3f::new(0.5, length, 0.5)); - } - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_ice"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_pressure"), false, false); - } - if is_excute(agent) { - let size = if powered { 0.6 } else { 0.5 }; - EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 24, 10, 0, 0, 0, size, true); - if powered { - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 40, 10, 0, 0, 0, 0.3, true); - } - } - frame(lua_state, 50.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_b_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_frieze_l")} else {Hash40::new("se_common_frieze_m")}; - frame(lua_state, 17.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_palutena_attack07")); - if power { - PLAY_SE(agent, Hash40::new("se_palutena_smash_h01")); - } - PLAY_SE(agent, sound_lvl); - } -} - -unsafe extern "C" fn palutena_special_n_b_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 13.0); - app::sv_animcmd::execute(lua_state, 13.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 16.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_arg10(agent, 0, 2, 90, 300, 1, 9, 35, 18, 70, 80); - } - frame(lua_state, 18.0); - if is_excute(agent) { - if powered { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } else { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - - } - frame(lua_state, 48.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } -} - -unsafe extern "C" fn palutena_special_n_y_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let hitlag = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.5} else {0.75}; - let paralyze = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.6} else {0.3}; - let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2} else {4}; - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 20.0); - if is_excute(agent) { - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - WorkModule::set_float(boma, PostureModule::pos_x(boma) - 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); - } - else { - WorkModule::set_float(boma, PostureModule::pos_x(boma) + 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); - } - WorkModule::set_float(boma, PostureModule::pos_y(boma) + 5.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_Y); - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_AUTOAIMBULLET, false, -1); - } -} - -unsafe extern "C" fn palutena_special_n_y_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - } - frame(lua_state, 35.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_y_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_electric_hit_l")} else {Hash40::new("se_common_electric_hit_m")}; - frame(lua_state, 11.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); - } - wait(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, sound_lvl); - } - wait(lua_state, 29.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn palutena_special_n_y_expression(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); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); - } - wait(lua_state, 12.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); - } -} - -unsafe extern "C" fn palutena_special_n_p_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, false, -1); - ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4_charge"), false, -1.0); - } - frame(lua_state, 1.0); - FT_DESIRED_RATE(agent, 14.0, 16.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4"), false, -1.0); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 258, 90, 105, 0, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 258, 60, 0, 30, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_DESIRED_RATE(agent, 45.0, 25.0); - } - } - frame(lua_state, 60.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 67.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } -} - -unsafe extern "C" fn palutena_special_n_p_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 15.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_smash_lw_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 3, 13.5, 0, 0, -90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 19.0); - if is_excute(agent) { - if !agent.is_situation(*SITUATION_KIND_AIR){ - EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, false); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, 8, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, -8, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_p_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 16.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_03")); - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_l")); - PLAY_SE(agent, Hash40::new("se_palutena_smash_l01")); - PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); - } -} - -unsafe extern "C" fn palutena_special_n_p_expression(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); - } - frame(lua_state, 2.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); - } - frame(lua_state, 14.0); - app::sv_animcmd::execute(lua_state, 14.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - } - frame(lua_state, 15.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); - } - frame(lua_state, 18.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - if agent.is_situation(*SITUATION_KIND_GROUND) { - QUAKE(agent, *CAMERA_QUAKE_KIND_L); - } - else { - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - } - AREA_WIND_2ND_arg10(agent, 0, 0.75, 110, 300, 0.8, 0, 15, 24, 30, 40); - } - frame(lua_state, 21.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AREA_WIND_2ND_arg10(agent, 0, 0.75, 70, 300, 0.8, 0, 12, 24, 24, 40); - } - frame(lua_state, 47.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 55.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn palutena_special_n_o_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - PostureModule::set_lr(boma, PostureModule::lr(agent.module_accessor)); - PostureModule::update_rot_y_lr(boma); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_REFLECTIONBOARD, false, 0); - } - -} - -unsafe extern "C" fn palutena_special_n_o_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - EFFECT(agent, Hash40::new("palutena_throw_twinkle"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_mirror_break"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.225, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -1, 21, 1, 0, 90, 0, 1, true, 0.7); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - } - frame(lua_state, 35.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_o_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l02")); - } -} - -unsafe extern "C" fn palutena_special_n_o_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn palutena_special_n_g_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - FT_DESIRED_RATE(agent, 20.0, 10.0); - frame(lua_state, 20.0); - FT_DESIRED_RATE(agent, 25.0, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 40, 70, 0, 6.0, 0.0, 19.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 25.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - let angle_mod = ((sv_math::rand(hash40("fighter"), 51) as i32) - 25) as u64; - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90 + angle_mod, 116, 0, 75, 8.0, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn palutena_special_n_g_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 1.0, 0.05); - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.05); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_COLOR(agent, 0.25, 0.70, 0.25); - LAST_EFFECT_SET_ALPHA(agent, 0.3); - } - wait(lua_state, 26.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); - EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); - } - wait(lua_state, 3.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); - } -} - -unsafe extern "C" fn palutena_special_n_g_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - PLAY_SE(agent, Hash40::new("se_common_slip_01")); - } - frame(lua_state, 20.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - PLAY_SE(agent, Hash40::new("se_palutena_throw")); - PLAY_SE(agent, Hash40::new("se_common_throw_02")); - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_attack")); - PLAY_SE(agent, Hash40::new("se_item_club_wind")); - } - wait(lua_state, 25.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_item_club_wind")); - } -} - -unsafe extern "C" fn palutena_special_n_g_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 18.0); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 20.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashss"), 10); - } - frame(lua_state, 25.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); - } -} - -unsafe extern "C" fn palutena_special_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let current_damage = DamageModule::damage(boma, 0); - frame(lua_state, 4.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, DamageModule::damage(boma, 0) - current_damage); - } - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75) , 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn palutena_special_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let current_damage = DamageModule::damage(boma, 0); - frame(lua_state, 4.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, (DamageModule::damage(boma, 0) - current_damage) * 0.75); - } - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn palutena_special_lw_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_flash"), Hash40::new("shield"), -1, 0, -3, 0, 0, 0, 0.7, true); - EFFECT(agent, Hash40::new("palutena_counter_success"), Hash40::new("top"), 0, 14.8, -1, 0, 90, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("palutena_backlight"), Hash40::new("waist"), 10, -3, -1, 0, 90, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(agent, 2.75); - } - frame(lua_state, 21.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0); - EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_attack"), Hash40::new("stick"), 0, 8.5, 0, 0, 0, 0, 0.9, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - } - frame(lua_state, 23.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("palutena_backlight"), -1); - } - frame(lua_state, 36.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn palutena_special_lw_expression(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); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 18.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 22.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 23.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - } -} - -unsafe extern "C" fn palutena_special_lw_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); - } - frame(lua_state, 19.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); - } - wait(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); - } -} - -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_specialn", palutena_special_n_game) - .acmd("game_specialairn", palutena_special_n_game) - .acmd("effect_specialn", palutena_special_n_effect) - .acmd("effect_specialairn", palutena_special_n_effect) - .acmd("sound_specialn", palutena_special_n_sound) - .acmd("sound_specialairn", palutena_special_n_sound) - .acmd("expression_specialn", palutena_special_n_expression) - .acmd("expression_specialairn", palutena_special_n_expression) - .acmd("game_specialnr", palutena_special_n_r_game) - .acmd("game_specialairnr", palutena_special_n_r_game) - .acmd("effect_specialnr", palutena_special_n_r_effect) - .acmd("effect_specialairnr", palutena_special_n_r_effect) - .acmd("sound_specialnr", palutena_special_n_r_sound) - .acmd("sound_specialairnr", palutena_special_n_r_sound) - .acmd("expression_specialnr", palutena_special_n_r_expression) - .acmd("expression_specialairnr", palutena_special_n_r_expression) - .acmd("game_specialnb", palutena_special_n_b_game) - .acmd("game_specialairnb", palutena_special_n_b_game) - .acmd("effect_specialnb", palutena_special_n_b_effect) - .acmd("effect_specialairnb", palutena_special_n_b_effect) - .acmd("sound_specialnb", palutena_special_n_b_sound) - .acmd("sound_specialairnb", palutena_special_n_b_sound) - .acmd("expression_specialnb", palutena_special_n_b_expression) - .acmd("expression_specialairnb", palutena_special_n_b_expression) - .acmd("game_specialny", palutena_special_n_y_game) - .acmd("game_specialairny", palutena_special_n_y_game) - .acmd("effect_specialny", palutena_special_n_y_effect) - .acmd("effect_specialairny", palutena_special_n_y_effect) - .acmd("sound_specialny", palutena_special_n_y_sound) - .acmd("sound_specialairny", palutena_special_n_y_sound) - .acmd("expression_specialny", palutena_special_n_y_expression) - .acmd("expression_specialairny", palutena_special_n_y_expression) - .acmd("game_specialnp", palutena_special_n_p_game) - .acmd("game_specialairnp", palutena_special_n_p_game) - .acmd("effect_specialnp", palutena_special_n_p_effect) - .acmd("effect_specialairnp", palutena_special_n_p_effect) - .acmd("sound_specialnp", palutena_special_n_p_sound) - .acmd("sound_specialairnp", palutena_special_n_p_sound) - .acmd("expression_specialnp", palutena_special_n_p_expression) - .acmd("expression_specialairnp", palutena_special_n_p_expression) - .acmd("game_specialno", palutena_special_n_o_game) - .acmd("game_specialairno", palutena_special_n_o_game) - .acmd("effect_specialno", palutena_special_n_o_effect) - .acmd("effect_specialairno", palutena_special_n_o_effect) - .acmd("sound_specialno", palutena_special_n_o_sound) - .acmd("sound_specialairno", palutena_special_n_o_sound) - .acmd("expression_specialno", palutena_special_n_o_expression) - .acmd("expression_specialairno", palutena_special_n_o_expression) - .acmd("game_specialng", palutena_special_n_g_game) - .acmd("game_specialairng", palutena_special_n_g_game) - .acmd("effect_specialng", palutena_special_n_g_effect) - .acmd("effect_specialairng", palutena_special_n_g_effect) - .acmd("sound_specialng", palutena_special_n_g_sound) - .acmd("sound_specialairng", palutena_special_n_g_sound) - .acmd("expression_specialng", palutena_special_n_g_expression) - .acmd("expression_specialairng", palutena_special_n_g_expression) - .acmd("game_speciallw", palutena_special_lw_game) - .acmd("game_specialairlw", palutena_special_air_lw_game) - .acmd("effect_speciallw", palutena_special_lw_effect) - .acmd("effect_specialairlw", palutena_special_lw_effect) - .acmd("expression_speciallw", palutena_special_lw_expression) - .acmd("expression_specialairlw", palutena_special_lw_expression) - .acmd("sound_speciallw", palutena_special_lw_sound) - .acmd("sound_specialairlw", palutena_special_lw_sound) - .install(); -} diff --git a/fighters/palutena/src/acmd/specials/mod.rs b/fighters/palutena/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..82c7b69584 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/mod.rs @@ -0,0 +1,205 @@ +use super::*; + +mod special_n_r; +mod special_n_o; +mod special_n_y; +mod special_n_g; +mod special_n_b; +mod special_n_p; + +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 40, 0, 70, 8.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 22.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_specialn(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); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let current_damage = DamageModule::damage(boma, 0); + frame(lua_state, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, DamageModule::damage(boma, 0) - current_damage); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_flash"), Hash40::new("shield"), -1, 0, -3, 0, 0, 0, 0.7, true); + EFFECT(agent, Hash40::new("palutena_counter_success"), Hash40::new("top"), 0, 14.8, -1, 0, 90, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("palutena_backlight"), Hash40::new("waist"), 10, -3, -1, 0, 90, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + LAST_EFFECT_SET_RATE(agent, 2.75); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0); + EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_attack"), Hash40::new("stick"), 0, 8.5, 0, 0, 0, 0, 0.9, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + } + frame(lua_state, 23.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("palutena_backlight"), -1); + } + frame(lua_state, 36.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); + } + frame(lua_state, 19.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); + } +} + +unsafe extern "C" fn expression_speciallw(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); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 18.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 23.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + special_n_r::install(agent); + special_n_o::install(agent); + special_n_y::install(agent); + special_n_g::install(agent); + special_n_b::install(agent); + special_n_p::install(agent); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_b.rs b/fighters/palutena/src/acmd/specials/special_n_b.rs new file mode 100644 index 0000000000..4eec17a7d9 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_b.rs @@ -0,0 +1,155 @@ +use super::*; + +unsafe extern "C" fn game_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let power = if powered {5.0} else {0.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 4.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + } + FT_DESIRED_RATE(agent, 14.0, 8.0); + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0 + power, 88, 91, 0, 53, 4.5, 0.0, 15.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 + power, 88, 91, 0, 58, 2.8, 0.0, 30.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + if powered { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 91, 0, 62, 2.8, 0.0, 45.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + } + } + frame(lua_state, 28.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + AttackModule::clear_all(boma); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { + FT_DESIRED_RATE(agent, 17.0, 7.0); + } + } + frame(lua_state, 43.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let length = if powered { 2.7 } else { 1.8 }; + let length2 = if powered { 0.69 } else { 0.5 }; + let y_pos = if powered {25} else {16}; + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.05, 0.90); + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("palutena_pressure"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, length2, true); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + LAST_EFFECT_SET_RATE(agent, (16.0/10.0)); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 4, 21.5, 2, 0, -60, 0, 1, true, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.1); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice"), Hash40::new("top"), 0, y_pos, 10, 0, 250, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); + EffectModule::set_scale_last(boma, &Vector3f::new(0.5, length, 0.5)); + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_ice"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_pressure"), false, false); + } + if is_excute(agent) { + let size = if powered { 0.6 } else { 0.5 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 24, 10, 0, 0, 0, size, true); + if powered { + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 40, 10, 0, 0, 0, 0.3, true); + } + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_frieze_l")} else {Hash40::new("se_common_frieze_m")}; + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_palutena_attack07")); + if power { + PLAY_SE(agent, Hash40::new("se_palutena_smash_h01")); + } + PLAY_SE(agent, sound_lvl); + } +} + +unsafe extern "C" fn expression_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 13.0); + app::sv_animcmd::execute(lua_state, 13.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 16.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_arg10(agent, 0, 2, 90, 300, 1, 9, 35, 18, 70, 80); + } + frame(lua_state, 18.0); + if is_excute(agent) { + if powered { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } else { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + + } + frame(lua_state, 48.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnb", game_specialnb); + agent.acmd("game_specialairnb", game_specialnb); + agent.acmd("effect_specialnb", effect_specialnb); + agent.acmd("effect_specialairnb", effect_specialnb); + agent.acmd("sound_specialnb", sound_specialnb); + agent.acmd("sound_specialairnb", sound_specialnb); + agent.acmd("expression_specialnb", expression_specialnb); + agent.acmd("expression_specialairnb", expression_specialnb); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_g.rs b/fighters/palutena/src/acmd/specials/special_n_g.rs new file mode 100644 index 0000000000..6ae5e78cf9 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_g.rs @@ -0,0 +1,116 @@ +use super::*; + +unsafe extern "C" fn game_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + FT_DESIRED_RATE(agent, 20.0, 10.0); + frame(lua_state, 20.0); + FT_DESIRED_RATE(agent, 25.0, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 40, 70, 0, 6.0, 0.0, 19.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 25.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let angle_mod = ((sv_math::rand(hash40("fighter"), 51) as i32) - 25) as u64; + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90 + angle_mod, 116, 0, 75, 8.0, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 1.0, 0.05); + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.05); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 0.25, 0.70, 0.25); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + } + wait(lua_state, 26.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); + } + wait(lua_state, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); + } +} + +unsafe extern "C" fn sound_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_slip_01")); + } + frame(lua_state, 20.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + PLAY_SE(agent, Hash40::new("se_palutena_throw")); + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_item_club_wind")); + } + wait(lua_state, 25.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_item_club_wind")); + } +} + +unsafe extern "C" fn expression_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 20.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashss"), 10); + } + frame(lua_state, 25.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialng", game_specialng); + agent.acmd("game_specialairng", game_specialng); + agent.acmd("effect_specialng", effect_specialng); + agent.acmd("effect_specialairng", effect_specialng); + agent.acmd("sound_specialng", sound_specialng); + agent.acmd("sound_specialairng", sound_specialng); + agent.acmd("expression_specialng", expression_specialng); + agent.acmd("expression_specialairng", expression_specialng); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_o.rs b/fighters/palutena/src/acmd/specials/special_n_o.rs new file mode 100644 index 0000000000..801a29f3f1 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_o.rs @@ -0,0 +1,74 @@ +use super::*; + +unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + PostureModule::set_lr(boma, PostureModule::lr(boma)); + PostureModule::update_rot_y_lr(boma); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_REFLECTIONBOARD, false, 0); + } +} + +unsafe extern "C" fn effect_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + EFFECT(agent, Hash40::new("palutena_throw_twinkle"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_mirror_break"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.225, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -1, 21, 1, 0, 90, 0, 1, true, 0.7); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + } + frame(lua_state, 35.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l02")); + } +} + +unsafe extern "C" fn expression_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialno", game_specialno); + agent.acmd("game_specialairno", game_specialno); + agent.acmd("effect_specialno", effect_specialno); + agent.acmd("effect_specialairno", effect_specialno); + agent.acmd("sound_specialno", sound_specialno); + agent.acmd("sound_specialairno", sound_specialno); + agent.acmd("expression_specialno", expression_specialno); + agent.acmd("expression_specialairno", expression_specialno); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_p.rs b/fighters/palutena/src/acmd/specials/special_n_p.rs new file mode 100644 index 0000000000..18419b623a --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_p.rs @@ -0,0 +1,155 @@ +use super::*; + +unsafe extern "C" fn game_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, false, -1); + ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4_charge"), false, -1.0); + } + frame(lua_state, 1.0); + FT_DESIRED_RATE(agent, 14.0, 16.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4"), false, -1.0); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 258, 90, 105, 0, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 258, 60, 0, 30, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { + FT_DESIRED_RATE(agent, 45.0, 25.0); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 67.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +unsafe extern "C" fn effect_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_smash_lw_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 3, 13.5, 0, 0, -90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 19.0); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_AIR){ + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, false); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, 8, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, -8, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_l")); + PLAY_SE(agent, Hash40::new("se_palutena_smash_l01")); + PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); + } +} + +unsafe extern "C" fn expression_specialnp(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); + } + frame(lua_state, 2.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + } + frame(lua_state, 14.0); + app::sv_animcmd::execute(lua_state, 14.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + } + frame(lua_state, 15.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + if agent.is_situation(*SITUATION_KIND_GROUND) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + } + else { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + AREA_WIND_2ND_arg10(agent, 0, 0.75, 110, 300, 0.8, 0, 15, 24, 30, 40); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 0.75, 70, 300, 0.8, 0, 12, 24, 24, 40); + } + frame(lua_state, 47.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 55.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnp", game_specialnp); + agent.acmd("game_specialairnp", game_specialnp); + agent.acmd("effect_specialnp", effect_specialnp); + agent.acmd("effect_specialairnp", effect_specialnp); + agent.acmd("sound_specialnp", sound_specialnp); + agent.acmd("sound_specialairnp", sound_specialnp); + agent.acmd("expression_specialnp", expression_specialnp); + agent.acmd("expression_specialairnp", expression_specialnp); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_r.rs b/fighters/palutena/src/acmd/specials/special_n_r.rs new file mode 100644 index 0000000000..f55e693a9b --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_r.rs @@ -0,0 +1,126 @@ +use super::*; + +unsafe extern "C" fn game_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {4.0} else {0.0}; + let sound_lvl = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; + let size = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2.0} else {0.0}; + let kbg = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {10} else {0}; + FT_DESIRED_RATE(agent, 18.0, 12.0); + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + power, 361, 95 - kbg, 0, 40, 5.6 + (size / 2.0), 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (power / 2.0), 361, 97 - kbg, 0, 40, 8.6 + size, 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 1, 21, 2.5, 0, -50, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + } + frame(lua_state, 18.0); + if power { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_d"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + } + else { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_bomb_l")} else {Hash40::new("se_common_bomb_s")}; + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_s")); + if power { + PLAY_SE(agent, Hash40::new("se_palutena_smash_s01")); + } + PLAY_SE(agent, sound_lvl); + } +} + +unsafe extern "C" fn expression_specialnr(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_INTP, *SLOPE_STATUS_NONE, 4); + AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 40); + } + frame(lua_state, 11.0); + app::sv_animcmd::execute(lua_state, 11.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + AREA_WIND_2ND_arg10(agent, 0, 2, 30, 300, 0.8, 25, 12, 50, 24, 80); + } + frame(lua_state, 18.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 65.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairnr", game_specialnr); + agent.acmd("effect_specialnr", effect_specialnr); + agent.acmd("effect_specialairnr", effect_specialnr); + agent.acmd("sound_specialnr", sound_specialnr); + agent.acmd("sound_specialairnr", sound_specialnr); + agent.acmd("expression_specialnr", expression_specialnr); + agent.acmd("expression_specialairnr", expression_specialnr); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_y.rs b/fighters/palutena/src/acmd/specials/special_n_y.rs new file mode 100644 index 0000000000..7d1e559757 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_y.rs @@ -0,0 +1,104 @@ +use super::*; + +unsafe extern "C" fn game_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let hitlag = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.5} else {0.75}; + let paralyze = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.6} else {0.3}; + let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2} else {4}; + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + WorkModule::set_float(boma, PostureModule::pos_x(boma) - 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); + } + else { + WorkModule::set_float(boma, PostureModule::pos_x(boma) + 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); + } + WorkModule::set_float(boma, PostureModule::pos_y(boma) + 5.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_Y); + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_AUTOAIMBULLET, false, -1); + } +} + +unsafe extern "C" fn effect_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + } + frame(lua_state, 35.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_electric_hit_l")} else {Hash40::new("se_common_electric_hit_m")}; + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); + } + wait(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, sound_lvl); + } + wait(lua_state, 29.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_specialny(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); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); + } + wait(lua_state, 12.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialny", game_specialny); + agent.acmd("game_specialairny", game_specialny); + agent.acmd("effect_specialny", effect_specialny); + agent.acmd("effect_specialairny", effect_specialny); + agent.acmd("sound_specialny", sound_specialny); + agent.acmd("sound_specialairny", sound_specialny); + agent.acmd("expression_specialny", expression_specialny); + agent.acmd("expression_specialairny", expression_specialny); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/throws.rs b/fighters/palutena/src/acmd/throws.rs index 5605ea8655..d34f0dfa44 100644 --- a/fighters/palutena/src/acmd/throws.rs +++ b/fighters/palutena/src/acmd/throws.rs @@ -1,163 +1,164 @@ use super::*; -unsafe extern "C" fn palutena_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 palutena_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 palutena_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 palutena_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 52, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 52, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 10, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 10, 9); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 19); + CHECK_FINISH_CAMERA(agent, 14, 19); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn palutena_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 98, 95, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 98, 95, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 20); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 24.0, 18.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 73, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 24.0, 18.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 73, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 4, 1); - CHECK_FINISH_CAMERA(fighter, 7, 0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 4, 1); + CHECK_FINISH_CAMERA(agent, 7, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_catch", palutena_catch_game) - .acmd("game_catchdash", palutena_catch_dash_game) - .acmd("game_catchturn", palutena_catch_turn_game) - .acmd("game_throwf", palutena_throw_f_game) - .acmd("game_throwb", palutena_throw_b_game) - .acmd("game_throwhi", palutena_throw_hi_game) - .acmd("game_throwlw", palutena_throw_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/tilts.rs b/fighters/palutena/src/acmd/tilts.rs index 67213ec541..bb3992bf77 100644 --- a/fighters/palutena/src/acmd/tilts.rs +++ b/fighters/palutena/src/acmd/tilts.rs @@ -1,51 +1,49 @@ - use super::*; -unsafe extern "C" fn palutena_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 11.0/(16.0-0.0)); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 11.0/(16.0-0.0)); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 90, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 45, 100, 45, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 90, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 45, 100, 45, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 285, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 100, 100, 40, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 285, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 100, 100, 40, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 20, 100, 35, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 85, 100, 30, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 20, 100, 35, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 85, 100, 30, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 5.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 4.3, 0.0, -5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 5.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 4.3, 0.0, -5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn palutena_attack_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -145,46 +143,45 @@ unsafe extern "C" fn palutena_attack_s3_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.778); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.778); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.571); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 367, 100, 20, 0, 3.0, 0.0, 18.0, 4.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 130, 100, 50, 0, 2.0, 0.0, 15.0, 10.5, Some(0.0), Some(15.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 190, 100, 30, 0, 2.0, 0.0, 20.0, 10.5, Some(0.0), Some(20.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 90, 100, 35, 0, 5.0, 0.0, 8.0, 3.5, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.571); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 367, 100, 20, 0, 3.0, 0.0, 18.0, 4.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 130, 100, 50, 0, 2.0, 0.0, 15.0, 10.5, Some(0.0), Some(15.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 190, 100, 30, 0, 2.0, 0.0, 20.0, 10.5, Some(0.0), Some(20.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 90, 100, 35, 0, 5.0, 0.0, 8.0, 3.5, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 23.0, 10.5, Some(0.0), Some(23.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 17.0, 10.5, Some(0.0), Some(17.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 23.0, 10.5, Some(0.0), Some(23.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 17.0, 10.5, Some(0.0), Some(17.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn palutena_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -283,72 +280,50 @@ unsafe extern "C" fn palutena_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.693); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.693); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.870); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.870); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); // Air only hitboxes - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 83, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 83, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); // Air only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("top"), 8.5, 76, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("top"), 8.5, 76, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(35.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(35.0-25.0)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn palutena_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); - } -} - -unsafe extern "C" fn palutena_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -447,14 +422,35 @@ unsafe extern "C" fn palutena_attack_lw3_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attacks3", palutena_attack_s3_s_game) - .acmd("effect_attacks3", palutena_attack_s3_s_effect) - .acmd("game_attackhi3", palutena_attack_hi3_game) - .acmd("effect_attackhi3", palutena_attack_hi3_effect) - .acmd("game_attacklw3", palutena_attack_lw3_game) - .acmd("expression_attacklw3", palutena_attack_lw3_expression) - .acmd("effect_attacklw3", palutena_attack_lw3_effect) - .install(); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); + } } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); +} \ No newline at end of file diff --git a/fighters/palutena/src/autoaimbullet/acmd.rs b/fighters/palutena/src/autoaimbullet/acmd.rs new file mode 100644 index 0000000000..bc0554cc1a --- /dev/null +++ b/fighters/palutena/src/autoaimbullet/acmd.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; + let damage = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {10.0} else {6.0}; + let paralyze = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {0.6} else {0.4}; + if !palutena { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 41, 0, 40, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.7, 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_palutena_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } + else { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 65, 40, 0, 75, 2.3, 0.0, 0.0, 0.0, None, None, None, paralyze, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } +} + +unsafe extern "C" fn effect_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; + let power = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {Hash40::new("sys_hit_elec")} else {Hash40::new("sys_hit_elec_s")}; + let size = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {2.0} else {1.0}; + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_bullet_shot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if palutena { + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + } + } + if palutena { + for _ in 0..99 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.2, 1.2, 0, 0, 0, 0.23 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 0.2, -1.4, 0, 0, 0, 0.17 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.7, 0.1, 0, 0, 0, 0.32 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + LAST_EFFECT_SET_RATE(agent, 1); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.4, 1.0, 0, 0, 0, 0.2 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.3, -1.4, 0, 0, 0, 0.15 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shot", game_shot); + agent.acmd("effect_shot", effect_shot); +} \ No newline at end of file diff --git a/fighters/palutena/src/autoaimbullet/mod.rs b/fighters/palutena/src/autoaimbullet/mod.rs new file mode 100644 index 0000000000..adc6deb010 --- /dev/null +++ b/fighters/palutena/src/autoaimbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("palutena_autoaimbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/explosiveflame/acmd.rs b/fighters/palutena/src/explosiveflame/acmd.rs new file mode 100644 index 0000000000..754835eabc --- /dev/null +++ b/fighters/palutena/src/explosiveflame/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, 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_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 6.0); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 7.2); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 8.4); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 9.6); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 10.8); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 12.0); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + //AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 29); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/palutena/src/explosiveflame/mod.rs b/fighters/palutena/src/explosiveflame/mod.rs new file mode 100644 index 0000000000..7c34dc2a21 --- /dev/null +++ b/fighters/palutena/src/explosiveflame/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("palutena_explosiveflame"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/lib.rs b/fighters/palutena/src/lib.rs index 5537dac979..9c1e62fc55 100644 --- a/fighters/palutena/src/lib.rs +++ b/fighters/palutena/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod autoaimbullet; +mod explosiveflame; +mod reflectionboard; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("palutena"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + autoaimbullet::install(); + explosiveflame::install(); + reflectionboard::install(); } \ No newline at end of file diff --git a/fighters/palutena/src/opff.rs b/fighters/palutena/src/opff.rs index 8a07c188c4..8ef0556fb8 100644 --- a/fighters/palutena/src/opff.rs +++ b/fighters/palutena/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -341,25 +340,7 @@ pub unsafe fn palutena_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn reflection_board_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.is_status(*WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_SHOOT) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let palutena = utils::util::get_battle_object_from_id(owner_id); - let palutena_boma = &mut *(*palutena).module_accessor; - if AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_ATTACK){ - StatusModule::change_status_request_from_script(weapon.module_accessor, *WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_BREAK, false); - } - } - } -} - -pub fn install() { - smashline::Agent::new("palutena") - .on_line(Main, palutena_frame_wrapper) - .on_line(Main, palu_power_board) - .install(); - smashline::Agent::new("palutena_reflectionboard") - .on_line(Main, reflection_board_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, palutena_frame_wrapper); + agent.on_line(Main, palu_power_board); } \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/acmd.rs b/fighters/palutena/src/reflectionboard/acmd.rs new file mode 100644 index 0000000000..fb48bb1e42 --- /dev/null +++ b/fighters/palutena/src/reflectionboard/acmd.rs @@ -0,0 +1,19 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); + } + frame(lua_state, 210.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/mod.rs b/fighters/palutena/src/reflectionboard/mod.rs new file mode 100644 index 0000000000..8cf73eee3e --- /dev/null +++ b/fighters/palutena/src/reflectionboard/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("palutena_reflectionboard"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/opff.rs b/fighters/palutena/src/reflectionboard/opff.rs new file mode 100644 index 0000000000..e32424b626 --- /dev/null +++ b/fighters/palutena/src/reflectionboard/opff.rs @@ -0,0 +1,21 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn reflection_board_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status(*WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_SHOOT) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let palutena = utils::util::get_battle_object_from_id(owner_id); + let palutena_boma = &mut *(*palutena).module_accessor; + if AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_ATTACK){ + StatusModule::change_status_request_from_script(weapon.module_accessor, *WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_BREAK, false); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, reflection_board_callback); +} \ No newline at end of file diff --git a/fighters/palutena/src/status.rs b/fighters/palutena/src/status.rs deleted file mode 100644 index 6fcdf034d7..0000000000 --- a/fighters/palutena/src/status.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special_n; - -pub fn install() { - special_n::install(); -} diff --git a/fighters/palutena/src/status/mod.rs b/fighters/palutena/src/status/mod.rs new file mode 100644 index 0000000000..7e6f95f68a --- /dev/null +++ b/fighters/palutena/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; + +pub fn install(agent: &mut Agent) { + special_n::install(agent); +} \ No newline at end of file diff --git a/fighters/palutena/src/status/special_n.rs b/fighters/palutena/src/status/special_n.rs index e7cc369cb9..c4061656ca 100644 --- a/fighters/palutena/src/status/special_n.rs +++ b/fighters/palutena/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // red: burn attack unsafe extern "C" fn special_n_r_pre(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -515,35 +514,28 @@ unsafe extern "C" fn special_n_g_end(fighter: &mut L2CFighterCommon) -> L2CValue return 0.into() } -pub fn install() { - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_R, special_n_r_pre) - .status(Main, statuses::palutena::SPECIAL_N_R, special_n_r_main) - .status(End, statuses::palutena::SPECIAL_N_R, special_n_r_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_B, special_n_b_pre) - .status(Main, statuses::palutena::SPECIAL_N_B, special_n_b_main) - .status(End, statuses::palutena::SPECIAL_N_B, special_n_b_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_Y, special_n_y_pre) - .status(Main, statuses::palutena::SPECIAL_N_Y, special_n_y_main) - .status(End, statuses::palutena::SPECIAL_N_Y, special_n_y_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_P, special_n_p_pre) - .status(Main, statuses::palutena::SPECIAL_N_P, special_n_p_main) - .status(End, statuses::palutena::SPECIAL_N_P, special_n_p_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_O, special_n_o_pre) - .status(Main, statuses::palutena::SPECIAL_N_O, special_n_o_main) - .status(End, statuses::palutena::SPECIAL_N_O, special_n_o_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_G, special_n_g_pre) - .status(Main, statuses::palutena::SPECIAL_N_G, special_n_g_main) - .status(End, statuses::palutena::SPECIAL_N_G, special_n_g_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::palutena::SPECIAL_N_R, special_n_r_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_R, special_n_r_main); + agent.status(End, statuses::palutena::SPECIAL_N_R, special_n_r_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_B, special_n_b_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_B, special_n_b_main); + agent.status(End, statuses::palutena::SPECIAL_N_B, special_n_b_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_Y, special_n_y_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_Y, special_n_y_main); + agent.status(End, statuses::palutena::SPECIAL_N_Y, special_n_y_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_P, special_n_p_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_P, special_n_p_main); + agent.status(End, statuses::palutena::SPECIAL_N_P, special_n_p_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_O, special_n_o_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_O, special_n_o_main); + agent.status(End, statuses::palutena::SPECIAL_N_O, special_n_o_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_G, special_n_g_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_G, special_n_g_main); + agent.status(End, statuses::palutena::SPECIAL_N_G, special_n_g_end); } \ No newline at end of file diff --git a/fighters/peach/src/acmd/aerials.rs b/fighters/peach/src/acmd/aerials.rs index b719a4a2ee..20e15ebc42 100644 --- a/fighters/peach/src/acmd/aerials.rs +++ b/fighters/peach/src/acmd/aerials.rs @@ -1,109 +1,107 @@ use super::*; -unsafe extern "C" fn peach_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn peach_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 80, 0, 50, 4.4, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 85, 0, 50, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 80, 0, 50, 4.4, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 85, 0, 50, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn peach_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 95, 0, 30, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 95, 0, 30, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 10, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 10, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn peach_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.333); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 4.5, 367, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("bust"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("hip"), 4.5, 367, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); @@ -112,103 +110,104 @@ unsafe extern "C" fn peach_attack_air_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(24.0), Some(-3.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(24.0), Some(-3.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.5, 0.0, 23.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(21.0), Some(8.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.5, 0.0, 23.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(21.0), Some(8.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(24.0), Some(-4.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(24.0), Some(-4.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("hip"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(21.0), Some(9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(21.0), Some(9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn peach_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_beams"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn peach_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 22, 5.5, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 70, 30, 0, 22, 4.5, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 22, 5.5, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 70, 30, 0, 22, 4.5, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 6.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 5.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 6.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 5.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attackairn", peach_attack_air_n_game) - .acmd("game_attackairf", peach_attack_air_f_game) - .acmd("game_attackairb", peach_attack_air_b_game) - .acmd("game_attackairhi", peach_attack_air_hi_game) - .acmd("expression_attackairhi", peach_attack_air_hi_expression) - .acmd("game_attackairlw", peach_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/peach/src/acmd/ground.rs b/fighters/peach/src/acmd/ground.rs index ef276ff3e5..f115a73e1d 100644 --- a/fighters/peach/src/acmd/ground.rs +++ b/fighters/peach/src/acmd/ground.rs @@ -1,86 +1,85 @@ use super::*; -unsafe extern "C" fn peach_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PEACH_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn peach_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 25, 22, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 25, 22, 0, 36, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 365, 22, 0, 36, 4.0, 0.0, 7.0, 10.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 25, 22, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 25, 22, 0, 36, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 365, 22, 0, 36, 4.0, 0.0, 7.0, 10.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 65, 90, 0, 60, 4.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 90, 0, 60, 5.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 6.0, 65, 90, 0, 60, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 65, 90, 0, 60, 4.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 90, 0, 60, 5.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 6.0, 65, 90, 0, 60, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn peach_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.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, false); - EFFECT_FOLLOW(fighter, Hash40::new("peach_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("peach_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attack11", peach_attack_11_game) - .acmd("game_attackdash", peach_attack_dash_game) - .acmd("effect_attackdash", peach_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/peach/src/acmd/mod.rs b/fighters/peach/src/acmd/mod.rs index 1d5916e4dc..d8a22387b4 100644 --- a/fighters/peach/src/acmd/mod.rs +++ b/fighters/peach/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; -mod tilts; mod throws; +mod other; -pub fn install() { - aerials::install(); - ground::install(); - other::install(); - smashes::install(); - specials::install(); - tilts::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/peach/src/acmd/other.rs b/fighters/peach/src/acmd/other.rs index 4735ec111e..df8e2be8ae 100644 --- a/fighters/peach/src/acmd/other.rs +++ b/fighters/peach/src/acmd/other.rs @@ -1,183 +1,107 @@ 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_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(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_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_rnd_futtobi01"), Hash40::new("seq_peach_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_peach_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_peach_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn peach_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 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("peach") - .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", peach_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_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); } diff --git a/fighters/peach/src/acmd/smashes.rs b/fighters/peach/src/acmd/smashes.rs index b2a34c6411..b46800c026 100644 --- a/fighters/peach/src/acmd/smashes.rs +++ b/fighters/peach/src/acmd/smashes.rs @@ -1,39 +1,36 @@ use super::*; -unsafe extern "C" fn peach_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 100, 20, 0, 3.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 100, 20, 0, 3.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 201, 0, 40, 4.5, 0.0, 1.8, 8.25, Some(0.0), Some(1.8), Some(-8.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 201, 0, 40, 4.5, 0.0, 1.8, 8.25, Some(0.0), Some(1.8), Some(-8.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attacklw4", peach_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/peach/src/acmd/specials.rs b/fighters/peach/src/acmd/specials.rs index a5a0ffbc15..c7c19b2b4f 100644 --- a/fighters/peach/src/acmd/specials.rs +++ b/fighters/peach/src/acmd/specials.rs @@ -1,153 +1,151 @@ use super::*; -unsafe extern "C" fn peach_special_s_hit_end_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"), 15.0, 55, 80, 0, 60, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); +unsafe extern "C" fn game_specialshitend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 55, 80, 0, 60, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn peach_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); let hit1 = Vector2f { x: 6.0, y: 25.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 12, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 12, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 4.0, 81, 105, 0, 90, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 81, 105, 0, 90, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 4.0, 81, 105, 0, 90, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 81, 105, 0, 90, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn peach_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); let hit1 = Vector2f { x: 6.0, y: 25.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 12, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 12, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 78, 95, 0, 72, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 72, 95, 0, 72, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 3.0, 78, 95, 0, 72, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 72, 95, 0, 72, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn peach_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let item_kind = fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let item_kind = agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); if item_kind == *ITEM_KIND_NONE { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_DAIKON, false, -1); } else if item_kind == *ITEM_KIND_BOMBHEI { @@ -159,51 +157,51 @@ unsafe extern "C" fn peach_special_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); } } } -unsafe extern "C" fn peach_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("peach_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("peach_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("peach_hikkonuki"), -1); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("peach_hikkonuki"), -1); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn peach_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_peach_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_peach_special_l02")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_peach_special_l01")); - if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(fighter.module_accessor, 0) { - PLAY_SE(fighter, Hash40::new("vc_peach_appeal01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_peach_special_l01")); + if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE + && ItemModule::is_have_item(boma, 0) { + PLAY_SE(agent, Hash40::new("vc_peach_appeal01")); } } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_specialshitend", peach_special_s_hit_end_game) - .acmd("game_specialhistart", peach_special_hi_start_game) - .acmd("game_specialairhistart", peach_special_air_hi_start_game) - .acmd("game_speciallw", peach_special_lw_game) - .acmd("effect_speciallw", peach_special_lw_effect) - .acmd("sound_speciallw", peach_special_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialshitend", game_specialshitend); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); } diff --git a/fighters/peach/src/acmd/throws.rs b/fighters/peach/src/acmd/throws.rs index f0c41305b9..eacd46f30a 100644 --- a/fighters/peach/src/acmd/throws.rs +++ b/fighters/peach/src/acmd/throws.rs @@ -1,186 +1,186 @@ use super::*; -unsafe extern "C" fn peach_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.3, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 peach_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 4.0, Some(0.0), Some(8.5), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 4.0, Some(0.0), Some(8.5), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 peach_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 11.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 118, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 11.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 118, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_f"), false, -1.0); ArticleModule::set_rate(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, (16.0 - 1.0)/11.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 50, 0, 55, 4.5, 0.0, 7.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 50, 0, 55, 4.5, 0.0, 7.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 11, 5); + CHECK_FINISH_CAMERA(agent, 11, 5); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 36.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 36.0, 16.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { ArticleModule::set_rate(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, (16.0 - 1.0)/11.0); } } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 127, 84, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 127, 84, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_b"), false, -1.0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 10, 6.2, 0.0, 7.2, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 10, 6.2, 0.0, 7.2, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -10, 5); + CHECK_FINISH_CAMERA(agent, -10, 5); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 50.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 35.0, 50.0, 8.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 45.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { - if is_excute(fighter) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_hi"), false, -1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 24); + CHECK_FINISH_CAMERA(agent, 0, 24); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_catch", peach_catch_game) - .acmd("game_catchdash", peach_catch_dash_game) - .acmd("game_catchturn", peach_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/peach/src/acmd/tilts.rs b/fighters/peach/src/acmd/tilts.rs index 129254c1f6..800f65b329 100644 --- a/fighters/peach/src/acmd/tilts.rs +++ b/fighters/peach/src/acmd/tilts.rs @@ -1,101 +1,100 @@ use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 92, 82, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 97, 82, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 92, 82, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 92, 82, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 97, 82, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 92, 82, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 92, 50, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 92, 50, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 50, 0, 60, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 92, 50, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 92, 50, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 50, 0, 60, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(9.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(9.0-1.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 115, 20, 0, 85, 4.0, 0.0, 6.5, 3.0, Some(0.0), Some(6.5), Some(-2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 110, 20, 0, 60, 4.0, 0.0, 13.5, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 115, 20, 0, 85, 4.0, 0.0, 6.5, 3.0, Some(0.0), Some(6.5), Some(-2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 110, 20, 0, 60, 4.0, 0.0, 13.5, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 90, 90, 0, 60, 8.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 90, 90, 0, 60, 8.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 7.5, 0.0, 23.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 3.5, 0.0, 14.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 7.5, 0.0, 23.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 3.5, 0.0, 14.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("peach_attack_heart"), Hash40::new("top"), 0, 23.5, 0, 0, 90, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("peach_attack_hi3"), Hash40::new("top"), 0, 23.5, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("peach_attack_heart"), Hash40::new("top"), 0, 23.5, 0, 0, 90, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("peach_attack_hi3"), Hash40::new("top"), 0, 23.5, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 272, 87, 0, 75, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 272, 87, 0, 75, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); // Air only - ATTACK(fighter, 3, 0, Hash40::new("legl"), 10.0, 80, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 10.0, 80, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/peach/src/lib.rs b/fighters/peach/src/lib.rs index 7bb0378152..05110672e1 100644 --- a/fighters/peach/src/lib.rs +++ b/fighters/peach/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("peach"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/peach/src/opff.rs b/fighters/peach/src/opff.rs index 45feebfdc2..5b43136b88 100644 --- a/fighters/peach/src/opff.rs +++ b/fighters/peach/src/opff.rs @@ -12,6 +12,7 @@ unsafe fn float_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32) } } } + unsafe fn wall_bounce(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { let lr = PostureModule::lr(boma); @@ -91,8 +92,7 @@ pub unsafe fn peach_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("peach") - .on_line(Main, peach_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, peach_frame_wrapper); } diff --git a/fighters/peach/src/status/attack_air.rs b/fighters/peach/src/status/attack_air.rs index 3ee7502640..5a9006f762 100644 --- a/fighters/peach/src/status/attack_air.rs +++ b/fighters/peach/src/status/attack_air.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR ::utils::import!( common::djc::{ @@ -18,7 +19,7 @@ use globals::*; // TAGS: DJC, Double Jump Cancel, Peach // Reimplemented to be similar to other djc characters because peach doesn't make the same function calls as in vanilla -unsafe extern "C" fn peach_attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START { let _ = common::djc::sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(fighter); @@ -28,19 +29,19 @@ unsafe extern "C" fn peach_attack_air_init(fighter: &mut L2CFighterCommon) -> L2 // TAGS: DJC, Double Jump Cancel, Peach -unsafe extern "C" fn peach_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(fighter) } // TAGS: DJC, Double Jump Cancel, Peach // Reimplements the setup main script for peach's aerials to transition into double jump cancel code (if applicable) -unsafe extern "C" fn peach_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START { fighter.sub_attack_air_common(false.into()); MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); - return fighter.main_shift(peach_attack_air_no_float_main_loop); + return fighter.main_shift(attack_air_no_float_main_loop); } let motion_kind = MotionModule::motion_kind(fighter.module_accessor); @@ -67,10 +68,10 @@ unsafe extern "C" fn peach_attack_air_main(fighter: &mut L2CFighterCommon) -> L2 let _ = fighter.status_AttackAir_Main_common(); WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - fighter.main_shift(peach_attack_air_main_loop) + fighter.main_shift(attack_air_main_loop) } -unsafe extern "C" fn peach_attack_air_no_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_no_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // Moved above is_enable_cancel for readability concerns let can_shoot_item = WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ITEM_SHOOT_AIR); let can_attack_air = WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); @@ -100,17 +101,16 @@ unsafe extern "C" fn peach_attack_air_no_float_main_loop(fighter: &mut L2CFighte // Default reimplementation of the main loop for an aerial // No special functionality -unsafe extern "C" fn peach_attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let motion_kind = MotionModule::motion_kind(fighter.module_accessor); let _ = fighter.status_AttackAir_Main_common(); WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_init) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_exec) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_main) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/peach/src/status/jump_aerial.rs b/fighters/peach/src/status/jump_aerial.rs index f034b57522..8586333d22 100644 --- a/fighters/peach/src/status/jump_aerial.rs +++ b/fighters/peach/src/status/jump_aerial.rs @@ -1,9 +1,11 @@ use super::*; +// FIGHTER_STATUS_KIND_JUMP_AERIAL + // TAGS: DJC, Double Jump Cancel, Peach // Reimplements peach's double jump to use FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION instead of FIGHTER_KINETIC_TYPE_JUMP_AERIAL -unsafe extern "C" fn peach_jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if !fighter.status_pre_JumpAerial_sub().get_bool() { StatusModule::init_settings( fighter.module_accessor, @@ -38,14 +40,14 @@ unsafe extern "C" fn peach_jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2 // TAGS: DJC, Double Jump Cancel, Peach // Reimplemented to use the double jump animation as movement -unsafe extern "C" fn peach_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); fighter.sub_jump_aerial_item_rocketbelt(); fighter.status_JumpAerialSub(false.into(), false.into()); - fighter.main_shift(peach_jump_aerial_main_loop) + fighter.main_shift(jump_aerial_main_loop) } -unsafe extern "C" fn peach_jump_aerial_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); @@ -55,13 +57,8 @@ unsafe extern "C" fn peach_jump_aerial_main_loop(fighter: &mut L2CFighterCommon) } fighter.status_JumpAerial_Main() } -pub fn install() { - smashline::Agent::new("peach") - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, peach_jump_aerial_pre) - .status( - Main, - *FIGHTER_STATUS_KIND_JUMP_AERIAL, - peach_jump_aerial_main, - ) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } diff --git a/fighters/peach/src/status/mod.rs b/fighters/peach/src/status/mod.rs index b8ad578397..f17c47fe6a 100644 --- a/fighters/peach/src/status/mod.rs +++ b/fighters/peach/src/status/mod.rs @@ -1,5 +1,6 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod attack_air; mod jump_aerial; @@ -60,23 +61,22 @@ unsafe extern "C" fn float_check_air_jump_aerial(fighter: &mut L2CFighterCommon) 0.into() } -extern "C" fn peach_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); } -pub fn install() { - smashline::Agent::new("peach").on_start(peach_init).install(); - attack_air::install(); - jump_aerial::install(); - special_hi::install(); - special_s::install(); - special_lw::install(); - uniq_float_start::install(); - uniq_float::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + jump_aerial::install(agent); + special_hi::install(agent); + special_s::install(agent); + special_lw::install(agent); + uniq_float_start::install(agent); + uniq_float::install(agent); } diff --git a/fighters/peach/src/status/special_hi.rs b/fighters/peach/src/status/special_hi.rs index 1f1c7fec4d..d57d82045a 100644 --- a/fighters/peach/src/status/special_hi.rs +++ b/fighters/peach/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END unsafe extern "C" fn special_hi_air_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !StopModule::is_stop(fighter.module_accessor) { @@ -17,12 +18,6 @@ unsafe extern "C" fn special_hi_substatus(fighter: &mut L2CFighterCommon, param_ 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status( - Main, - *FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, - special_hi_air_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_air_end_main); } diff --git a/fighters/peach/src/status/special_lw.rs b/fighters/peach/src/status/special_lw.rs index 830cd73466..1393cd0985 100644 --- a/fighters/peach/src/status/special_lw.rs +++ b/fighters/peach/src/status/special_lw.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn peach_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -29,15 +30,15 @@ unsafe extern "C" fn peach_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -unsafe extern "C" fn peach_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_ENABLE_ITEM_NO_COUNT); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, *FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, *FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 as i32 - 1 ); - fighter.sub_shift_status_main(L2CValue::Ptr(peach_special_lw_main_loop as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)); 0.into() } -unsafe extern "C" fn peach_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -60,7 +61,7 @@ unsafe extern "C" fn peach_special_lw_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn peach_special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ItemModule::is_have_item(fighter.module_accessor, 0) { if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) == *ITEM_KIND_NONE { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2508b59a2b), FIGHTER_ITEM_HOLD_KIND_HAVE); @@ -71,10 +72,9 @@ unsafe extern "C" fn peach_special_lw_end(fighter: &mut L2CFighterCommon) -> L2C } 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_end) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/peach/src/status/special_s.rs b/fighters/peach/src/status/special_s.rs index b085ba7865..ebcd0edd28 100644 --- a/fighters/peach/src/status/special_s.rs +++ b/fighters/peach/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP @@ -8,12 +7,6 @@ unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CV smashline::original_status(Main, fighter, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP)(fighter) } -pub fn install() { - smashline::Agent::new("peach") - .status( - Main, - *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } diff --git a/fighters/peach/src/status/uniq_float.rs b/fighters/peach/src/status/uniq_float.rs index 32fa8ca79a..22f6edaa05 100644 --- a/fighters/peach/src/status/uniq_float.rs +++ b/fighters/peach/src/status/uniq_float.rs @@ -33,12 +33,12 @@ unsafe fn peach_float_main_common(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(peach_float_main_loop_common as *const () as _)) } -unsafe extern "C" fn uniq_float(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT + +unsafe extern "C" fn uniq_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_main_common(fighter) } -pub fn install() { - Agent::new("peach") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float_main); } \ No newline at end of file diff --git a/fighters/peach/src/status/uniq_float_start.rs b/fighters/peach/src/status/uniq_float_start.rs index f001fb4ebf..1b816060a8 100644 --- a/fighters/peach/src/status/uniq_float_start.rs +++ b/fighters/peach/src/status/uniq_float_start.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; #[no_mangle] unsafe fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -227,12 +226,12 @@ pub unsafe fn peach_float_main_loop_common(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn uniq_float_start(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START + +unsafe extern "C" fn uniq_float_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_start_main_common(fighter) } -pub fn install() { - Agent::new("peach") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start_main); } \ No newline at end of file diff --git a/fighters/pfushigisou/src/acmd/aerials.rs b/fighters/pfushigisou/src/acmd/aerials.rs index d724e9bafd..146d2f38bf 100644 --- a/fighters/pfushigisou/src/acmd/aerials.rs +++ b/fighters/pfushigisou/src/acmd/aerials.rs @@ -1,46 +1,44 @@ - use super::*; -unsafe extern "C" fn pfushigisou_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 35, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("leafb2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("leaff2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("leafr2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("leafl2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 35, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("leafb2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("leaff2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("leafr2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("leafl2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("leafb2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("leaff2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("leafr2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("leafl2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("leafb2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("leaff2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("leafr2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("leafl2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pfushigisou_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); /* frame(lua_state, 2.0); if is_excute(fighter) { @@ -51,156 +49,152 @@ unsafe extern "C" fn pfushigisou_landing_air_n_game(fighter: &mut L2CAgentBase) AttackModule::clear_all(boma); } */ - } -unsafe extern "C" fn pfushigisou_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 361, 55, 0, 50, 3.6, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 11.0, 70, 55, 0, 60, 4.0, 1.0, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 12.0, 70, 55, 0, 60, 3.0, 2.8, -0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 13.0, 80, 55, 0, 60, 3.5, 4.0, -0.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 361, 55, 0, 50, 3.6, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 11.0, 70, 55, 0, 60, 4.0, 1.0, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 12.0, 70, 55, 0, 60, 3.0, 2.8, -0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 13.0, 80, 55, 0, 60, 3.5, 4.0, -0.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pfushigisou_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("weapon") as i64, hash40("weapon_normal") as i64); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } -unsafe extern "C" fn pfushigisou_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 4.0, 76, 27, 0, 30, 4.5, 0.3, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 4.0, 76, 27, 0, 30, 4.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 4.0, 76, 27, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 4.0, 76, 27, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 4.0, 76, 27, 0, 30, 4.5, 0.3, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 4.0, 76, 27, 0, 30, 4.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 4.0, 76, 27, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 4.0, 76, 27, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("vinel2"), 6.0, 55, 133, 0, 25, 5.0, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 6.0, 55, 133, 0, 25, 4.5, 0.8, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("vinel4"), 6.0, 361, 133, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("vinel5"), 6.0, 361, 133, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("vinel2"), 6.0, 55, 133, 0, 25, 5.0, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 6.0, 55, 133, 0, 25, 4.5, 0.8, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("vinel4"), 6.0, 361, 133, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("vinel5"), 6.0, 361, 133, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pfushigisou_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.813); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.813); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - HIT_NODE(fighter, Hash40::new("flower"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 90, 72, 0, 64, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + HIT_NODE(agent, Hash40::new("flower"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 90, 72, 0, 64, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 270, 52, 0, 31, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 270, 52, 0, 31, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pfushigisou_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.3, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.3, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 270, 80, 0, 27, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 270, 62, 0, 17, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 270, 80, 0, 27, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 270, 62, 0, 17, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 270, 82, 0, 9, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 270, 62, 0, 8, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 270, 82, 0, 9, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 270, 62, 0, 8, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attackairn", pfushigisou_attack_air_n_game) - .acmd("game_landingairn", pfushigisou_landing_air_n_game) - .acmd("game_attackairf", pfushigisou_attack_air_f_game) - .acmd("expression_attackairf", pfushigisou_attack_air_f_expression) - .acmd("game_attackairb", pfushigisou_attack_air_b_game) - .acmd("game_attackairhi", pfushigisou_attack_air_hi_game) - .acmd("game_attackairlw", pfushigisou_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pfushigisou/src/acmd/ground.rs b/fighters/pfushigisou/src/acmd/ground.rs index 8633a47876..ecddddf9ee 100644 --- a/fighters/pfushigisou/src/acmd/ground.rs +++ b/fighters/pfushigisou/src/acmd/ground.rs @@ -1,110 +1,108 @@ - use super::*; -unsafe extern "C" fn pfushigisou_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 2.3, 0.0, 3.6, 12.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 2.3, 0.0, 3.6, 12.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pfushigisou_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.6, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.6, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pfusigisou_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.3, 5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.3, 5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.7, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.7, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 3.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 3.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 2.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 2.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.2, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.2, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attack11", pfushigisou_attack_11_game) - .acmd("game_attack12", pfushigisou_attack_12_game) - .acmd("game_attackdash", pfusigisou_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pfushigisou/src/acmd/mod.rs b/fighters/pfushigisou/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/pfushigisou/src/acmd/mod.rs +++ b/fighters/pfushigisou/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pfushigisou/src/acmd/other.rs b/fighters/pfushigisou/src/acmd/other.rs index 402ec36688..1d6a1c7d47 100644 --- a/fighters/pfushigisou/src/acmd/other.rs +++ b/fighters/pfushigisou/src/acmd/other.rs @@ -1,208 +1,130 @@ - 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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_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(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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_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_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_f_left_l"), Hash40::new("se_pfushigisou_step_f_right_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_f_left_l"), Hash40::new("se_pfushigisou_step_f_right_l")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_b_left_l"), Hash40::new("se_pfushigisou_step_b_right_l")); - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_f_right_l"), Hash40::new("se_pfushigisou_step_f_left_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_b_left_l"), Hash40::new("se_pfushigisou_step_b_right_l")); + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_f_right_l"), Hash40::new("se_pfushigisou_step_f_left_l")); } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_b_right_m"), Hash40::new("se_pfushigisou_step_b_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_b_right_m"), Hash40::new("se_pfushigisou_step_b_left_m")); } } -unsafe extern "C" fn 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, 12.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("pfushigisou") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pfushigisou/src/acmd/smashes.rs b/fighters/pfushigisou/src/acmd/smashes.rs index 2d2156a7e7..456e9881f3 100644 --- a/fighters/pfushigisou/src/acmd/smashes.rs +++ b/fighters/pfushigisou/src/acmd/smashes.rs @@ -1,135 +1,129 @@ - use super::*; -unsafe extern "C" fn pfushigisou_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("flower"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 13.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("flower"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 13.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pfushigisou_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 0.750); + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 83, 0, 40, 5.0, 0.0, 3.5, 3.8, Some(0.0), Some(3.5), Some(-5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 2.3, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 3.0, -22.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 83, 0, 40, 5.0, 0.0, 3.5, 3.8, Some(0.0), Some(3.5), Some(-5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 2.3, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 3.0, -22.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attacks4hi", pfushigisou_attack_s4_hi_game) - .acmd("game_attacks4", pfushigisou_attack_s4_s_game) - .acmd("game_attacks4lw", pfushigisou_attack_s4_lw_game) - .acmd("game_attackhi4", pfushigisou_attack_hi4_game) - .acmd("game_attacklw4", pfushigisou_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pfushigisou/src/acmd/specials.rs b/fighters/pfushigisou/src/acmd/specials.rs index bbcc41a7a3..cacc52b7e5 100644 --- a/fighters/pfushigisou/src/acmd/specials.rs +++ b/fighters/pfushigisou/src/acmd/specials.rs @@ -1,102 +1,96 @@ - use super::*; -unsafe extern "C" fn pfushigisou_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_LEAFCUTTER, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -unsafe extern "C" fn pfushigisou_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_LEAFCUTTER, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -unsafe extern "C" fn pfushigisou_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_FLAG_SET_ANGLE); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 3.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 3.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_VINE, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_VINE, false, app::ArticleOperationTarget(0)); WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_SET_MAP_COLL_OFFSET); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_FLAG_SET_ANGLE); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_specials", pfushigisou_special_s_game) - .acmd("game_specialairs", pfushigisou_special_air_s_game) - .acmd("game_specialhi", pfushigisou_special_hi_game) - .acmd("game_specialairhi", pfushigisou_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/pfushigisou/src/acmd/throws.rs b/fighters/pfushigisou/src/acmd/throws.rs index a6fd4b5632..32c6b421da 100644 --- a/fighters/pfushigisou/src/acmd/throws.rs +++ b/fighters/pfushigisou/src/acmd/throws.rs @@ -1,78 +1,74 @@ - use super::*; -unsafe extern "C" fn pfushigisou_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.923); + FT_MOTION_RATE(agent, 0.923); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(20.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(20.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pfushigisou_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(19.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(19.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pfushigisou_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-22.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-22.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_catch", pfushigisou_catch_game) - .acmd("game_catchdash", pfushigisou_catch_dash_game) - .acmd("game_catchturn", pfushigisou_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/pfushigisou/src/acmd/tilts.rs b/fighters/pfushigisou/src/acmd/tilts.rs index 2fcede0396..7d4a9083d8 100644 --- a/fighters/pfushigisou/src/acmd/tilts.rs +++ b/fighters/pfushigisou/src/acmd/tilts.rs @@ -1,108 +1,104 @@ - use super::*; -unsafe extern "C" fn pfushigisou_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 3.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 4.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.0, 0.0, 4.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 130, 20, 0, 15, 3.5, 0.0, 3.0, 16.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 3.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 4.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.0, 0.0, 4.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 130, 20, 0, 15, 3.5, 0.0, 3.0, 16.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 5.0, 0.0, 3.5, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 5.0, 0.0, 3.5, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 88, 105, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 88, 105, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -2.5, Some(0.0), Some(4.0), Some(2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -2.5, Some(0.0), Some(4.0), Some(2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pfushigisou_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("vinel2"), 5.5, 30, 65, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 5.5, 30, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.2, 22.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("vinel2"), 5.5, 30, 65, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 5.5, 30, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.2, 22.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attacks3", pfushigisou_attack_s3_s_game) - .acmd("game_attackhi3", pfushigisou_attack_hi3_game) - .acmd("game_attacklw3", pfushigisou_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pfushigisou/src/lib.rs b/fighters/pfushigisou/src/lib.rs index b72753b9f1..021b8e6cb6 100644 --- a/fighters/pfushigisou/src/lib.rs +++ b/fighters/pfushigisou/src/lib.rs @@ -3,10 +3,9 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; -//pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -38,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pfushigisou"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/pfushigisou/src/opff.rs b/fighters/pfushigisou/src/opff.rs index a02a0d7858..3e0cab4074 100644 --- a/fighters/pfushigisou/src/opff.rs +++ b/fighters/pfushigisou/src/opff.rs @@ -70,8 +70,7 @@ pub unsafe fn pfushigisou_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .on_line(Main, pfushigisou_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pfushigisou_frame_wrapper); } diff --git a/fighters/pfushigisou/src/status/mod.rs b/fighters/pfushigisou/src/status/mod.rs new file mode 100644 index 0000000000..868a42d6c1 --- /dev/null +++ b/fighters/pfushigisou/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_lw::install(agent); +} diff --git a/fighters/pfushigisou/src/status.rs b/fighters/pfushigisou/src/status/special_lw.rs similarity index 78% rename from fighters/pfushigisou/src/status.rs rename to fighters/pfushigisou/src/status/special_lw.rs index 737a42f23e..0c6fbf55c5 100644 --- a/fighters/pfushigisou/src/status.rs +++ b/fighters/pfushigisou/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; #[skyline::hook(replace=request_change_pokemon)] unsafe fn request_change_pokemon() -> bool { @@ -13,8 +12,6 @@ unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) } -pub fn install() { - smashline::Agent::new("pfushigisou") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/pichu/src/acmd/aerials.rs b/fighters/pichu/src/acmd/aerials.rs index b88437fee4..8dbbcc7aa6 100644 --- a/fighters/pichu/src/acmd/aerials.rs +++ b/fighters/pichu/src/acmd/aerials.rs @@ -1,247 +1,244 @@ use super::*; -unsafe extern "C" fn pichu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 105, 0, 35, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 105, 0, 35, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 7.0, 361, 95, 0, 30, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 7.0, 361, 95, 0, 30, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, (4.0/6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, (4.0/6.0)); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - ATTACK(fighter, 0, 0, Hash40::new("neck"), 13.0 * damage_mul, 45, 96, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 13.0 * damage_mul, 45, 96, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 13.0 * damage_mul, 45, 96, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 13.0 * damage_mul, 45, 96, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, (5.0/6.0)); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 5.5 * damage_mul, 361, 80, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.5 * damage_mul, 361, 80, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, (5.0/6.0)); + ATTACK(agent, 0, 0, Hash40::new("neck"), 5.5 * damage_mul, 361, 80, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.5 * damage_mul, 361, 80, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn pichu_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, 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_BODY); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - FT_MOTION_RATE(fighter, 0.6154); + FT_MOTION_RATE(agent, 0.6154); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5 * damage_mul, 42, 257, 0, 35, 5.0, 0.0, 3.0, -10.5, Some(0.0), Some(3.0), Some(-0.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5 * damage_mul, 42, 257, 0, 35, 5.0, 0.0, 3.0, -10.5, Some(0.0), Some(3.0), Some(-0.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 4.0); - FT_DESIRED_RATE(fighter, 7.0, 6.5); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 7.0, 6.5); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 63, 95, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 63, 95, 0, 45, 6.0, 1.5, -0.2, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 63, 95, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 63, 95, 0, 45, 6.0, 1.5, -0.2, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 11.5, 12.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.5, 12.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - HIT_NODE(fighter, Hash40::new("mimir1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mimil1"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0 * damage_mul, 60, 89, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + HIT_NODE(agent, Hash40::new("mimir1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimil1"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0 * damage_mul, 60, 89, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 86, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 86, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 58, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 58, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0 * damage_mul, 361, 104, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0 * damage_mul, 361, 104, 0, 35, 5.0, 4.5, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0 * damage_mul, 361, 104, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0 * damage_mul, 361, 104, 0, 35, 5.0, 4.5, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); AttackModule::clear(boma, 2, false); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attackairn", pichu_attack_air_n_game) - .acmd("game_attackairf", pichu_attack_air_f_game) - .acmd("expression_attackairf", pichu_attack_air_f_expression) - .acmd("game_attackairb", pichu_attack_air_b_game) - .acmd("game_attackairhi", pichu_attack_air_hi_game) - .acmd("game_attackairlw", pichu_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pichu/src/acmd/ground.rs b/fighters/pichu/src/acmd/ground.rs index 720fd7c77e..d90e463480 100644 --- a/fighters/pichu/src/acmd/ground.rs +++ b/fighters/pichu/src/acmd/ground.rs @@ -1,48 +1,45 @@ - use super::*; -unsafe extern "C" fn pichu_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 3.0); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 3.0); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 67, 72, 0, 70, 4.0, 0.0, 3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 67, 72, 0, 70, 4.0, 0.0, 3.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 67, 72, 0, 70, 4.0, 0.0, 3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 67, 72, 0, 70, 4.0, 0.0, 3.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 361, 85, 0, 60, 4.6, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 60, 3.0, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 361, 85, 0, 60, 4.6, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 60, 3.0, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 6.0, 361, 65, 0, 60, 3.0, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 60, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 6.0, 361, 65, 0, 60, 3.0, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 60, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.25); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.25); } - } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attack11", pichu_attack_11_game) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pichu/src/acmd/mod.rs b/fighters/pichu/src/acmd/mod.rs index 879f161b12..690e658e8f 100644 --- a/fighters/pichu/src/acmd/mod.rs +++ b/fighters/pichu/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pichu/src/acmd/other.rs b/fighters/pichu/src/acmd/other.rs index a606b51f1d..fa1d8318d6 100644 --- a/fighters/pichu/src/acmd/other.rs +++ b/fighters/pichu/src/acmd/other.rs @@ -1,263 +1,133 @@ - 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_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(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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_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_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_pichu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pichu_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, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pichu_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pichu_step_left_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pichu_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pichu_step_right_l")); } } -unsafe extern "C" fn 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, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.286); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.286); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn pichu_dengekidama_game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if !VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { - if is_excute(fighter) { - ModelModule::set_scale(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 50, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - } - else { - if is_excute(fighter) { - ModelModule::set_scale(boma, 1.5); - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 50, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - } -} - -unsafe extern "C" fn pichu_dengekidama_effect_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pichu_dengeki"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, true); - if VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) - } - } -} - -unsafe extern "C" fn pichu_kaminari_game_regular(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"), 10.0, 94, 85, 0, 75, 7.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 115, 60, 0, 74, 4.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } -} - -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("pichu_dengekidama") - .acmd("game_regular", pichu_dengekidama_game_regular) - .acmd("effect_regular", pichu_dengekidama_effect_regular) - .install(); - smashline::Agent::new("pichu_kaminari") - .acmd("game_regular", pichu_kaminari_game_regular) - .install(); - smashline::Agent::new("pichu") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pichu/src/acmd/smashes.rs b/fighters/pichu/src/acmd/smashes.rs index 69622df9dc..7a0159afea 100644 --- a/fighters/pichu/src/acmd/smashes.rs +++ b/fighters/pichu/src/acmd/smashes.rs @@ -1,267 +1,263 @@ - use super::*; -unsafe extern "C" fn pichu_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::add(fighter.battle_object, 4.0); + MeterModule::add(agent.battle_object, 4.0); } - FT_ADD_DAMAGE(fighter, 2.5 * recoil_mul); + FT_ADD_DAMAGE(agent, 2.5 * recoil_mul); } frame(lua_state, 16.0); for _ in 0..5 { - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 366, 50, 0, 10, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * damage_mul, 20, 50, 0, 10, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 366, 50, 0, 10, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * damage_mul, 20, 50, 0, 10, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 1.0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8 * damage_mul, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8 * damage_mul, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_elec_shock"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_elec_shock"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek_elec"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek_elec"), false, true); } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek2"), false, true); } } -unsafe extern "C" fn pichu_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 15.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 15.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 15.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 15.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } else { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 17.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 17.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); - FT_ADD_DAMAGE(fighter, 2.5); + ATTACK(agent, 0, 0, Hash40::new("neck"), 17.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 17.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + FT_ADD_DAMAGE(agent, 2.5); } - HIT_NODE(fighter, Hash40::new("mimir1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mimil1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimir1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimil1"), *HIT_STATUS_XLU); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pichu_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); if charged { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 5.0); - if is_excute(fighter){ + if is_excute(agent){ if charged { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("pichu_tail_arc3"), Hash40::new("pichu_tail_arc3"), Hash40::new("top"), 1, 5, 0, 10, -40, -110, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 3, -0.5, 32, -75, -138, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("pichu_tail_arc3"), Hash40::new("pichu_tail_arc3"), Hash40::new("top"), 1, 5, 0, 10, -40, -110, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 3, -0.5, 32, -75, -138, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); if charged { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek_elec"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek_elec"), false, true); } } } -unsafe extern "C" fn pichu_attack_hi4_expression(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_INTP, *SLOPE_STATUS_NONE, 3); +unsafe extern "C" fn expression_attackhi4(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_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn pichu_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 2.0); if !charged { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::add(fighter.battle_object, 3.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::add(agent.battle_object, 3.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.4, 125, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.4, 125, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } - FT_ADD_DAMAGE(fighter, 1.5 * recoil_mul); + FT_ADD_DAMAGE(agent, 1.5 * recoil_mul); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 90, 0, 45, 4.5, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(-5.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 90, 0, 45, 4.5, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(-5.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_lw4_expression(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_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw4(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_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 6); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 42.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attacks4", pichu_attack_s4_s_game) - .acmd("effect_attacks4", pichu_attack_s4_s_effect) - .acmd("game_attackhi4", pichu_attack_hi4_game) - .acmd("effect_attackhi4", pichu_attack_hi4_effect) - .acmd("expression_attackhi4", pichu_attack_hi4_expression) - .acmd("game_attacklw4", pichu_attack_lw4_game) - .acmd("expression_attacklw4", pichu_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/pichu/src/acmd/specials.rs b/fighters/pichu/src/acmd/specials.rs index 956c49d2bb..eac4b49cc9 100644 --- a/fighters/pichu/src/acmd/specials.rs +++ b/fighters/pichu/src/acmd/specials.rs @@ -1,234 +1,233 @@ - use super::*; -unsafe extern "C" fn pichu_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = if fighter.kind() == *FIGHTER_KIND_KIRBY {false} else {VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1}; - let charge_state_time = if fighter.kind() == *FIGHTER_KIND_KIRBY {1} else {ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time")}; - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = if agent.kind() == *FIGHTER_KIND_KIRBY {false} else {VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1}; + let charge_state_time = if agent.kind() == *FIGHTER_KIND_KIRBY {1} else {ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time")}; + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if !charged { - FT_MOTION_RATE(fighter, (14.0/18.0)); + FT_MOTION_RATE(agent, (14.0/18.0)); } else if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 180); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 180); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 180.0); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICHU_GENERATE_ARTICLE_DENGEKIDAMA, false, -1); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - MeterModule::add(fighter.battle_object, 2.0); - FT_ADD_DAMAGE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + MeterModule::add(agent.battle_object, 2.0); + FT_ADD_DAMAGE(agent, 1.0); } else { - FT_ADD_DAMAGE(fighter, 3.0); + FT_ADD_DAMAGE(agent, 3.0); } } } -unsafe extern "C" fn pichu_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 120); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 120); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 120.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_ATTACK_TRIGGER); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_ADD_DAMAGE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 68, 55, 0, 70, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_ADD_DAMAGE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 68, 55, 0, 70, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_CALC_ATTACK_POWER); } else { - FT_ADD_DAMAGE(fighter, 3.0); - FT_DESIRED_RATE(fighter, 18.0, 12.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + FT_ADD_DAMAGE(agent, 3.0); + FT_DESIRED_RATE(agent, 18.0, 12.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); wait(lua_state, 9.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } AttackModule::set_attack_keep_rumble(boma, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_BRAKE_TRIGGER); } } -unsafe extern "C" fn pichu_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - 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(fighter, Hash40::new("pichu_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("pichu_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pichu_rocket_aura"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 0.9, true); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pichu_rocket_aura"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 0.9, true); EffectModule::enable_sync_init_pos_last(boma); - LAST_EFFECT_SET_COLOR(fighter, 0.85, 0.9, 1); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8 as u64, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.9, 1); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8 as u64, true); } } else { - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pichu_rocket_aura_max"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 1.3, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pichu_rocket_aura_max"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1.25 as u64, true); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1.25 as u64, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_sphere_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_sphere_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - FLASH(fighter, 0.08, 0.661, 1, 0.471); + if is_excute(agent) { + FLASH(agent, 0.08, 0.661, 1, 0.471); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.392); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.392); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); } -unsafe extern "C" fn pichu_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_DESIRED_RATE(fighter, 26.0, 33.0); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_DESIRED_RATE(agent, 26.0, 33.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn pichu_special_air_s_miss_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_DESIRED_RATE(fighter, 26.0, 33.0); +unsafe extern "C" fn game_specialairsmissend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_DESIRED_RATE(agent, 26.0, 33.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_MISS_END_RUMBLE_2); } } -unsafe extern "C" fn pichu_special_hi_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 120); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 120); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 120.0); } - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 2.0, 70, 50, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - FT_ADD_DAMAGE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 70, 50, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_ADD_DAMAGE(agent, 1.0); } else { - FT_ADD_DAMAGE(fighter, 0.5); + FT_ADD_DAMAGE(agent, 0.5); } JostleModule::set_status(boma, false); } } -unsafe extern "C" fn pichu_special_hi_1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn expression_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f20a9d549), false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x24772eddef), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f20a9d549), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x24772eddef), false); MotionModule::set_helper_calculation(boma, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_helper_calculation(boma, true); } } -unsafe extern "C" fn pichu_special_hi_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 3.0, 70, 150, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - FT_ADD_DAMAGE(fighter, 2.0); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 3.0, 70, 150, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_ADD_DAMAGE(agent, 2.0); } else { - FT_ADD_DAMAGE(fighter, 1.0); + FT_ADD_DAMAGE(agent, 1.0); } JostleModule::set_status(boma, false); } } -unsafe extern "C" fn pichu_special_hi_2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn expression_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f20a9d549), false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x24772eddef), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f20a9d549), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x24772eddef), false); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); MotionModule::set_helper_calculation(boma, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_helper_calculation(boma, true); } } -unsafe extern "C" fn pichu_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if !charged { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_GENERATE); } else { @@ -244,318 +243,319 @@ unsafe extern "C" fn pichu_special_lw_game(fighter: &mut L2CAgentBase) { let discharge_min_size_mul = 0.75; let discharge_size_mul = 1.0 - ((1.0 - (charge_state_remaining.min(discharge_decrease_power_frame)/discharge_decrease_power_frame)) * (1.0 - discharge_min_size_mul)); VarModule::set_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL, discharge_size_mul); - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); VarModule::set_int(boma.object(), vars::common::instance::GIMMICK_TIMER, 0); MeterModule::drain_direct(boma.object(), 999.0); } } - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { frame(lua_state, 7.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, 6.0, 3.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 6.0, 3.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { boma.change_status_req(*FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_LW_HIT, true); } } } -unsafe extern "C" fn pichu_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let discharge_power_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_POWER_MUL); let discharge_size_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::add(fighter.battle_object, 2.0); - FT_ADD_DAMAGE(fighter, 3.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 71, 0, 90, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, 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_NONE); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::add(agent.battle_object, 2.0); + FT_ADD_DAMAGE(agent, 3.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 71, 0, 90, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, 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_NONE); } else { - FT_ADD_DAMAGE(fighter, 8.0 * discharge_power_mul); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0 * discharge_power_mul, 361, 80, 0, 70, 18.0 * discharge_size_mul, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, 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_NONE); + FT_ADD_DAMAGE(agent, 8.0 * discharge_power_mul); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0 * discharge_power_mul, 361, 80, 0, 70, 18.0 * discharge_size_mul, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, 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_NONE); VarModule::set_int(boma.object(), vars::common::instance::GIMMICK_TIMER, 0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_MOTION_RATE(fighter, 1.5 * discharge_power_mul); + MeterModule::watch_damage(agent.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_MOTION_RATE(agent, 1.5 * discharge_power_mul); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) && fighter.is_situation(*SITUATION_KIND_AIR) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) && agent.is_situation(*SITUATION_KIND_AIR) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } -unsafe extern "C" fn pichu_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 1.0); WorkModule::is_flag(boma, *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_ATTACK_HIT); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { let discharge_effect_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit2"), false, true); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit"), false, true); } for _ in 0..3{ - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn pichu_special_air_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 1.0); WorkModule::is_flag(boma, *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_ATTACK_HIT); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { let discharge_effect_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit2"), false, true); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit"), false, true); } for _ in 0..3{ - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek"), false, true); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_specialn", pichu_special_n_game) - .acmd("game_specialairn", pichu_special_n_game) - .acmd("game_specials", pichu_special_s_game) - .acmd("effect_specials", pichu_special_s_effect) - .acmd("game_specialsend", pichu_special_s_end_game) - .acmd("game_specialairsend", pichu_special_s_end_game) - .acmd("game_specialairsmissend", pichu_special_air_s_miss_end_game) - .acmd("game_specialhi1", pichu_special_hi_1_game) - .acmd("game_specialairhi1", pichu_special_hi_1_game) - .acmd("expression_specialhi1", pichu_special_hi_1_expression) - .acmd("expression_specialairhi1", pichu_special_hi_1_expression) - .acmd("game_specialhi2", pichu_special_hi_2_game) - .acmd("game_specialairhi2", pichu_special_hi_2_game) - .acmd("expression_specialhi2", pichu_special_hi_2_expression) - .acmd("expression_specialairhi2", pichu_special_hi_2_expression) - .acmd("game_speciallw", pichu_special_lw_game) - .acmd("game_specialairlw", pichu_special_lw_game) - .acmd("game_speciallwhit", pichu_special_lw_hit_game) - .acmd("game_specialairlwhit", pichu_special_lw_hit_game) - .acmd("effect_speciallwhit", pichu_special_lw_hit_effect) - .acmd("effect_specialairlwhit", pichu_special_air_lw_hit_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("game_specialairsmissend", game_specialairsmissend); + + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("expression_specialhi1", expression_specialhi1); + agent.acmd("expression_specialairhi1", expression_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialhi2); + agent.acmd("expression_specialhi2", expression_specialhi2); + agent.acmd("expression_specialairhi2", expression_specialhi2); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_specialairlwhit); } diff --git a/fighters/pichu/src/acmd/throws.rs b/fighters/pichu/src/acmd/throws.rs index c02c4c1182..d38bb6049d 100644 --- a/fighters/pichu/src/acmd/throws.rs +++ b/fighters/pichu/src/acmd/throws.rs @@ -1,295 +1,295 @@ - use super::*; -unsafe extern "C" fn pichu_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pichu_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pichu_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pichu_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0 * damage_mul, 45, 115, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0 * damage_mul, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0 * damage_mul, 45, 115, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0 * damage_mul, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 0.5 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 0.5 * recoil_mul); } for _ in 0..4{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5 * damage_mul, 361, 100, 0, 0, 5.5, 0.0, 8.5, 4.7, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5 * damage_mul, 361, 100, 0, 0, 5.5, 0.0, 8.5, 4.7, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 26.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 26); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 26); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0 * damage_mul, 85, 30, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0 * damage_mul, 85, 30, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 145, 50, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 145, 50, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if charged { - FT_DESIRED_RATE(fighter, 14.0, 9.0); - FT_ADD_DAMAGE(fighter, 1.0); + FT_DESIRED_RATE(agent, 14.0, 9.0); + FT_ADD_DAMAGE(agent, 1.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -6, 4); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -6, 4); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { +unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - EFFECT(fighter, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.35, 0.95); + EFFECT(agent, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.35, 0.95); } } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 0, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 30, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 0, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 30, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 0, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 30, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 0, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 30, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 23.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); if charged { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - //EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85, true); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.01, 0.2, 0.95); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + //EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85, true); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.01, 0.2, 0.95); } } } -unsafe extern "C" fn pichu_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 50, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 50, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 5.0 * damage_mul, 80, 60, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 5.0 * damage_mul, 80, 60, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - FT_ADD_DAMAGE(fighter, 1.0 * recoil_mul); - CHECK_FINISH_CAMERA(fighter, 2, 17); + FT_ADD_DAMAGE(agent, 1.0 * recoil_mul); + CHECK_FINISH_CAMERA(agent, 2, 17); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); - if is_excute(fighter) { + if is_excute(agent) { if charged{ - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 180); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 180); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 180.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 5, 0, 135, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 5, 0, 135, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_THROW); } else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); if charged { - FT_DESIRED_RATE(fighter, 4.0, 10.0) + FT_DESIRED_RATE(agent, 4.0, 10.0) } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if charged{ - ATTACK(fighter, 0, 0, Hash40::new("trans"), 15.0, 361, 60, 0, 60, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_HEAD); - FT_ADD_DAMAGE(fighter, 5.0); + ATTACK(agent, 0, 0, Hash40::new("trans"), 15.0, 361, 60, 0, 60, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_HEAD); + FT_ADD_DAMAGE(agent, 5.0); } else{ - ATTACK(fighter, 0, 0, Hash40::new("trans"), 4.0, 361, 60, 0, 60, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("trans"), 4.0, 361, 60, 0, 60, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn pichu_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if charged { - EFFECT(fighter, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.35, 0.95); + EFFECT(agent, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.35, 0.95); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if charged { - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.01, 0.2, 0.95); + EFFECT(agent, Hash40::new("sys_bomb_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 0.01, 0.2, 0.95); } - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 37.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_catch", pichu_catch_game) - .acmd("game_catchdash", pichu_catch_dash_game) - .acmd("game_catchturn", pichu_catch_turn_game) - .acmd("game_throwf", pichu_throw_f_game) - .acmd("game_throwb", pichu_throw_b_game) - .acmd("effect_throwb", pichu_throw_b_effect) - .acmd("game_throwhi", pichu_throw_hi_game) - .acmd("game_throwlw", pichu_throw_lw_game) - .acmd("effect_throwlw", pichu_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } diff --git a/fighters/pichu/src/acmd/tilts.rs b/fighters/pichu/src/acmd/tilts.rs index 4f352bcedb..981b49157e 100644 --- a/fighters/pichu/src/acmd/tilts.rs +++ b/fighters/pichu/src/acmd/tilts.rs @@ -1,95 +1,91 @@ - use super::*; -unsafe extern "C" fn pichu_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 1.5 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 1.5 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0 * damage_mul, 40, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0 * damage_mul, 40, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("footr"), 9.0 * damage_mul, 40, 105, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-3.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("footr"), 9.0 * damage_mul, 40, 105, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-3.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.5, 80, 90, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.5, 80, 90, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 5.5, 80, 90, 0, 70, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.5, 80, 90, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.5, 80, 90, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 5.5, 80, 90, 0, 70, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pichu_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 120, 70, 0, 65, 3.5, 0.0, -0.4, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 6.0, 120, 50, 0, 65, 4.5, 0.5, 0.8, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 120, 70, 0, 65, 3.5, 0.0, -0.4, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 6.0, 120, 50, 0, 65, 4.5, 0.5, 0.8, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pichu_attack_lw3_expression(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_TOP); +unsafe extern "C" fn expression_attacklw3(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_TOP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attacks3", pichu_attack_s3_s_game) - .acmd("game_attackhi3", pichu_attack_hi3_game) - .acmd("game_attacklw3", pichu_attack_lw3_game) - .acmd("expression_attacklw3", pichu_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/pichu/src/dengekidama/acmd.rs b/fighters/pichu/src/dengekidama/acmd.rs new file mode 100644 index 0000000000..9e010d5e9e --- /dev/null +++ b/fighters/pichu/src/dengekidama/acmd.rs @@ -0,0 +1,36 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if !VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + ModelModule::set_scale(boma, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 50, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + } else { + if is_excute(agent) { + ModelModule::set_scale(boma, 1.5); + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 50, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + } +} + +unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pichu_dengeki"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, true); + if VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); + agent.acmd("effect_regular", effect_regular); +} diff --git a/fighters/pichu/src/dengekidama/mod.rs b/fighters/pichu/src/dengekidama/mod.rs new file mode 100644 index 0000000000..50c3951f3b --- /dev/null +++ b/fighters/pichu/src/dengekidama/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pichu_dengekidama"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pichu/src/kaminari/acmd.rs b/fighters/pichu/src/kaminari/acmd.rs new file mode 100644 index 0000000000..eddf837d74 --- /dev/null +++ b/fighters/pichu/src/kaminari/acmd.rs @@ -0,0 +1,17 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 94, 85, 0, 75, 7.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 115, 60, 0, 74, 4.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/pichu/src/kaminari/mod.rs b/fighters/pichu/src/kaminari/mod.rs new file mode 100644 index 0000000000..39348a7190 --- /dev/null +++ b/fighters/pichu/src/kaminari/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pichu_kaminari"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pichu/src/lib.rs b/fighters/pichu/src/lib.rs index 4579021516..43f134b6ec 100644 --- a/fighters/pichu/src/lib.rs +++ b/fighters/pichu/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod dengekidama; +mod kaminari; use smash::{ lib::{ @@ -37,8 +42,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("pichu"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + dengekidama::install(); + kaminari::install(); } diff --git a/fighters/pichu/src/opff.rs b/fighters/pichu/src/opff.rs index 273617c1b9..58e18c6a44 100644 --- a/fighters/pichu/src/opff.rs +++ b/fighters/pichu/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // symbol-based call for the pikachu/pichu characters' common opff extern "Rust" { @@ -216,9 +215,8 @@ pub unsafe fn pichu_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pichu") - .on_line(Main, pichu_frame_wrapper) - .on_line(Main, pichu_meter) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pichu_frame_wrapper); + agent.on_line(Main, pichu_meter); } diff --git a/fighters/pickel/src/acmd/aerials.rs b/fighters/pickel/src/acmd/aerials.rs index 095de80aa4..96df6e9efd 100644 --- a/fighters/pickel/src/acmd/aerials.rs +++ b/fighters/pickel/src/acmd/aerials.rs @@ -1,44 +1,43 @@ - use super::*; // Note: Neutral air is handled in tilts.rs, as it shares a script with forward tilt/jab -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_MINI_FRAME) != 0 { // sword hitboxes frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 6.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 6.0); } } else { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 3.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); MotionModule::set_rate(boma, 1.5); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.5); @@ -56,17 +55,17 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); @@ -78,16 +77,16 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind == gold { MotionModule::set_rate(boma, 3.625); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 3.625); @@ -100,15 +99,15 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { } else { //pickaxe hitboxes frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_PICK, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0 / (7.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0 / (7.0 - 1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); @@ -122,56 +121,56 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { damage = [11.0, 14.0, 12.5, 15.0]; // damage for diamond } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), damage[0], 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[0], 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), damage[0], 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[0], 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), damage[2], 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[2], 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[3], 275, 55, 0, 25, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[3], 275, 65, 0, 80, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), damage[2], 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[2], 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[3], 275, 55, 0, 25, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[3], 275, 65, 0, 80, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } } else { // fist hitboxes - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.5, 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.5, 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.5, 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.5, 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if material_kind == gold { - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } -unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -193,27 +192,27 @@ unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_sword_flare_diamond", "pickel_atk_slash_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 6.5, 0.6, -13, -33, -83, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 6.5, 0.6, -13, -33, -83, 1.15, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effect frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } else { @@ -231,73 +230,73 @@ unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_pick_flare_diamond", "pickel_atk_pick_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1, 8.5, 4, -10, -35, -75.7, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1, 8.5, 4, -10, -35, -75.7, 1, true, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 1.1); + LAST_EFFECT_SET_RATE(agent, 1.1); } else { - LAST_EFFECT_SET_RATE(fighter, 0.6); + LAST_EFFECT_SET_RATE(agent, 0.6); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effect frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_MINI_FRAME) != 0 { // sword hitboxes frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 10.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 10.0); } } else { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 5.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 5.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.5); material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); @@ -315,17 +314,17 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); @@ -337,16 +336,16 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind == gold { MotionModule::set_rate(boma, 2.15); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 2.15); @@ -359,11 +358,11 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { } else { // pickaxe hitboxes frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_PICK, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); @@ -377,42 +376,41 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { damage = [13.5, 17.0]; // damage for diamond } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } } else { // fist hitboxes - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.7, 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.7, 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if material_kind == gold { - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } - -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -434,28 +432,28 @@ unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_sword_flare_diamond", "pickel_atk_slash_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 5.9, -2.0, -140, 30, -55, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 5.9, -2.0, -140, 30, -55, 1.15, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effects frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } else { @@ -473,60 +471,60 @@ unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { effect = ["pickel_pick_flare_diamond", "pickel_atk_pick_diamond"]; } if [wood, stone, iron, gold, diamond].contains(&material_kind) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 0, 9.7, -4, 180, 35, -100, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 0, 9.7, -4, 180, 35, -100, 1, true, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 0.95); + LAST_EFFECT_SET_RATE(agent, 0.95); } else { - LAST_EFFECT_SET_RATE(fighter, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.55); } } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[1]), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[1]), true, true); } } else { // fist effects frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_AXE, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.8); } else { @@ -534,7 +532,7 @@ unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); if [wood, stone, iron, gold, diamond].contains(&material_kind) { let mut damage = 5.5; // default damage, used for wood and gold @@ -546,36 +544,36 @@ unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { damage = 8.7; // damage for diamond } WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 71, 76, 0, 48, 5.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 71, 76, 0, 48, 5.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.2, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.2, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.8); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_HI_ENABLE_LANDING); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0) } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -583,27 +581,27 @@ unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let article = ArticleModule::get_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE); let object_id = smash::app::lua_bind::Article::get_battle_object_id(article) as u32; let article_boma = sv_battle_object::module_accessor(object_id); let anvil_pos_y = PostureModule::pos_y(article_boma); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::FORGE_START_Y_POS, anvil_pos_y); + VarModule::set_float(agent.battle_object, vars::pickel::instance::FORGE_START_Y_POS, anvil_pos_y); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); //WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -611,79 +609,21 @@ unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn forge_game_fall(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - JostleModule::set_status(boma, false); - } - frame(lua_state, 8.0); - if is_excute(weapon) { - JostleModule::set_status(boma, true); - WorkModule::on_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); -unsafe extern "C" fn forge_game_fallattack(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let pickel = utils::util::get_battle_object_from_id(owner_id); - let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); - if is_excute(weapon) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), - Hash40::new("attack_air_lw_2"), - Hash40::new("attack_air_lw_fall"),]){ - //below hitbox shows for 1 frame if this isnt here lol - } else { - wait(lua_state, 2.0); - ATTACK(weapon, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - fall_distance), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } else { - ATTACK(weapon, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } -} + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); -unsafe extern "C" fn forge_game_fallattackride(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } -} + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); -pub fn install() { - smashline::Agent::new("pickel_forge") - .acmd("game_fall", forge_game_fall) - .acmd("game_fallattack", forge_game_fallattack) - .acmd("game_fallattackride", forge_game_fallattackride) - .install(); - smashline::Agent::new("pickel") - .acmd("game_attackairf", game_attackairf) - .acmd("effect_attackairf", effect_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_attackairlw2", game_attackairlw2) - .install(); + agent.acmd("game_attackairlw2", game_attackairlw2); } diff --git a/fighters/pickel/src/acmd/ground.rs b/fighters/pickel/src/acmd/ground.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/pickel/src/acmd/ground.rs +++ b/fighters/pickel/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pickel/src/acmd/other.rs b/fighters/pickel/src/acmd/other.rs index 954adfd5e5..9f55603f16 100644 --- a/fighters/pickel/src/acmd/other.rs +++ b/fighters/pickel/src/acmd/other.rs @@ -1,134 +1,131 @@ - use super::*; -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn sound_dash(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_pickel_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pickel_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn game_turndash(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) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, 60192); WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_BLEND_TURN); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn game_escapeair(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 game_escapeairslide(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 game_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 90.0); - if is_excute(fighter){ + if is_excute(agent){ if DamageModule::damage(boma, 0) > 2.0 { DamageModule::add_damage(boma, -2.0, 0); } } } -unsafe extern "C" fn game_guardon(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_guardon(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); } } -unsafe extern "C" fn game_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); } } } -unsafe extern "C" fn sound_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_PICKEL_STATUS_LANDING_FLAG_HIGH_PLACE) { frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pickel_landing_high_place")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pickel_landing_high_place")); DamageModule::add_damage(boma, 0.1, 0); } } else { frame(lua_state, 0.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_pickel_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_pickel_landing02")); } } } -unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT, Hash40::new("passive"), false, 0.0); let melt = ArticleModule::get_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT); @@ -139,47 +136,22 @@ unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn melt_game_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn melt_effect_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_water_landing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } -} - -unsafe extern "C" fn melt_sound_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - PLAY_SE(weapon, Hash40::new("se_common_swim_middle_01")); - } -} - -pub fn install() { - smashline::Agent::new("pickel") - .acmd("game_dash", game_dash) - .acmd("sound_dash", sound_dash) - .acmd("game_turndash", game_turndash) - .acmd("game_escapeair", game_escapeair) - .acmd("game_escapeairslide", game_escapeairslide) - .acmd("game_appealsl", game_appeals) - .acmd("game_appealsr", game_appeals) - .acmd("game_guardon", game_guardon) - .acmd("game_guarddamage", game_guarddamage) - .acmd("sound_landingheavy", sound_landingheavy) - .acmd("game_passive", game_passive) - .install(); - smashline::Agent::new("pickel_melt") - .acmd("game_passive", melt_game_passive) - .acmd("effect_passive", melt_effect_passive) - .acmd("sound_passive", melt_sound_passive) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + 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("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + + agent.acmd("game_guardon", game_guardon); + + agent.acmd("game_guarddamage", game_guarddamage); + + agent.acmd("sound_landingheavy", sound_landingheavy); + + agent.acmd("game_passive", game_passive); } diff --git a/fighters/pickel/src/acmd/smashes.rs b/fighters/pickel/src/acmd/smashes.rs index 16cb0d60af..79bcf75352 100644 --- a/fighters/pickel/src/acmd/smashes.rs +++ b/fighters/pickel/src/acmd/smashes.rs @@ -1,28 +1,25 @@ - use super::*; // shrinks the magma block effects to match its reduced size -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 9, -6, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 9, -6, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pickel_block_magma_heat"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pickel_block_magma_heat"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("null"), Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_block_magma_heat"), false, true); - EFFECT(fighter, Hash40::new("pickel_block_break_magma"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("null"), Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_block_magma_heat"), false, true); + EFFECT(agent, Hash40::new("pickel_block_break_magma"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("effect_attackhi4", effect_attackhi4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attackhi4", effect_attackhi4); } diff --git a/fighters/pickel/src/acmd/specials.rs b/fighters/pickel/src/acmd/specials.rs index b1bf05f546..2e64b922fb 100644 --- a/fighters/pickel/src/acmd/specials.rs +++ b/fighters/pickel/src/acmd/specials.rs @@ -1,47 +1,15 @@ - use super::*; -unsafe extern "C" fn sound_specialn1getgold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pickel_special_n02_iron")); - PLAY_SE(fighter, Hash40::new("se_pickel_special_n_item")); - PLAY_SE(fighter, Hash40::new("se_result_coin_silver")); - } -} - -unsafe extern "C" fn trolley_game_specialsdriveemptypartial(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); - ATTACK(weapon, 0, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, 6.0, Some(0.0), Some(0.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 0, true); - ATTACK(weapon, 1, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, -6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 1, true); - ATTACK(weapon, 2, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 0.0, 6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 2, true); - ATTACK(weapon, 3, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_IIE, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 4, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_down_only(boma, 4, true); - } - wait(lua_state, 6.0); - if is_excute(weapon) { - ATTACK(weapon, 5, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.5, 0.0, 3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - WorkModule::off_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); +unsafe extern "C" fn sound_specialn1getgold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pickel_special_n02_iron")); + PLAY_SE(agent, Hash40::new("se_pickel_special_n_item")); + PLAY_SE(agent, Hash40::new("se_result_coin_silver")); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("sound_specialn1getgold", sound_specialn1getgold) - .install(); - smashline::Agent::new("pickel_trolley") - .acmd( - "game_specialsdriveemptypartial", - trolley_game_specialsdriveemptypartial, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_specialn1getgold", sound_specialn1getgold); } diff --git a/fighters/pickel/src/acmd/throws.rs b/fighters/pickel/src/acmd/throws.rs index 24e57be760..df382b115b 100644 --- a/fighters/pickel/src/acmd/throws.rs +++ b/fighters/pickel/src/acmd/throws.rs @@ -1,231 +1,230 @@ use super::*; -unsafe extern "C" fn pickel_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(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) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch"), false, -1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -4.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -4.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 17.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 24.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 26.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 28.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn pickel_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch_dash"), false, -1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 18.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 27.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 29.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 31.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 51.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn pickel_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch_turn"), false, -1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.8), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, -3.2, Some(0.0), Some(7.0), Some(-10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, -5.0, Some(0.0), Some(7.0), Some(-9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.8), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, -3.2, Some(0.0), Some(7.0), Some(-10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, -5.0, Some(0.0), Some(7.0), Some(-9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 19.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 26.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 28.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, 1.0, Some(0.0), Some(-0.5), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, 1.0, Some(0.0), Some(-0.5), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 30.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 32.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn pickel_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 25, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 25, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, Hash40::new("throw_f"), false, -1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 4.8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 4.8); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn pickel_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 65, 68, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 65, 68, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_THROW_FLAG_FORGE_GENERATE_ENABLE); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 2); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } if WorkModule::is_flag(boma, *FIGHTER_PICKEL_STATUS_THROW_FLAG_IS_GENERATE_FORGE) { frame(lua_state, 23.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("game_catch", pickel_catch_game) - .acmd("game_catchdash", pickel_catch_dash_game) - .acmd("game_catchturn", pickel_catch_turn_game) - .acmd("game_throwf", pickel_throw_f_game) - .acmd("game_throwlw", pickel_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/pickel/src/acmd/tilts.rs b/fighters/pickel/src/acmd/tilts.rs index 695cbe3957..09c0deba7c 100644 --- a/fighters/pickel/src/acmd/tilts.rs +++ b/fighters/pickel/src/acmd/tilts.rs @@ -1,29 +1,28 @@ - use super::*; // this script is used for jab, forward tilt, and neutral air -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 2.0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); if [wood, stone, iron, gold, diamond].contains(&material_kind) { @@ -48,23 +47,23 @@ unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes if boma.is_situation(*SITUATION_KIND_GROUND) - && (-0.1..0.1).contains(&fighter.left_stick_x()) { // locking hitbox on jab - ATTACK(fighter, 4, 0, Hash40::new("top"), (damage / 2.0), 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + && (-0.1..0.1).contains(&agent.left_stick_x()) { // locking hitbox on jab + ATTACK(agent, 4, 0, Hash40::new("top"), (damage / 2.0), 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 4, false); } else { // non-locking hitbox on ftilt/neutral air - ATTACK(fighter, 4, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); } - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, hitstun[0], false); AttackModule::set_add_reaction_frame_revised(boma, 1, hitstun[0], false); AttackModule::set_add_reaction_frame_revised(boma, 2, hitstun[0], false); @@ -76,50 +75,50 @@ unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); if boma.is_situation(*SITUATION_KIND_GROUND) { // ground-only locking hitbox - ATTACK(fighter, 7, 0, Hash40::new("top"), 1.36, 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("top"), 1.36, 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 7, -10.0, false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.25); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_AXE, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); @@ -128,7 +127,7 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if [wood, stone, iron, gold, diamond].contains(&material_kind) { let mut damage = 5.5; // default damage, used for wood and gold if material_kind == stone { @@ -139,31 +138,31 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { damage = 8.7; // damage for diamond } WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 78, 78, 0, 56, 4.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 78, 78, 0, 56, 4.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.2, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.2, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.5); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -183,238 +182,166 @@ unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_axe_flare_diamond", "pickel_atk_axe_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 0.9, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 0.9, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), -3.2, 11.5, -1.89, -80, -80, -27, 0.9, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), -3.2, 11.5, -1.89, -80, -80, -27, 0.9, false, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 0.4); + LAST_EFFECT_SET_RATE(agent, 0.4); } else { - LAST_EFFECT_SET_RATE(fighter, 0.6); + LAST_EFFECT_SET_RATE(agent, 0.6); } } } else { frame(lua_state, 6.0); // fist effect - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11, -3, -20, -60, -70, 0.7, false, *EF_FLIP_YZ, 0.05); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11, -3, -20, -60, -70, 0.7, false, *EF_FLIP_YZ, 0.05); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_diamond"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_gold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_iron"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_stone"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_wood"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_diamond"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_gold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_iron"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_stone"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_wood"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), false, true); } } -unsafe extern "C" fn expression_attackhi3(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_attackhi3(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); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_77_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { //let mut rotation_vec = Vector3f{ x:0.0, y: 0.0, z: -8.0 }; //let rotation_vec_ptr: *mut Vector3f = &mut rotation_vec; //ModelModule::joint_rotate(boma, Hash40::new("haver"), rotation_vec_ptr); WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); // Diamond if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attackm"), 0); } // Gold else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_GOLD { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 9); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 9); } // Iron else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_IRON { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attackm"), 6); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attackm"), 6); } // Stone else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_STONE { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 0); } // Wood else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_WOOD { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 8); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 8); } // Punch else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 8); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 8); } } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(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) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - FT_MOTION_RATE(fighter, 8.0); + FT_MOTION_RATE(agent, 8.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK){ VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 12.0/(3.0-2.0)); + FT_MOTION_RATE(agent, 12.0/(3.0-2.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FIRE){ ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FIRE, false, 0); } if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); - //FT_MOTION_RATE(fighter, 25.0/(30.0-5.0)); + FT_MOTION_RATE(agent, 1.0); + //FT_MOTION_RATE(agent, 25.0/(30.0-5.0)); } else { - FT_MOTION_RATE(fighter, 15.0/(30.0-5.0)); + FT_MOTION_RATE(agent, 15.0/(30.0-5.0)); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - //FT_MOTION_RATE(fighter, 2.0); - FT_MOTION_RATE(fighter, 0.5); + //FT_MOTION_RATE(agent, 2.0); + FT_MOTION_RATE(agent, 0.5); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 7.2, 1, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.075, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT(agent, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 7.2, 1, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.075, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); } else { - EFFECT(fighter, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 6.2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 6.2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } else { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_damage_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_damage_aura"), -1); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_aura"), false, false); - } -} - -unsafe extern "C" fn fire_game_attacklw3(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let pickel = pickel_boma.object(); - if is_excute(weapon) { - AttackModule::disable_tip(boma); - VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - if VarModule::is_flag(pickel, vars::common::instance::IS_HEAVY_ATTACK){ - VarModule::on_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - } else { - VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - } - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE) { - //FT_MOTION_RATE(weapon, 1.25); - ATTACK(weapon, 0, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, 2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, -2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } else { - FT_MOTION_RATE(weapon, 0.75); - ATTACK(weapon, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.355, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.355, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 24.0); - if is_excute(weapon) { - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ - FT_MOTION_RATE(weapon, 1.0); - ATTACK(weapon, 0, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } - } - frame(lua_state, 28.0); - if is_excute(weapon) { - AttackModule::clear_all(boma); - } - frame(lua_state, 45.0); - if is_excute(weapon) { - notify_event_msc_cmd!(weapon, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_aura"), false, false); } } -unsafe extern "C" fn fire_effect_attacklw3(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let pickel = pickel_boma.object(); - if is_excute(weapon) { - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(weapon, 0.137, 0.85, 0.85); - } else { - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(weapon, 1.0, 0.467, 0.0); - } - } - frame(lua_state, 30.0); - if is_excute(weapon) { - EFFECT_DETACH_KIND(weapon, Hash40::new("pickel_fire_soot"), -1); - } - frame(lua_state, 38.0); - if is_excute(weapon) { - EFFECT_DETACH_KIND(weapon, Hash40::new("pickel_fire"), -1); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); -pub fn install() { - smashline::Agent::new("pickel_fire") - .acmd("game_attacklw3", fire_game_attacklw3) - .acmd("effect_attacklw3", fire_effect_attacklw3) - .install(); - smashline::Agent::new("pickel") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("expression_attackhi3", expression_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pickel/src/fire/acmd.rs b/fighters/pickel/src/fire/acmd.rs new file mode 100644 index 0000000000..95c7dfa2d9 --- /dev/null +++ b/fighters/pickel/src/fire/acmd.rs @@ -0,0 +1,74 @@ +use super::*; + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let pickel = pickel_boma.object(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + if VarModule::is_flag(pickel, vars::common::instance::IS_HEAVY_ATTACK){ + VarModule::on_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + } else { + VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + } + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE) { + //FT_MOTION_RATE(agent, 1.25); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, 2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, -2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } else { + FT_MOTION_RATE(agent, 0.75); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 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_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } + } + frame(lua_state, 28.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 45.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let pickel = pickel_boma.object(); + if is_excute(agent) { + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.137, 0.85, 0.85); + } else { + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.467, 0.0); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("pickel_fire_soot"), -1); + } + frame(lua_state, 38.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("pickel_fire"), -1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); +} diff --git a/fighters/pickel/src/fire/mod.rs b/fighters/pickel/src/fire/mod.rs new file mode 100644 index 0000000000..fc02aa3c10 --- /dev/null +++ b/fighters/pickel/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pickel_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/forge/acmd.rs b/fighters/pickel/src/forge/acmd.rs new file mode 100644 index 0000000000..e84f40db5f --- /dev/null +++ b/fighters/pickel/src/forge/acmd.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + JostleModule::set_status(boma, true); + WorkModule::on_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK); + } +} + +unsafe extern "C" fn game_fallattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let pickel = utils::util::get_battle_object_from_id(owner_id); + let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), + Hash40::new("attack_air_lw_2"), + Hash40::new("attack_air_lw_fall"),]){ + //below hitbox shows for 1 frame if this isnt here lol + } else { + wait(lua_state, 2.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - fall_distance), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } +} + +unsafe extern "C" fn game_fallattackride(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); + + agent.acmd("game_fallattack", game_fallattack); + + agent.acmd("game_fallattackride", game_fallattackride); +} diff --git a/fighters/pickel/src/forge/mod.rs b/fighters/pickel/src/forge/mod.rs new file mode 100644 index 0000000000..9089e5072d --- /dev/null +++ b/fighters/pickel/src/forge/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("pickel_forge"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/forge/opff.rs b/fighters/pickel/src/forge/opff.rs new file mode 100644 index 0000000000..3641ef7388 --- /dev/null +++ b/fighters/pickel/src/forge/opff.rs @@ -0,0 +1,26 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pickel_forge_frame(weapon: &mut smash::lua2cpp::L2CFighterBase){ + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + if pickel_boma.is_motion_one_of(&[ + Hash40::new("attack_air_lw"), + Hash40::new("attack_air_lw_2"), + Hash40::new("attack_air_lw_fall") ]) + && !boma.is_situation(*SITUATION_KIND_GROUND) + //&& !pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START) + && WorkModule::is_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK){ + MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_GAME, Hash40::new("game_fallattackride"), -1); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_forge_frame); +} diff --git a/fighters/pickel/src/lib.rs b/fighters/pickel/src/lib.rs index 91adab590f..910e6f4a22 100644 --- a/fighters/pickel/src/lib.rs +++ b/fighters/pickel/src/lib.rs @@ -2,6 +2,22 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod opff; +pub mod status; + +// articles + +mod fire; +mod forge; +mod melt; +mod trolley; + +// material table hook + +pub mod material_table; + use smash::{ lib::{ L2CValue, @@ -31,16 +47,20 @@ use utils::{ ext::*, consts::*, }; - use smashline::*; -pub mod acmd; -pub mod status; -pub mod opff; -pub mod material_table; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pickel"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + fire::install(); + forge::install(); + melt::install(); + trolley::install(); + material_table::install(); } diff --git a/fighters/pickel/src/melt/acmd.rs b/fighters/pickel/src/melt/acmd.rs new file mode 100644 index 0000000000..c17e1fd640 --- /dev/null +++ b/fighters/pickel/src/melt/acmd.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_water_landing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } +} + +unsafe extern "C" fn sound_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swim_middle_01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_passive", game_passive); + agent.acmd("effect_passive", effect_passive); + agent.acmd("sound_passive", sound_passive); +} diff --git a/fighters/pickel/src/melt/mod.rs b/fighters/pickel/src/melt/mod.rs new file mode 100644 index 0000000000..b12a8ea383 --- /dev/null +++ b/fighters/pickel/src/melt/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pickel_melt"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/opff.rs b/fighters/pickel/src/opff.rs index 684d81cc0a..460efe290d 100644 --- a/fighters/pickel/src/opff.rs +++ b/fighters/pickel/src/opff.rs @@ -3,50 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_FAILED, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL_SPECIAL - ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - } - } - } -} - -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - fastfall_specials(fighter); - material_handling(fighter, boma); - hitstun_handling(fighter, boma, frame); - table_recreate(fighter, boma, status_kind); - build_ecb_shift(boma, status_kind); - elytra_cancel(boma, status_kind); - guardoff_shield(fighter, boma, frame); - appeal_lw_loop(fighter, boma, frame); - training_mode_resources(fighter, boma, status_kind, stick_x, stick_y); - //logging_for_acmd(boma, status_kind); -} - unsafe fn material_handling(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { // wait 2 frames before letting the material table advance, preventing any jumps in entries if !VarModule::is_flag(boma.object(), vars::pickel::instance::SHOULD_CYCLE_MATERIAL) { @@ -384,6 +340,50 @@ unsafe fn logging_for_acmd(boma: &mut BattleObjectModuleAccessor, status_kind: i } } +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_FAILED, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL_SPECIAL + ]) + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + } + } + } +} + +pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + fastfall_specials(fighter); + material_handling(fighter, boma); + hitstun_handling(fighter, boma, frame); + table_recreate(fighter, boma, status_kind); + build_ecb_shift(boma, status_kind); + elytra_cancel(boma, status_kind); + guardoff_shield(fighter, boma, frame); + appeal_lw_loop(fighter, boma, frame); + training_mode_resources(fighter, boma, status_kind, stick_x, stick_y); + //logging_for_acmd(boma, status_kind); +} + pub extern "C" fn pickel_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { common::opff::fighter_common_opff(fighter); @@ -397,64 +397,6 @@ pub unsafe fn pickel_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -/// /// -/// WEAPON FRAMES /// -/// /// - -// minecart -pub unsafe extern "C" fn pickel_trolley_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - // Burn double jump when jumping out of Minecart - if boma.is_situation(*SITUATION_KIND_AIR) - && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP) { - if MotionModule::frame(pickel_boma) <= 1.0 - && pickel_boma.get_num_used_jumps() < pickel_boma.get_jump_count_max() { - WorkModule::inc_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - } - } - // Restore double jump when landing with Minecart - if boma.is_situation(*SITUATION_KIND_GROUND) - && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE) { - if pickel_boma.get_num_used_jumps() >= pickel_boma.get_jump_count_max() { - WorkModule::dec_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - } - } - } - } -} - -// anvil -pub unsafe extern "C" fn pickel_forge_frame(weapon: &mut smash::lua2cpp::L2CFighterBase){ - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), - Hash40::new("attack_air_lw_2"), - Hash40::new("attack_air_lw_fall"),]) - && !boma.is_situation(*SITUATION_KIND_GROUND) - //&& !pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START) - && WorkModule::is_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK){ - MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_GAME, Hash40::new("game_fallattackride"), -1); - } - } - } -} -pub fn install() { - smashline::Agent::new("pickel") - .on_line(Main, pickel_frame_wrapper) - .install(); - smashline::Agent::new("pickel_trolley") - .on_line(Main, pickel_trolley_frame) - .install(); - smashline::Agent::new("pickel_forge") - .on_line(Main, pickel_forge_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_frame_wrapper); } diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status.rs deleted file mode 100644 index 25ac2dc08c..0000000000 --- a/fighters/pickel/src/status.rs +++ /dev/null @@ -1,391 +0,0 @@ -use super::*; -use globals::*; -// status script import - -// prevent steve from spawning the crafting table through vanilla circumstances - -unsafe extern "C" fn recreate_table(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) - || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { - VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); - StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry - - return 1.into(); - } - - smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) -} - -// prevent steve's shield from being locked in place after it is damaged (vanilla bug) - -unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_GuardDamage() -} - -// lets the "stuff" article generate in new statuses -#[skyline::hook(offset = 0xf13d5c, inline)] -unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { - let new_shield_statuses = &[ - 0x1B, // GUARD_ON - 0x1C // GUARD - ]; - let status = *ctx.registers[0].x.as_ref(); - if new_shield_statuses.contains(&status) { - *ctx.registers[0].x.as_mut() = 0x1E; - } -} - -// keep shield article visible while shielding - -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - if !ArticleModule::is_exist(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF){ - ArticleModule::generate_article(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); - ArticleModule::set_rate(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, 0.0); - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_GUARD)(fighter) -} - -// handles the removal of steves resources when respawning - -pub unsafe extern "C" fn rebirth(fighter: &mut L2CFighterCommon) -> L2CValue { - let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); - let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); - let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); - let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); - let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); - let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); - let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); - let reduce_half: [[i32;2];4] = [ // these materials will be reduced by 50% on respawn - [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood], - [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], - [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron]]; - for material in reduce_half { - if material[1] > 1 { - let reduction = (material[1] / 2); - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), material[0], reduction); - } - } - if gold > 0 { // remove all gold - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_GOLD, gold); - } - if diamond > 0 { // remove all diamonds - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, diamond); - } - let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); - if redstone > init_rstn { // reduce redstone to starting value - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, (redstone - init_rstn)); - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) -} - -// handles materials when steve is entering the match, to account for salty runbacks - -pub unsafe extern "C" fn entry(fighter: &mut L2CFighterCommon) -> L2CValue { - let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); - let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); - let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); - let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); - let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); - let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); - let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); - let remove_mats: [[i32;2];4] = [ // these materials will be removed on entry - [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], - [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron], - [*FIGHTER_PICKEL_MATERIAL_KIND_GOLD, dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, wood]]; - for material in remove_mats { - let (kind, has) = (material[0], material[1]); - if has > 0 { - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, has); - } - } - let init_dirt = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_grade_1_num")); - let init_wood = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_wood_num")); - let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); - let init_mats: [[i32;3];3] = [ // these materials will be reverted to the initial amount defined in params - [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt, init_dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood, init_wood], - [*FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, redstone, init_rstn]]; - for material in init_mats { - let (kind, has, init) = (material[0], material[1], material[2]); - if has > init { - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, (has - init)); - } else if has < init { - FighterSpecializer_Pickel::add_material_num(fighter.boma(), kind, (init - has)); - } - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ENTRY)(fighter) -} - -unsafe extern "C" fn attack_air_lw_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if pickel_attack_que(fighter).get_bool() { - return 0.into(); - } - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME); - let mut generate = false; - if ArticleModule::is_generatable(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { - if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME) <= 0 - || !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { - generate = true; - } - } - if !FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { - generate = false; - } - let mot = if generate { - KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - Hash40::new("attack_air_lw") - } - else { - Hash40::new("attack_air_lw_fail") - }; - MotionModule::change_motion( - fighter.module_accessor, - mot, - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - WorkModule::set_flag(fighter.module_accessor, generate, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_IS_GENERATE_FORGE); - if generate { - let jump_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - WorkModule::set_int(fighter.module_accessor, jump_count, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_COUNT_BACKUP); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_LAMDING_RECOVER); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_FORGE_LANDING); - fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_start_main_loop as *const () as _)) - } - else { - fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_fail_main_status_loop as *const () as _)) - } -} - -unsafe extern "C" fn attack_air_lw_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if MotionModule::is_end(fighter.module_accessor) { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_air_lw") { - fighter.change_status(FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_LOOP.into(), false.into()); - return 0.into(); - } - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - return 0.into(); - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); - if FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { - let attack_air_lw_interval = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), hash40("attack_air_lw_interval")); - WorkModule::set_int(fighter.module_accessor, attack_air_lw_interval, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME); - let anvil_iron_count = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), 0x188e0b0db2) + 2; - FighterSpecializer_Pickel::sub_material_num(fighter.module_accessor, *FIGHTER_PICKEL_MATERIAL_KIND_IRON, anvil_iron_count); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, false, -1); - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE) { - LinkModule::send_event_parents(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE, Hash40::new_raw(0x11d608f91f)); - } - } - } - if !StatusModule::is_changing(fighter.module_accessor) - && StatusModule::is_situation_changed(fighter.module_accessor) - && fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - } - pickel_attack_catch_item(fighter); - attack_air_lw_dead_area(fighter); - 0.into() -} - -pub unsafe extern "C" fn pickel_attack_que(fighter: &mut L2CFighterCommon) -> L2CValue { - let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - if !FighterSpecializer_Pickel::is_status_kind_attack(prev_status) { - fighter.sub_GetLightItemImm(L2CValue::Void()); - if StatusModule::status_kind_que_from_script(fighter.module_accessor) as i32 != *STATUS_KIND_NONE { - return true.into(); - } - } - false.into() -} - -pub unsafe extern "C" fn pickel_attack_catch_item(fighter: &mut L2CFighterCommon) { - let catch_frame_param = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - hash40("item_catch_frame_attack_3") - } else { - hash40("item_air_catch_frame") - }; - let catch_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("common"), catch_frame_param); - if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME) <= catch_frame { - fighter.sub_GetLightItemImm(L2CValue::Void()); - } -} - -unsafe extern "C" fn attack_air_lw_dead_area(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; - ModelModule::joint_global_position( - fighter.module_accessor, - Hash40::new("hip"), - pos, - true - ); - let check_dead = GroundUtility::check_dead_area(pos); - if check_dead != *GROUND_DEAD_AREA_CHECK_RESULT_OUTSIDE_UP { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } - else { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } - } -} - -pub unsafe extern "C" fn attack_air_lw_fail_main_status_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_AttackAir_Main_common().get_bool() { - fighter.sub_air_check_superleaf_fall_slowly(); - if !fighter.global_table[IS_STOPPING].get_bool() { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec_fix_pos(); - } - 0.into() - } else { - 1.into() - } -} - -pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - let hasIron = WorkModule::get_int(fighter.module_accessor,*FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON) > 0; - let trolleyArticle = ArticleModule::is_exist(fighter.module_accessor,*FIGHTER_PICKEL_GENERATE_ARTICLE_TROLLEY); - let canCart = hasIron && !trolleyArticle; - if canCart { - VarModule::on_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); - } - - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) -} - -// Prevents side special from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) - && VarModule::is_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -// Re-enables the ability to use side special when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - let still_SideSpecial = fighter.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_RIDE, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE - ] - ); - - if (!fighter.is_situation(*SITUATION_KIND_AIR) && !still_SideSpecial) - || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); - } - - return true.into(); -} - -unsafe extern "C" fn pickel_jump_status_check(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_prev_status_one_of(&[ - *FIGHTER_PICKEL_STATUS_KIND_ATTACK_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N3_JUMP]) { - return false.into(); - } else { - return true.into(); - } -} - -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() - { - return 1.into(); - } else { - if pickel_jump_status_check(fighter).get_bool() { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(*KINETIC_TYPE_NONE), - L2CValue::I32( - *FS_SUCCEEDS_KEEP_EFFECT - | *FS_SUCCEEDS_KEEP_SOUND - | *FS_SUCCEEDS_KEEP_TRANSITION - | *FS_SUCCEEDS_KEEP_CANCEL, - ), - ); - } else { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0), - ); - } - return 0.into(); - } -} - -extern "C" fn pickel_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != FIGHTER_KIND_PICKEL { - return; - } - - // set callbacks and variables on fighter init - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - VarModule::on_flag(fighter.battle_object, vars::pickel::instance::SHOULD_CYCLE_MATERIAL); - VarModule::off_flag(fighter.battle_object, vars::pickel::instance::SHOULD_RESET_ROT); - VarModule::set_int(fighter.battle_object, vars::pickel::instance::MATERIAL_INDEX, 0); - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); - VarModule::set_int(fighter.battle_object, vars::pickel::instance::HITSTUN_TIMER, 0); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::DAMAGE_TRACKER, 0.0); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::TABLE_HP_TRACKER, 20.0); - - } -} -pub fn install() { - skyline::install_hooks!( - stuff_hook - ); - smashline::Agent::new("pickel") - .status( - Main, - *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, - recreate_table, - ) - .status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre) - .status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end) - .status(Main, *FIGHTER_STATUS_KIND_GUARD, guard) - .status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth) - .status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry) - .status( - Main, - *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, - attack_air_lw_start_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .on_start(pickel_init) - .install(); -} diff --git a/fighters/pickel/src/status/attack_air_lw.rs b/fighters/pickel/src/status/attack_air_lw.rs new file mode 100644 index 0000000000..e1bcdfb16a --- /dev/null +++ b/fighters/pickel/src/status/attack_air_lw.rs @@ -0,0 +1,143 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR_LW_START + +unsafe extern "C" fn attack_air_lw_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if pickel_attack_que(fighter).get_bool() { + return 0.into(); + } + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME); + let mut generate = false; + if ArticleModule::is_generatable(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { + if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME) <= 0 + || !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { + generate = true; + } + } + if !FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { + generate = false; + } + let mot = if generate { + KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + Hash40::new("attack_air_lw") + } + else { + Hash40::new("attack_air_lw_fail") + }; + MotionModule::change_motion( + fighter.module_accessor, + mot, + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + WorkModule::set_flag(fighter.module_accessor, generate, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_IS_GENERATE_FORGE); + if generate { + let jump_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + WorkModule::set_int(fighter.module_accessor, jump_count, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_COUNT_BACKUP); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_LAMDING_RECOVER); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_FORGE_LANDING); + fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_start_main_loop as *const () as _)) + } + else { + fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_fail_main_status_loop as *const () as _)) + } +} + +unsafe extern "C" fn attack_air_lw_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if MotionModule::is_end(fighter.module_accessor) { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_air_lw") { + fighter.change_status(FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_LOOP.into(), false.into()); + return 0.into(); + } + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + return 0.into(); + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); + if FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { + let attack_air_lw_interval = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), hash40("attack_air_lw_interval")); + WorkModule::set_int(fighter.module_accessor, attack_air_lw_interval, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME); + let anvil_iron_count = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), 0x188e0b0db2) + 2; + FighterSpecializer_Pickel::sub_material_num(fighter.module_accessor, *FIGHTER_PICKEL_MATERIAL_KIND_IRON, anvil_iron_count); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, false, -1); + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE) { + LinkModule::send_event_parents(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE, Hash40::new_raw(0x11d608f91f)); + } + } + } + if !StatusModule::is_changing(fighter.module_accessor) + && StatusModule::is_situation_changed(fighter.module_accessor) + && fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + } + pickel_attack_catch_item(fighter); + attack_air_lw_dead_area(fighter); + 0.into() +} + +pub unsafe extern "C" fn pickel_attack_que(fighter: &mut L2CFighterCommon) -> L2CValue { + let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); + if !FighterSpecializer_Pickel::is_status_kind_attack(prev_status) { + fighter.sub_GetLightItemImm(L2CValue::Void()); + if StatusModule::status_kind_que_from_script(fighter.module_accessor) as i32 != *STATUS_KIND_NONE { + return true.into(); + } + } + false.into() +} + +pub unsafe extern "C" fn pickel_attack_catch_item(fighter: &mut L2CFighterCommon) { + let catch_frame_param = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + hash40("item_catch_frame_attack_3") + } else { + hash40("item_air_catch_frame") + }; + let catch_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("common"), catch_frame_param); + if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME) <= catch_frame { + fighter.sub_GetLightItemImm(L2CValue::Void()); + } +} + +unsafe extern "C" fn attack_air_lw_dead_area(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; + ModelModule::joint_global_position( + fighter.module_accessor, + Hash40::new("hip"), + pos, + true + ); + let check_dead = GroundUtility::check_dead_area(pos); + if check_dead != *GROUND_DEAD_AREA_CHECK_RESULT_OUTSIDE_UP { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } + else { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } + } +} + +pub unsafe extern "C" fn attack_air_lw_fail_main_status_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_AttackAir_Main_common().get_bool() { + fighter.sub_air_check_superleaf_fall_slowly(); + if !fighter.global_table[IS_STOPPING].get_bool() { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec_fix_pos(); + } + 0.into() + } else { + 1.into() + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, attack_air_lw_start_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/entry.rs b/fighters/pickel/src/status/entry.rs new file mode 100644 index 0000000000..50651f4e72 --- /dev/null +++ b/fighters/pickel/src/status/entry.rs @@ -0,0 +1,46 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ENTRY + +// handles materials when steve is entering the match, to account for salty runbacks +pub unsafe extern "C" fn entry_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); + let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); + let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); + let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); + let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); + let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); + let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); + let remove_mats: [[i32;2];4] = [ // these materials will be removed on entry + [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], + [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron], + [*FIGHTER_PICKEL_MATERIAL_KIND_GOLD, dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, wood]]; + for material in remove_mats { + let (kind, has) = (material[0], material[1]); + if has > 0 { + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, has); + } + } + let init_dirt = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_grade_1_num")); + let init_wood = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_wood_num")); + let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); + let init_mats: [[i32;3];3] = [ // these materials will be reverted to the initial amount defined in params + [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt, init_dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood, init_wood], + [*FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, redstone, init_rstn]]; + for material in init_mats { + let (kind, has, init) = (material[0], material[1], material[2]); + if has > init { + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, (has - init)); + } else if has < init { + FighterSpecializer_Pickel::add_material_num(fighter.boma(), kind, (init - has)); + } + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ENTRY)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/guard.rs b/fighters/pickel/src/status/guard.rs new file mode 100644 index 0000000000..13fa1c6a08 --- /dev/null +++ b/fighters/pickel/src/status/guard.rs @@ -0,0 +1,32 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD + +// keep shield article visible while shielding +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !ArticleModule::is_exist(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF){ + ArticleModule::generate_article(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); + ArticleModule::set_rate(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, 0.0); + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_GUARD)(fighter) +} + +// FIGHTER_STATUS_KIND_GUARD_DAMAGE + +// prevent steve's shield from being locked in place after it is damaged (vanilla bug) +unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_GuardDamage() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre); + agent.status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/jump.rs b/fighters/pickel/src/status/jump.rs new file mode 100644 index 0000000000..29f6956868 --- /dev/null +++ b/fighters/pickel/src/status/jump.rs @@ -0,0 +1,49 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP + +unsafe extern "C" fn pickel_jump_status_check(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_prev_status_one_of(&[ + *FIGHTER_PICKEL_STATUS_KIND_ATTACK_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N3_JUMP]) { + return false.into(); + } else { + return true.into(); + } +} + +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() + { + return 1.into(); + } else { + if pickel_jump_status_check(fighter).get_bool() { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(*KINETIC_TYPE_NONE), + L2CValue::I32( + *FS_SUCCEEDS_KEEP_EFFECT + | *FS_SUCCEEDS_KEEP_SOUND + | *FS_SUCCEEDS_KEEP_TRANSITION + | *FS_SUCCEEDS_KEEP_CANCEL, + ), + ); + } else { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0), + ); + } + return 0.into(); + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/mod.rs b/fighters/pickel/src/status/mod.rs new file mode 100644 index 0000000000..abfd373d47 --- /dev/null +++ b/fighters/pickel/src/status/mod.rs @@ -0,0 +1,48 @@ +use super::*; +use globals::*; +// status script import + +mod attack_air_lw; +mod entry; +mod guard; +mod jump; +mod rebirth; +mod recreate_table; +mod special_s; + +// lets the "stuff" article generate in new statuses +#[skyline::hook(offset = 0xf13d5c, inline)] +unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { + let new_shield_statuses = &[ + 0x1B, // GUARD_ON + 0x1C // GUARD + ]; + let status = *ctx.registers[0].x.as_ref(); + if new_shield_statuses.contains(&status) { + *ctx.registers[0].x.as_mut() = 0x1E; + } +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::on_flag(fighter.battle_object, vars::pickel::instance::SHOULD_CYCLE_MATERIAL); + VarModule::off_flag(fighter.battle_object, vars::pickel::instance::SHOULD_RESET_ROT); + VarModule::set_int(fighter.battle_object, vars::pickel::instance::MATERIAL_INDEX, 0); + VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); + VarModule::set_int(fighter.battle_object, vars::pickel::instance::HITSTUN_TIMER, 0); + VarModule::set_float(fighter.battle_object, vars::pickel::instance::DAMAGE_TRACKER, 0.0); + VarModule::set_float(fighter.battle_object, vars::pickel::instance::TABLE_HP_TRACKER, 20.0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air_lw::install(agent); + entry::install(agent); + guard::install(agent); + jump::install(agent); + rebirth::install(agent); + recreate_table::install(agent); + special_s::install(agent); + + skyline::install_hooks!(stuff_hook); +} diff --git a/fighters/pickel/src/status/rebirth.rs b/fighters/pickel/src/status/rebirth.rs new file mode 100644 index 0000000000..2ec108722a --- /dev/null +++ b/fighters/pickel/src/status/rebirth.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +// handles the removal of steves resources when respawning +pub unsafe extern "C" fn rebirth_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); + let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); + let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); + let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); + let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); + let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); + let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); + let reduce_half: [[i32;2];4] = [ // these materials will be reduced by 50% on respawn + [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood], + [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], + [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron]]; + for material in reduce_half { + if material[1] > 1 { + let reduction = (material[1] / 2); + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), material[0], reduction); + } + } + if gold > 0 { // remove all gold + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_GOLD, gold); + } + if diamond > 0 { // remove all diamonds + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, diamond); + } + let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); + if redstone > init_rstn { // reduce redstone to starting value + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, (redstone - init_rstn)); + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/recreate_table.rs b/fighters/pickel/src/status/recreate_table.rs new file mode 100644 index 0000000000..b816de521e --- /dev/null +++ b/fighters/pickel/src/status/recreate_table.rs @@ -0,0 +1,20 @@ +use super::*; + +// FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE + +// prevent steve from spawning the crafting table through vanilla circumstances +unsafe extern "C" fn recreate_table_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) + || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { + VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); + StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry + + return 1.into(); + } + + smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, recreate_table_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/special_s.rs b/fighters/pickel/src/status/special_s.rs new file mode 100644 index 0000000000..734b0ff7dd --- /dev/null +++ b/fighters/pickel/src/status/special_s.rs @@ -0,0 +1,53 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + let hasIron = WorkModule::get_int(fighter.module_accessor,*FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON) > 0; + let trolleyArticle = ArticleModule::is_exist(fighter.module_accessor,*FIGHTER_PICKEL_GENERATE_ARTICLE_TROLLEY); + let canCart = hasIron && !trolleyArticle; + if canCart { + VarModule::on_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); + } + + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) +} + +// Prevents side special from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) + && VarModule::is_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +// Re-enables the ability to use side special when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + let still_SideSpecial = fighter.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_RIDE, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE + ] + ); + + if (!fighter.is_situation(*SITUATION_KIND_AIR) && !still_SideSpecial) + || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); + } + + return true.into(); +} + +unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(special_s_init); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); +} \ No newline at end of file diff --git a/fighters/pickel/src/trolley/acmd.rs b/fighters/pickel/src/trolley/acmd.rs new file mode 100644 index 0000000000..18ba54a7be --- /dev/null +++ b/fighters/pickel/src/trolley/acmd.rs @@ -0,0 +1,28 @@ +use super::*; + +unsafe extern "C" fn game_specialsdriveemptypartial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, 6.0, Some(0.0), Some(0.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 0, true); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, -6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 1, true); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 0.0, 6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 2, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_IIE, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_down_only(boma, 4, true); + } + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.5, 0.0, 3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + WorkModule::off_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsdriveemptypartial", game_specialsdriveemptypartial); +} diff --git a/fighters/pickel/src/trolley/mod.rs b/fighters/pickel/src/trolley/mod.rs new file mode 100644 index 0000000000..3dedba0568 --- /dev/null +++ b/fighters/pickel/src/trolley/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("pickel_trolley"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/trolley/opff.rs b/fighters/pickel/src/trolley/opff.rs new file mode 100644 index 0000000000..140868ac32 --- /dev/null +++ b/fighters/pickel/src/trolley/opff.rs @@ -0,0 +1,32 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pickel_trolley_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + // Burn double jump when jumping out of Minecart + if boma.is_situation(*SITUATION_KIND_AIR) + && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP) { + if MotionModule::frame(pickel_boma) <= 1.0 + && pickel_boma.get_num_used_jumps() < pickel_boma.get_jump_count_max() { + WorkModule::inc_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + } + } + // Restore double jump when landing with Minecart + if boma.is_situation(*SITUATION_KIND_GROUND) + && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE) { + if pickel_boma.get_num_used_jumps() >= pickel_boma.get_jump_count_max() { + WorkModule::dec_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_trolley_frame); +} diff --git a/fighters/pikachu/src/acmd/aerials.rs b/fighters/pikachu/src/acmd/aerials.rs index 058306d966..1182d759d8 100644 --- a/fighters/pikachu/src/acmd/aerials.rs +++ b/fighters/pikachu/src/acmd/aerials.rs @@ -1,319 +1,286 @@ use super::*; -unsafe extern "C" fn pikachu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 77, 0, 48, 6.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 77, 0, 48, 6.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, 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_BODY); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 24.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 77, 0, 48, 5.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 6.0, 24.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 77, 0, 48, 5.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pikachu_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_elec_spark"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_elec_spark"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.65, true); EffectModule::enable_sync_init_pos_last(boma); - BURN_COLOR(fighter, 0.4, 0.6, 4, 0.7); + BURN_COLOR(agent, 0.4, 0.6, 4, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 2, 0.4, 0.6, 4, 0); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 2, 0.4, 0.6, 4, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 0.4, 0.6, 4, 0.7); + if is_excute(agent) { + BURN_COLOR(agent, 0.4, 0.6, 4, 0.7); } frame(lua_state, 12.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 2, 0.4, 0.6, 4, 0); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 2, 0.4, 0.6, 4, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_elec_spark"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_elec_spark"), false, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek"), false, true); } } -unsafe extern "C" fn pikachu_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 35, 100, 50, 0, 2.0, 0.0, 1.5, 9.5, Some(0.0), Some(1.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 290, 100, 45, 0, 2.0, 0.0, 9.5, 9.5, Some(0.0), Some(9.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 60, 100, 35, 0, 2.0, 0.0, 1.5, 13.0, Some(0.0), Some(1.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 280, 100, 35, 0, 2.0, 0.0, 9.5, 13.0, Some(0.0), Some(9.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 35, 100, 50, 0, 2.0, 0.0, 1.5, 9.5, Some(0.0), Some(1.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 290, 100, 45, 0, 2.0, 0.0, 9.5, 9.5, Some(0.0), Some(9.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 60, 100, 35, 0, 2.0, 0.0, 1.5, 13.0, Some(0.0), Some(1.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 280, 100, 35, 0, 2.0, 0.0, 9.5, 13.0, Some(0.0), Some(9.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 154, 0, 40, 6.0, 0.0, 5.5, 12.0, Some(0.0), Some(5.5), Some(9.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 154, 0, 40, 6.0, 0.0, 5.5, 12.0, Some(0.0), Some(5.5), Some(9.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 111, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 361, 111, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 111, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 361, 111, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 3.0, -15.0, 0, 0, 0, 1.4, true, 1.0); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 3.0, -15.0, 0, 0, 0, 1.4, true, 1.0); + LAST_EFFECT_SET_RATE(agent, 2); } - } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_pikachu_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); - PLAY_SE(fighter, Hash40::new("se_pikachu_tailswing")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_pikachu_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_common_swing_04")); + PLAY_SE(agent, Hash40::new("se_pikachu_tailswing")); } - -} - -unsafe extern "C" fn game_landingairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - } -unsafe extern "C" fn expression_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 80, 100, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 80, 100, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 80, 100, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 80, 100, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 7.5, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 0, 60, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 0, 60, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + FT_MOTION_RATE_RANGE(agent, 5.0, 7.5, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 0, 60, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 0, 60, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 7.5); - FT_MOTION_RATE_RANGE(fighter, 7.5, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 130, 80, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SLAP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 130, 80, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SLAP, *ATTACK_REGION_TAIL); + FT_MOTION_RATE_RANGE(agent, 7.5, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 130, 80, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SLAP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 130, 80, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SLAP, *ATTACK_REGION_TAIL); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn expression_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("neck"), 13.0, 270, 82, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 13.0, 270, 82, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("neck"), 13.0, 270, 59, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 13.0, 270, 59, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 12.0, 361, 100, 0, 20, 5.7, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 12.0, 361, 100, 0, 20, 5.7, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_HEAD); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_landingairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); -unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairf", game_attackairf); -unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_landingairb", stub); -unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attackairn", pikachu_attack_air_n_game) - .acmd("effect_attackairn", pikachu_attack_air_n_effect) - .acmd("expression_attackairn", pikachu_attack_air_n_expression) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("game_landingairb", game_landingairb) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_landingairlw", game_landingairlw) - .acmd("effect_landingairlw", effect_landingairlw) - .acmd("expression_landingairlw", expression_landingairlw) - .acmd("sound_landingairlw", sound_landingairlw) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("effect_landingairlw", stub); + agent.acmd("sound_landingairlw", stub); + agent.acmd("expression_landingairlw", stub); } diff --git a/fighters/pikachu/src/acmd/ground.rs b/fighters/pikachu/src/acmd/ground.rs index 3cb1307aac..ed1588f3a1 100644 --- a/fighters/pikachu/src/acmd/ground.rs +++ b/fighters/pikachu/src/acmd/ground.rs @@ -1,28 +1,25 @@ use super::*; -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 5.0, 2.2, -1.1, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 5.0, 2.2, -1.1, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 4.0, 2.2, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 4.0, 2.2, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikachu/src/acmd/mod.rs b/fighters/pikachu/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/pikachu/src/acmd/mod.rs +++ b/fighters/pikachu/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pikachu/src/acmd/other.rs b/fighters/pikachu/src/acmd/other.rs index b6da0cc5b9..00826f98b7 100644 --- a/fighters/pikachu/src/acmd/other.rs +++ b/fighters/pikachu/src/acmd/other.rs @@ -1,209 +1,113 @@ - 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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_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(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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_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_pikachu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pikachu_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, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikachu_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikachu_step_left_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikachu_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikachu_step_right_l")); } } -unsafe extern "C" fn pikachu_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, 14.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 pikachu_kaminari_regular_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"), 6.0, 270, 60, 125, 55, 6.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f::new(0.0, -100.0), 24, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 60, 0, 74, 7.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - -} - -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("pikachu") - .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", pikachu_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("pikachu_kaminari") - .acmd("game_regular", pikachu_kaminari_regular_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); } diff --git a/fighters/pikachu/src/acmd/smashes.rs b/fighters/pikachu/src/acmd/smashes.rs index 764b345f0b..df2f9fb110 100644 --- a/fighters/pikachu/src/acmd/smashes.rs +++ b/fighters/pikachu/src/acmd/smashes.rs @@ -1,140 +1,135 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 11.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 11.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 50, 3.6, 0.0, 7.0, 14.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 50, 3.6, 0.0, 7.0, 14.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_NONE); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 60, 3.6, 0.0, 7.0, 18.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 60, 3.6, 0.0, 7.0, 18.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_NONE); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 5.5, 0.0, 7.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 5.5, 0.0, 7.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 4.5, 0.0, 7.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 4.5, 0.0, 7.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_elec_shock"), Hash40::new("top"), 0, 7, 10.5, 0, 0, 0, 0.9, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_elec_shock"), Hash40::new("top"), 0, 7, 10.5, 0, 0, 0, 0.9, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek_elec"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek_elec"), false, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_elec_shock"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_elec_shock"), false, true); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek2"), false, true); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 15.0, 87, 97, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 15.0, 87, 97, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 12.0, 85, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 12.0, 85, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 80, 50, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 80, 50, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, -10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, 10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 30, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, -10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, 10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 30, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 37, 206, 0, 51, 10.0, 0.0, 6.4, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, 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_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 37, 206, 0, 51, 10.0, 0.0, 6.4, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, 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_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pikachu/src/acmd/specials.rs b/fighters/pikachu/src/acmd/specials.rs index d6c781c96e..3cb4bdc31a 100644 --- a/fighters/pikachu/src/acmd/specials.rs +++ b/fighters/pikachu/src/acmd/specials.rs @@ -1,31 +1,28 @@ use super::*; -unsafe extern "C" fn pikachu_special_hi1_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("neck"), 2.0, 70, 100, 20, 0, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 70, 100, 20, 0, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); JostleModule::set_status(boma, false); } } -unsafe extern "C" fn game_speciallwhit(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"), 15.0, 361, 85, 0, 70, 13.0, 0.0, 10.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, 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_NONE); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 70, 13.0, 0.0, 10.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, 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_NONE); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_specialhi1", pikachu_special_hi1_game) - .acmd("game_specialairhi1", pikachu_special_hi1_game) - .acmd("game_speciallwhit", game_speciallwhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("game_speciallwhit", game_speciallwhit); } diff --git a/fighters/pikachu/src/acmd/throws.rs b/fighters/pikachu/src/acmd/throws.rs index 47d45a4e18..07eac50a75 100644 --- a/fighters/pikachu/src/acmd/throws.rs +++ b/fighters/pikachu/src/acmd/throws.rs @@ -1,126 +1,121 @@ use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 3.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.9, 0.0, Some(0.0), Some(5.9), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.9, 0.0, Some(0.0), Some(5.9), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 150, 0, 48, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 150, 0, 48, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 60, 0, 70, 5.5, 0.0, 14.0, 1.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 60, 0, 70, 5.5, 0.0, 14.0, 1.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 25); + CHECK_FINISH_CAMERA(agent, 1, 25); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -3, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 80, 0, 60, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -3, 3); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 80, 0, 60, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 3.0, 361, 0, 100, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 3.0, 361, 0, 100, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 0, 0); + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/pikachu/src/acmd/tilts.rs b/fighters/pikachu/src/acmd/tilts.rs index 81ff12df27..92775bd74b 100644 --- a/fighters/pikachu/src/acmd/tilts.rs +++ b/fighters/pikachu/src/acmd/tilts.rs @@ -1,130 +1,123 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 88, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 88, 100, 0, 45, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 7.0, 88, 100, 0, 45, 4.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 88, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 88, 100, 0, 45, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 7.0, 88, 100, 0, 45, 4.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 8.0, 361, 100, 0, 12, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 4.0, 0.0, 0.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 8.0, 361, 100, 0, 12, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 4.0, 0.0, 0.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pikachu/src/kaminari/acmd.rs b/fighters/pikachu/src/kaminari/acmd.rs new file mode 100644 index 0000000000..9d16fb9a3a --- /dev/null +++ b/fighters/pikachu/src/kaminari/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 270, 60, 125, 55, 6.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f::new(0.0, -100.0), 24, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 60, 0, 74, 7.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/pikachu/src/kaminari/mod.rs b/fighters/pikachu/src/kaminari/mod.rs new file mode 100644 index 0000000000..8be26035f7 --- /dev/null +++ b/fighters/pikachu/src/kaminari/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pikachu_kaminari"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pikachu/src/lib.rs b/fighters/pikachu/src/lib.rs index 7bcc1676ad..11b1d29acf 100644 --- a/fighters/pikachu/src/lib.rs +++ b/fighters/pikachu/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod kaminari; use smash::{ lib::{ @@ -37,8 +41,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("pikachu"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + kaminari::install(); } diff --git a/fighters/pikachu/src/opff.rs b/fighters/pikachu/src/opff.rs index 221d16e5d7..b023887b31 100644 --- a/fighters/pikachu/src/opff.rs +++ b/fighters/pikachu/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // Disable QA jump cancels if not directly QA into the ground unsafe fn disable_qa_jc(boma: &mut BattleObjectModuleAccessor) { if StatusModule::is_changing(boma) { @@ -127,8 +126,7 @@ pub unsafe fn pikachu_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma); } } -pub fn install() { - smashline::Agent::new("pikachu") - .on_line(Main, pikachu_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pikachu_frame_wrapper); } diff --git a/fighters/pikmin/src/acmd/aerials.rs b/fighters/pikmin/src/acmd/aerials.rs index ac5636789a..1021848270 100644 --- a/fighters/pikmin/src/acmd/aerials.rs +++ b/fighters/pikmin/src/acmd/aerials.rs @@ -2,325 +2,318 @@ use super::*; use globals::*; use std::ops::Index; -unsafe extern "C" fn olimar_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 1.0); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 7.0, 3.0); + frame(lua_state, 7.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 23.0, 20.0); + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 10.0); - if is_excute(fighter) { + frame(lua_state, 11.0); + if is_excute(agent) { + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 23.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 42.0); - if is_excute(fighter) { + frame(lua_state, 40.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n01")); } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n02")); } + wait(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n03")); + } +} +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + } frame(lua_state, 5.0); - if is_excute(fighter) { - if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 6.0); + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); } + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 20.0); - if is_excute(fighter) { + frame(lua_state, 10.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 42.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } - frame(lua_state, 6.0); - if is_excute(fighter) { + frame(lua_state, 4.0); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - - //With Pikmin - frame(lua_state, 7.0); - if is_excute(fighter) { + frame(lua_state, 5.0); + if is_excute(agent) { if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } - } - - frame(lua_state, 34.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, true, 0); - } -} - -unsafe extern "C" fn olimar_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - frame(lua_state, 25.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } frame(lua_state, 32.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 6.0, 35, 120, 0, 50, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 35, 120, 0, 50, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 6.0, 35, 120, 0, 50, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 35, 120, 0, 50, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } - } -unsafe extern "C" fn olimar_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - //With Pikmin frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - //Without Pikmin frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count == 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - FT_MOTION_RATE_RANGE(fighter, 2.0, 7.0, 3.0); - frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 23.0, 20.0); - if is_excute(fighter) { - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - } + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 11.0); - if is_excute(fighter) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); } } - frame(lua_state, 18.0); - if is_excute(fighter) { - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); - } - } - frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + frame(lua_state, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 40.0); - if is_excute(fighter) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } - } -unsafe extern "C" fn effect_attackairn(fighter: &mut L2CAgentBase) { } - -unsafe extern "C" fn sound_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n01")); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n02")); + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n03")); + //With Pikmin + frame(lua_state, 7.0); + if is_excute(agent) { + if (pikmin_count != 0) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + } + frame(lua_state, 34.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn expression_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 25.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, true, 0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -pub fn install() { - smashline::Agent::new("pikmin") - .acmd("game_attackairf", olimar_attack_air_f_game) - .acmd("expression_attackairf", olimar_attack_air_f_expression) - .acmd("game_attackairhi", olimar_attack_air_hi_game) - .acmd("expression_attackairhi", olimar_attack_air_hi_expression) - .acmd("game_attackairlw", olimar_attack_air_lw_game) - .acmd("game_attackairb", olimar_attack_air_b_game) - .acmd("expression_attackairb", olimar_attack_air_b_expression) - .acmd("game_attackairn", olimar_attack_air_n_game) - .acmd("effect_attackairn", effect_attackairn) - .acmd("sound_attackairn", sound_attackairn) - .acmd("expression_attackairn", expression_attackairn) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", stub); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pikmin/src/acmd/ground.rs b/fighters/pikmin/src/acmd/ground.rs index b1a0eb26db..67ff7a6de3 100644 --- a/fighters/pikmin/src/acmd/ground.rs +++ b/fighters/pikmin/src/acmd/ground.rs @@ -1,66 +1,65 @@ use super::*; -unsafe extern "C" fn pikmin_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.4, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 180, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.4, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 180, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 180, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 180, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pikmin_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 80, 0, 40, 2.8, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 45, 80, 0, 40, 3.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 80, 0, 40, 2.8, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 45, 80, 0, 40, 3.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.5); } } -unsafe extern "C" fn pikmin_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 7.0, 68, 50, 0, 30, 5.0, 0.0, 7.7, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 7.0, 68, 50, 0, 30, 5.0, 0.0, 7.7, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("trans"), 4.0, 75, 50, 0, 90, 4.5, 0.0, 7.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("trans"), 4.0, 75, 50, 0, 90, 4.5, 0.0, 7.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pikmin") - .acmd("game_attack11", pikmin_attack_11_game) - .acmd("game_attack12", pikmin_attack_12_game) - .acmd("game_attackdash", pikmin_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikmin/src/acmd/mod.rs b/fighters/pikmin/src/acmd/mod.rs index f328554ba5..ab44329253 100644 --- a/fighters/pikmin/src/acmd/mod.rs +++ b/fighters/pikmin/src/acmd/mod.rs @@ -1,20 +1,20 @@ use super::*; use smash::lib::lua_const::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index cafb2f2a70..8b002a94d0 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -1,209 +1,83 @@ - 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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_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_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_pikmin_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pikmin_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, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikmin_step_right_ll")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikmin_step_right_ll")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikmin_step_left_ll")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikmin_step_left_ll")); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectuvekt F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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("pikmin") - .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("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) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pikmin/src/acmd/smashes.rs b/fighters/pikmin/src/acmd/smashes.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/pikmin/src/acmd/smashes.rs +++ b/fighters/pikmin/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index 943dd2f6da..8ce28871ac 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -1,80 +1,74 @@ use super::*; -unsafe extern "C" fn pikmin_special_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_SPECIAL_S_FLAG_THROW); } } -unsafe extern "C" fn pikmin_special_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, WorkModule::get_float(boma, *FIGHTER_PIKMIN_STATUS_PULL_OUT_WORK_FLOAT_MOT_RATE)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn pikmin_special_n_failure(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(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) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_SPECIAL_LW_FLAG_SORT); // damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 7.5, 0.0, 7.0, -8.5, 0.0, 7.0, 8.5, 1.0, 0.8, 50, false, 0.8, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 7.5, 0.0, 7.0, -8.5, 0.0, 7.0, 8.5, 1.0, 0.8, 50, false, 0.8, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } -unsafe extern "C" fn effect_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_order"), Hash40::new("s_antenna4"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pikmin_order"), Hash40::new("s_antenna4"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pikmin_seiretsu"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pikmin_seiretsu"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } -pub fn install() { - smashline::Agent::new("pikmin") - .acmd("game_specials", pikmin_special_s) - .acmd("game_specialairs", pikmin_special_s) - .acmd("game_specialnstart", pikmin_special_n) - .acmd("game_specialnfailure", pikmin_special_n_failure) - .acmd("game_specialairnfailure", pikmin_special_n_failure) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("effect_speciallw", effect_speciallw) - .acmd("effect_specialairlw", effect_speciallw) - .install(); -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnfailure", stub); + agent.acmd("game_specialairnfailure", stub); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); +} \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/throws.rs b/fighters/pikmin/src/acmd/throws.rs index b46e3acdb5..3370df1a53 100644 --- a/fighters/pikmin/src/acmd/throws.rs +++ b/fighters/pikmin/src/acmd/throws.rs @@ -1,3 +1,3 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 87719a5971..209c16cfb6 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -1,78 +1,75 @@ use super::*; -unsafe extern "C" fn pikmin_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.641); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.641); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 3.5, 0.0, 5.0, 13.5, Some(0.0), Some(5.0), Some(9.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 2.2, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 3.5, 0.0, 5.0, 13.5, Some(0.0), Some(5.0), Some(9.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 2.2, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pikmin_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 4.5, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 3.5, -1.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 4.5, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 3.5, -1.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pikmin_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, 3.0, 4.0, 5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, -3.0, 4.0, -5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 0.6, 367, 100, 0, 45, 5.0, 3.0, 0.0, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, 3.0, 4.0, 5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, -3.0, 4.0, -5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 0.6, 367, 100, 0, 45, 5.0, 3.0, 0.0, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("trans"), 4.0, 90, 100, 0, 70, 6.0, 0.0, 8.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("trans"), 4.0, 90, 100, 0, 70, 6.0, 0.0, 8.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikmin") - .acmd("game_attacks3", pikmin_attack_s3_s_game) - .acmd("game_attacklw3", pikmin_attack_lw3_game) - .acmd("game_attackhi3", pikmin_attack_hi3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attacklw3", game_attacklw3); + + agent.acmd("game_attackhi3", game_attackhi3); } diff --git a/fighters/pikmin/src/lib.rs b/fighters/pikmin/src/lib.rs index 991904067c..0976ddb828 100644 --- a/fighters/pikmin/src/lib.rs +++ b/fighters/pikmin/src/lib.rs @@ -3,9 +3,13 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod pikmin; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +pub mod pikmin; use smash::{ lib::{ @@ -37,10 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); + let agent = &mut Agent::new("pikmin"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + pikmin::install(); - status::install(); - opff::install(); } diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 763a8e1c80..88fb19e4f2 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -169,8 +169,7 @@ pub unsafe fn pikmin_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pikmin") - .on_line(Main, pikmin_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pikmin_frame_wrapper); } diff --git a/fighters/pikmin/src/pikmin/acmd/aerials.rs b/fighters/pikmin/src/pikmin/acmd/aerials.rs index d16cb12ab1..daf6f6aa8d 100644 --- a/fighters/pikmin/src/pikmin/acmd/aerials.rs +++ b/fighters/pikmin/src/pikmin/acmd/aerials.rs @@ -3,201 +3,203 @@ use super::PikminInfo; use std::ops::Index; use globals::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 6.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 6.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 22.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 22.0, 20.0); + if is_excute(agent) { let dmg = 8.8; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 7.6; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 6.4; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn effect_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_attack_flash"), Hash40::new("waist"), 0, 0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_attack_flash"), Hash40::new("waist"), 0, 0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 8.0; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 11.2; - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 12.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 30, 4.0, 0.0, 5.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 20, 4.0, 0.0, -1.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 30, 4.0, 0.0, 5.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 20, 4.0, 0.0, -1.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 7.2; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 10.08; /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 79, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 79, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 59, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 59, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 6.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 50, 60, 0, 40, 2.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 50, 60, 0, 40, 2.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairn_y", game_attackairn) - .acmd("game_attackairn_b", game_attackairn) - .acmd("game_attackairn_w", game_attackairn) - .acmd("game_attackairn_v", game_attackairn) - .acmd("effect_attackairn", effect_attackairn) - .acmd("effect_attackairn_y", effect_attackairn) - .acmd("effect_attackairn_b", effect_attackairn) - .acmd("effect_attackairn_w", effect_attackairn) - .acmd("effect_attackairn_v", effect_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairf_y", game_attackairf) - .acmd("game_attackairf_b", game_attackairf) - .acmd("game_attackairf_w", game_attackairf) - .acmd("game_attackairf_v", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("game_attackairb_y", game_attackairb) - .acmd("game_attackairb_b", game_attackairb) - .acmd("game_attackairb_w", game_attackairb) - .acmd("game_attackairb_v", game_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairhi_y", game_attackairhi) - .acmd("game_attackairhi_b", game_attackairhi) - .acmd("game_attackairhi_w", game_attackairhi) - .acmd("game_attackairhi_v", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_attackairlw_y", game_attackairlw) - .acmd("game_attackairlw_b", game_attackairlw) - .acmd("game_attackairlw_w", game_attackairlw) - .acmd("game_attackairlw_v", game_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairn_y", game_attackairn); + agent.acmd("game_attackairn_b", game_attackairn); + agent.acmd("game_attackairn_w", game_attackairn); + agent.acmd("game_attackairn_v", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("effect_attackairn_y", effect_attackairn); + agent.acmd("effect_attackairn_b", effect_attackairn); + agent.acmd("effect_attackairn_w", effect_attackairn); + agent.acmd("effect_attackairn_v", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf_y", game_attackairf); + agent.acmd("game_attackairf_b", game_attackairf); + agent.acmd("game_attackairf_w", game_attackairf); + agent.acmd("game_attackairf_v", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairb_y", game_attackairb); + agent.acmd("game_attackairb_b", game_attackairb); + agent.acmd("game_attackairb_w", game_attackairb); + agent.acmd("game_attackairb_v", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairhi_y", game_attackairhi); + agent.acmd("game_attackairhi_b", game_attackairhi); + agent.acmd("game_attackairhi_w", game_attackairhi); + agent.acmd("game_attackairhi_v", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw_y", game_attackairlw); + agent.acmd("game_attackairlw_b", game_attackairlw); + agent.acmd("game_attackairlw_w", game_attackairlw); + agent.acmd("game_attackairlw_v", game_attackairlw); } diff --git a/fighters/pikmin/src/pikmin/acmd/mod.rs b/fighters/pikmin/src/pikmin/acmd/mod.rs index 9899ed119d..c3284d0fd4 100644 --- a/fighters/pikmin/src/pikmin/acmd/mod.rs +++ b/fighters/pikmin/src/pikmin/acmd/mod.rs @@ -7,10 +7,10 @@ mod smashes; mod specials; mod throws; -pub fn install() { - aerials::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); } \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/other.rs b/fighters/pikmin/src/pikmin/acmd/other.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/pikmin/src/pikmin/acmd/other.rs +++ b/fighters/pikmin/src/pikmin/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/pikmin/acmd/smashes.rs b/fighters/pikmin/src/pikmin/acmd/smashes.rs index 4c225d5309..45b65ac9a4 100644 --- a/fighters/pikmin/src/pikmin/acmd/smashes.rs +++ b/fighters/pikmin/src/pikmin/acmd/smashes.rs @@ -3,100 +3,99 @@ use super::PikminInfo; use std::ops::Index; use globals::*; -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); + let dmg = 20.3; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 3.0); + if is_excute(agent) { + let dmg = 14.0; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 6.0); + if is_excute(agent) { + let dmg = 8.4; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); + let p = PikminInfo::from(variation); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); let dmg = 18.2; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 83 + p.angle, 72, 0, 50, 6.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 83 + p.angle, 72, 0, 50, 6.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); let dmg = 14.0; - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg * p.dmg, 94 + p.angle, 64, 0, 50, 4.0, 0.0, 3.5, 9.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg * p.dmg, 94 + p.angle, 64, 0, 50, 4.0, 0.0, 3.5, 9.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 15.4; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 60 + p.angle, 68, 0, 50, 5.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 60 + p.angle, 68, 0, 50, 5.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); let dmg = 15.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 12.6; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attacks4sjump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); - let p = PikminInfo::from(variation); - if is_excute(fighter) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); - let dmg = 20.3; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - let dmg = 14.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - let dmg = 8.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4sjump", game_attacks4sjump); + agent.acmd("game_attacks4sjump_b", game_attacks4sjump); + agent.acmd("game_attacks4sjump_v", game_attacks4sjump); + agent.acmd("game_attacks4sjump_w", game_attacks4sjump); + agent.acmd("game_attacks4sjump_y", game_attacks4sjump); -} + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4_b", game_attackhi4); + agent.acmd("game_attackhi4_v", game_attackhi4); + agent.acmd("game_attackhi4_w", game_attackhi4); + agent.acmd("game_attackhi4_y", game_attackhi4); -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attackhi4_b", game_attackhi4) - .acmd("game_attackhi4_v", game_attackhi4) - .acmd("game_attackhi4_w", game_attackhi4) - .acmd("game_attackhi4_y", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("game_attacklw4_b", game_attacklw4) - .acmd("game_attacklw4_v", game_attacklw4) - .acmd("game_attacklw4_w", game_attacklw4) - .acmd("game_attacklw4_y", game_attacklw4) - .acmd("game_attacks4sjump", game_attacks4sjump) - .acmd("game_attacks4sjump_b", game_attacks4sjump) - .acmd("game_attacks4sjump_v", game_attacks4sjump) - .acmd("game_attacks4sjump_w", game_attacks4sjump) - .acmd("game_attacks4sjump_y", game_attacks4sjump) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacklw4_b", game_attacklw4); + agent.acmd("game_attacklw4_v", game_attacklw4); + agent.acmd("game_attacklw4_w", game_attacklw4); + agent.acmd("game_attacklw4_y", game_attacklw4); } diff --git a/fighters/pikmin/src/pikmin/acmd/specials.rs b/fighters/pikmin/src/pikmin/acmd/specials.rs index 0b19178b38..eccb23ebc2 100644 --- a/fighters/pikmin/src/pikmin/acmd/specials.rs +++ b/fighters/pikmin/src/pikmin/acmd/specials.rs @@ -1,13 +1,12 @@ - use super::*; -unsafe extern "C" fn game_spsremved(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_spsremved(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if VarModule::is_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE) { - if is_excute(fighter) { + if VarModule::is_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE) { + if is_excute(agent) { AttackModule::clear_all(boma); let dmg = 4.8; // special case for yellow pikmin @@ -17,25 +16,25 @@ unsafe extern "C" fn game_spsremved(fighter: &mut L2CAgentBase) { } else { 1.0 }; - ATTACK(fighter, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into()); + agent.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into()); } } } -unsafe extern "C" fn pikmin_special_n_pikmin(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_spntakenoutstart(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) { MotionModule::set_rate(boma, WorkModule::get_float(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_PULL_OUT_START_WORK_FLOAT_MOT_RATE)); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } @@ -148,27 +147,28 @@ unsafe extern "C" fn game_spsthrown_y(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_spsremved", game_spsremved) - .acmd("game_spsremved_b", game_spsremved) - .acmd("game_spsremved_v", game_spsremved) - .acmd("game_spsremved_w", game_spsremved) - .acmd("game_spsremved_y", game_spsremved) - .acmd("game_splwairrespond", game_spsremved) - .acmd("game_splwairrespond_b", game_spsremved) - .acmd("game_splwairrespond_v", game_spsremved) - .acmd("game_splwairrespond_w", game_spsremved) - .acmd("game_splwairrespond_y", game_spsremved) - .acmd("game_spntakenoutstart", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_y", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_b", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_w", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_v", pikmin_special_n_pikmin) - .acmd("game_spsthrown", game_spsthrown) - .acmd("game_spsthrown_b", game_spsthrown_b) - .acmd("game_spsthrown_v", game_spsthrown_v) - .acmd("game_spsthrown_w", game_spsthrown_w) - .acmd("game_spsthrown_y", game_spsthrown_y) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_spsremved", game_spsremved); + agent.acmd("game_spsremved_b", game_spsremved); + agent.acmd("game_spsremved_v", game_spsremved); + agent.acmd("game_spsremved_w", game_spsremved); + agent.acmd("game_spsremved_y", game_spsremved); + + agent.acmd("game_splwairrespond", game_spsremved); + agent.acmd("game_splwairrespond_b", game_spsremved); + agent.acmd("game_splwairrespond_v", game_spsremved); + agent.acmd("game_splwairrespond_w", game_spsremved); + agent.acmd("game_splwairrespond_y", game_spsremved); + + agent.acmd("game_spntakenoutstart", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_y", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_b", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_w", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_v", game_spntakenoutstart); + + agent.acmd("game_spsthrown", game_spsthrown); + agent.acmd("game_spsthrown_b", game_spsthrown_b); + agent.acmd("game_spsthrown_v", game_spsthrown_v); + agent.acmd("game_spsthrown_w", game_spsthrown_w); + agent.acmd("game_spsthrown_y", game_spsthrown_y); +} \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/throws.rs b/fighters/pikmin/src/pikmin/acmd/throws.rs index 05e49636ef..29c2751054 100644 --- a/fighters/pikmin/src/pikmin/acmd/throws.rs +++ b/fighters/pikmin/src/pikmin/acmd/throws.rs @@ -1,128 +1,128 @@ - use super::*; -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 15.3 } else { 9.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 45 + p.angle, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 45 + p.angle, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 11.9 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 361, 60, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 361, 60, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 12.5 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 85 + p.angle, 80, 0, 81, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 85 + p.angle, 80, 0, 81, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 1.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 1.0; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 7.0, 0.0, 4.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 7.0, 0.0, 4.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PIKMIN); AttackModule::set_catch_only_all(boma, true, false); let dmg = if variation == 2 { 11.9 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 70 + p.angle, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 70 + p.angle, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_throwb", game_throwb) - .acmd("game_throwb_b", game_throwb) - .acmd("game_throwb_v", game_throwb) - .acmd("game_throwb_w", game_throwb) - .acmd("game_throwb_y", game_throwb) - .acmd("game_throwf", game_throwf) - .acmd("game_throwf_b", game_throwf) - .acmd("game_throwf_v", game_throwf) - .acmd("game_throwf_w", game_throwf) - .acmd("game_throwf_y", game_throwf) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwhi_b", game_throwhi) - .acmd("game_throwhi_v", game_throwhi) - .acmd("game_throwhi_w", game_throwhi) - .acmd("game_throwhi_y", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwlw_b", game_throwlw) - .acmd("game_throwlw_v", game_throwlw) - .acmd("game_throwlw_w", game_throwlw) - .acmd("game_throwlw_y", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwb_b", game_throwb); + agent.acmd("game_throwb_v", game_throwb); + agent.acmd("game_throwb_w", game_throwb); + agent.acmd("game_throwb_y", game_throwb); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwf_b", game_throwf); + agent.acmd("game_throwf_v", game_throwf); + agent.acmd("game_throwf_w", game_throwf); + agent.acmd("game_throwf_y", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwhi_b", game_throwhi); + agent.acmd("game_throwhi_v", game_throwhi); + agent.acmd("game_throwhi_w", game_throwhi); + agent.acmd("game_throwhi_y", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwlw_b", game_throwlw); + agent.acmd("game_throwlw_v", game_throwlw); + agent.acmd("game_throwlw_w", game_throwlw); + agent.acmd("game_throwlw_y", game_throwlw); } diff --git a/fighters/pikmin/src/pikmin/mod.rs b/fighters/pikmin/src/pikmin/mod.rs index 78e3ddcf3b..0066101448 100644 --- a/fighters/pikmin/src/pikmin/mod.rs +++ b/fighters/pikmin/src/pikmin/mod.rs @@ -78,6 +78,8 @@ impl From for PikminInfo { } pub fn install() { - acmd::install(); - status::install(); + let agent = &mut Agent::new("pikmin_pikmin"); + acmd::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index d104f0e290..92d648b718 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -4,77 +4,77 @@ use globals::*; // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING -pub unsafe extern "C" fn special_s_cling_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); - AttackModule::set_ignore_just_shield(fighter.module_accessor, true); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); +pub unsafe extern "C" fn special_s_cling_main(weapon: &mut L2CFighterCommon) -> L2CValue { + weapon.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); + AttackModule::set_ignore_just_shield(weapon.module_accessor, true); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); - if !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - && !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { - let target = fighter.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + if !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + && !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + let target = weapon.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); + weapon.clear_lua_stack(); + weapon.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(weapon.lua_state_agent); } - let founder_id = sv_battle_object::get_founder_id(fighter.global_table[OBJECT_ID].get_u32()); + let founder_id = sv_battle_object::get_founder_id(weapon.global_table[OBJECT_ID].get_u32()); let mut founder_module_accessor = sv_battle_object::module_accessor(founder_id as u32); if !founder_module_accessor.is_null() { let power_special_s = WorkModule::get_param_float(founder_module_accessor, hash40("power_special_s"), 0); - AttackModule::set_power_up(fighter.module_accessor, power_special_s); + AttackModule::set_power_up(weapon.module_accessor, power_special_s); let founder_power_mul_status = AttackModule::power_mul_status(founder_module_accessor); - AttackModule::set_power_mul_status(fighter.module_accessor, founder_power_mul_status); + AttackModule::set_power_mul_status(weapon.module_accessor, founder_power_mul_status); } - let variation = fighter.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); + let variation = weapon.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - VarModule::set_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); - VarModule::off_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); - VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + VarModule::set_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); + VarModule::off_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); + VarModule::off_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - fighter.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) + weapon.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) } -unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let clatter_time = ControlModule::get_clatter_time(fighter.module_accessor, 0); - fighter.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); - let variation = fighter.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); +unsafe extern "C" fn special_s_cling_main_loop(weapon: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(weapon.module_accessor); + let clatter_time = ControlModule::get_clatter_time(weapon.module_accessor, 0); + weapon.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); + let variation = weapon.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if !fighter.global_table[IS_STOPPING].get_bool() - && !StatusModule::is_changing(fighter.module_accessor) + if !weapon.global_table[IS_STOPPING].get_bool() + && !StatusModule::is_changing(weapon.module_accessor) { - let is_attack = AttackModule::is_attack(fighter.module_accessor, 0, false); - if is_attack && !VarModule::is_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { - VarModule::inc_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); + let is_attack = AttackModule::is_attack(weapon.module_accessor, 0, false); + if is_attack && !VarModule::is_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { + VarModule::inc_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); } - VarModule::set_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); - if VarModule::get_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ - VarModule::on_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - fighter.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); + VarModule::set_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); + if VarModule::get_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ + VarModule::on_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + weapon.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); return 1.into(); } } - if fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - || fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + if weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + || weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { return 0.into(); } - if !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + if !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { + weapon.clear_lua_stack(); + weapon.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(weapon.lua_state_agent); if frame > 3.0 { - fighter.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); - let target = fighter.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); + weapon.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); + let target = weapon.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); } } - if LinkModule::is_link(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { - LinkModule::send_event_parents(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); + if LinkModule::is_link(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { + LinkModule::send_event_parents(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); } return 0.into(); @@ -82,22 +82,12 @@ unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) - // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE -pub unsafe extern "C" fn special_s_cling_remove_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - smashline::original_status(End, fighter, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(fighter) +pub unsafe extern "C" fn special_s_cling_remove_end(weapon: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + smashline::original_status(End, weapon, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(weapon) } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .status( - Main, - *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, - special_s_cling_main, - ) - .status( - End, - *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, - special_s_cling_remove_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, special_s_cling_main); + agent.status(End, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, special_s_cling_remove_end); } diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status.rs deleted file mode 100644 index 5c5522aa95..0000000000 --- a/fighters/pikmin/src/status.rs +++ /dev/null @@ -1,10 +0,0 @@ -use super::*; -mod escape_air; -mod attack_air; -mod rebirth; - -pub fn install() { - escape_air::install(); - attack_air::install(); - rebirth::install(); -} diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 3cb1eb5cbc..0f27aaf89e 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); @@ -163,8 +164,7 @@ unsafe extern "C" fn link_event_store_l2c_table(fighter: &mut L2CFighterCommon, deleter(link_event); ret } -pub fn install() { - smashline::Agent::new("pikmin") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index 082ffc46da..eeb4fe1ea9 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -1,13 +1,12 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ESCAPE_AIR pub unsafe extern "C" fn escape_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); fighter.status_end_EscapeAir() } -pub fn install() { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end); } diff --git a/fighters/pikmin/src/status/mod.rs b/fighters/pikmin/src/status/mod.rs new file mode 100644 index 0000000000..1cfe25b624 --- /dev/null +++ b/fighters/pikmin/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod escape_air; +mod attack_air; +mod rebirth; + +pub fn install(agent: &mut Agent) { + escape_air::install(agent); + attack_air::install(agent); + rebirth::install(agent); +} diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index fdf943e871..26a546e7a8 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -1,13 +1,12 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_REBIRTH pub unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) } -pub fn install() { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/pit/src/acmd/aerials.rs b/fighters/pit/src/acmd/aerials.rs index ff9c5b5b06..dfcd68acb3 100644 --- a/fighters/pit/src/acmd/aerials.rs +++ b/fighters/pit/src/acmd/aerials.rs @@ -1,268 +1,265 @@ use super::*; -unsafe extern "C" fn pit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 10.5, 0.0, 9.5, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 10.5, 0.0, 9.5, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pit_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_atk_air_n"), Hash40::new("swordr2"), 0, 0, 0, -90, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, -0.8, 0, 180, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0.8, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_atk_air_n"), Hash40::new("swordr2"), 0, 0, 0, -90, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, -0.8, 0, 180, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0.8, 0, 0, 90, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_atk_air_n"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_atk_air_n"), true, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_pit_sword1"), Hash40::new("tex_pit_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_pit_sword1"), Hash40::new("tex_pit_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 27.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn pit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 135, 0, 26, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 361, 142, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 135, 0, 26, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 361, 142, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 66, 93, 0, 31, 3.5, 0.0, 6.2, -13.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 96, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 66, 93, 0, 31, 3.5, 0.0, 6.2, -13.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 96, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 78, 0, 22, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 78, 0, 22, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 1, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pit_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); } } -unsafe extern "C" fn pit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 3.3, 0.0, 11.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, -5.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 3.3, 0.0, 11.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, -5.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 75, 81, 0, 41, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 75, 81, 0, 41, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 75, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 75, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pit_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attackairn", pit_attack_air_n_game) - .acmd("effect_attackairn", pit_attack_air_n_effect) - .acmd("game_attackairf", pit_attack_air_f_game) - .acmd("game_attackairb", pit_attack_air_b_game) - .acmd("effect_attackairb", pit_attack_air_b_effect) - .acmd("game_attackairhi", pit_attack_air_hi_game) - .acmd("game_attackairlw", pit_attack_air_lw_game) - .acmd("expression_attackairlw", pit_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pit/src/acmd/ground.rs b/fighters/pit/src/acmd/ground.rs index 5e31bc8267..5255545616 100644 --- a/fighters/pit/src/acmd/ground.rs +++ b/fighters/pit/src/acmd/ground.rs @@ -1,102 +1,101 @@ use super::*; -unsafe extern "C" fn pit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 3.0, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 32.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 32.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.37); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.37); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attack11", pit_attack_11_game) - .acmd("game_attack12", pit_attack_12_game) - .acmd("game_attack13", pit_attack_13_game) - .acmd("game_attackdash", pit_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pit/src/acmd/mod.rs b/fighters/pit/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/pit/src/acmd/mod.rs +++ b/fighters/pit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pit/src/acmd/other.rs b/fighters/pit/src/acmd/other.rs index 156088623c..a7f5813598 100644 --- a/fighters/pit/src/acmd/other.rs +++ b/fighters/pit/src/acmd/other.rs @@ -1,211 +1,115 @@ use super::*; -unsafe extern "C" fn pit_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } -} - -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_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_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(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_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_rnd_futtobi01"), Hash40::new("seq_pit_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_pit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pit_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_pit_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pit_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pit_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pit_step_left_m")); } } -unsafe extern "C" fn pit_bowarrow_fly_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"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); +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(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + frame(lua_state, 13.0); + 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("pit") - .acmd("game_turndash", pit_turn_dash_game) - .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_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("pit_bowarrow") - .acmd("game_fly", pit_bowarrow_fly_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); } diff --git a/fighters/pit/src/acmd/smashes.rs b/fighters/pit/src/acmd/smashes.rs index 1cbd561367..bce8d735b5 100644 --- a/fighters/pit/src/acmd/smashes.rs +++ b/fighters/pit/src/acmd/smashes.rs @@ -1,92 +1,89 @@ use super::*; -unsafe extern "C" fn pit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 10.0, 361, 124, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 10.0, 361, 124, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pit_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); let hitVec = Vector2f { x: 0.0, y: 24.5 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attacks4", pit_attack_s4_s_game) - .acmd("game_attackhi4", pit_attack_hi4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/pit/src/acmd/specials.rs b/fighters/pit/src/acmd/specials.rs index 06d7fd3ad0..b238ca029d 100644 --- a/fighters/pit/src/acmd/specials.rs +++ b/fighters/pit/src/acmd/specials.rs @@ -1,10 +1,10 @@ use super::*; -unsafe extern "C" fn pit_special_n_fire_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnfires(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stop_rise = Vector3f{x: 1.0, y: 0.0, z: 1.0}; KineticModule::mul_speed(boma, &stop_rise, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); let hop_vec = Vector3f{ x: 0.0, y: 1.0, z: 0.0 }; @@ -13,11 +13,11 @@ unsafe extern "C" fn pit_special_n_fire_s_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_special_n_fire_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnfirehi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stop_rise = Vector3f{x: 1.0, y: 0.0, z: 1.0}; KineticModule::mul_speed(boma, &stop_rise, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); let hop_vec = Vector3f{ x: 0.0, y: 1.0, z: 0.0 }; @@ -26,140 +26,140 @@ unsafe extern "C" fn pit_special_n_fire_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MTRANS_AIR_UNABLE); } } -unsafe extern "C" fn pit_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } } -unsafe extern "C" fn pit_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } } -unsafe extern "C" fn pit_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); - fighter.set_back_cliff_hangdata(10.0, 8.0); - fighter.set_front_cliff_hangdata(15.0, 8.0); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + agent.set_back_cliff_hangdata(10.0, 8.0); + agent.set_front_cliff_hangdata(15.0, 8.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: -0.5, y: 1.75, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT); } } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.83); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.83); + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn pit_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT_FOLLOW(fighter, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn pit_special_lw_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_speciallwendl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT(fighter, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_guardian_shield"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_guardian_shield"), false, false); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_specialairnfires", pit_special_n_fire_s_game) - .acmd("game_specialairnfirehi", pit_special_n_fire_hi_game) - .acmd("game_specialsstart", pit_special_s_start_game) - .acmd("game_specialsend", pit_special_s_end_game) - .acmd("game_specialairsstart", pit_special_air_s_start_game) - .acmd("game_specialairsend", pit_special_air_s_end_game) - .acmd("effect_speciallwstartl", pit_special_lw_start_effect) - .acmd("effect_speciallwstartr", pit_special_lw_start_effect) - .acmd("effect_specialairlwstartl", pit_special_lw_start_effect) - .acmd("effect_specialairlwstartr", pit_special_lw_start_effect) - .acmd("effect_speciallwendl", pit_special_lw_end_effect) - .acmd("effect_speciallwendr", pit_special_lw_end_effect) - .acmd("effect_specialairlwendl", pit_special_lw_end_effect) - .acmd("effect_specialairlwendr", pit_special_lw_end_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairnfires", game_specialairnfires); + agent.acmd("game_specialairnfirehi", game_specialairnfirehi); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); + agent.acmd("effect_speciallwstartr", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); + agent.acmd("effect_speciallwendl", effect_speciallwendl); + agent.acmd("effect_speciallwendr", effect_speciallwendl); + agent.acmd("effect_specialairlwendl", effect_speciallwendl); + agent.acmd("effect_specialairlwendr", effect_speciallwendl); } diff --git a/fighters/pit/src/acmd/throws.rs b/fighters/pit/src/acmd/throws.rs index 3ffbb0cd3c..6ffc68c2f9 100644 --- a/fighters/pit/src/acmd/throws.rs +++ b/fighters/pit/src/acmd/throws.rs @@ -1,119 +1,118 @@ use super::*; -unsafe extern "C" fn pit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pit_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pit_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pit_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_catch", pit_catch_game) - .acmd("game_catchdash", pit_catch_dash_game) - .acmd("game_catchturn", pit_catch_turn_game) - .acmd("game_throwf", pit_throw_f_game) - .acmd("game_throwhi", pit_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pit/src/acmd/tilts.rs b/fighters/pit/src/acmd/tilts.rs index e8b46a565b..14412557b8 100644 --- a/fighters/pit/src/acmd/tilts.rs +++ b/fighters/pit/src/acmd/tilts.rs @@ -1,91 +1,88 @@ use super::*; -unsafe extern "C" fn pit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.3, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.3, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); let hitVec = Vector2f { x: 3.8, y: 23.5 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 72, 48, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 72, 48, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 34.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 34.0, 11.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 40, 0, 71, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 40, 0, 71, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 30.0, 17.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 30.0, 17.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_atk_wind"), Hash40::new("top"), -7, 6, 7, -12, -42, 168, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_atk_wind"), Hash40::new("top"), -7, 6, 7, -12, -42, 168, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pit_atk_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pit_atk_wind"), true, true); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attacks3", pit_attack_s3_s_game) - .acmd("game_attackhi3", pit_attack_hi3_game) - .acmd("game_attacklw3", pit_attack_lw3_game) - .acmd("effect_attacklw3", pit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pit/src/arrow/acmd.rs b/fighters/pit/src/arrow/acmd.rs new file mode 100644 index 0000000000..5b7da90fc9 --- /dev/null +++ b/fighters/pit/src/arrow/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 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_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/pit/src/arrow/mod.rs b/fighters/pit/src/arrow/mod.rs new file mode 100644 index 0000000000..25dc1a499a --- /dev/null +++ b/fighters/pit/src/arrow/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pit_arrow"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pit/src/lib.rs b/fighters/pit/src/lib.rs index 7bb0378152..d846ebcd81 100644 --- a/fighters/pit/src/lib.rs +++ b/fighters/pit/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod arrow; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pit"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + arrow::install(); } diff --git a/fighters/pit/src/opff.rs b/fighters/pit/src/opff.rs index 560237ca24..d7436988c8 100644 --- a/fighters/pit/src/opff.rs +++ b/fighters/pit/src/opff.rs @@ -97,8 +97,7 @@ pub unsafe fn pit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pit") - .on_line(Main, pit_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pit_frame_wrapper); } diff --git a/fighters/pit/src/status/mod.rs b/fighters/pit/src/status/mod.rs index 015e4dfd14..bd3c2188e3 100644 --- a/fighters/pit/src/status/mod.rs +++ b/fighters/pit/src/status/mod.rs @@ -1,10 +1,11 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_s; mod special_hi; -pub fn install() { - special_s::install(); - special_hi::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); } diff --git a/fighters/pit/src/status/special_hi.rs b/fighters/pit/src/status/special_hi.rs index 28ab68fef6..5c419f7766 100644 --- a/fighters/pit/src/status/special_hi.rs +++ b/fighters/pit/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END @@ -74,17 +73,7 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("pit") - .status( - Pre, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_pre, - ) - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_pre); + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); } diff --git a/fighters/pit/src/status/special_s.rs b/fighters/pit/src/status/special_s.rs index 4a586dc923..152a8727da 100644 --- a/fighters/pit/src/status/special_s.rs +++ b/fighters/pit/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END)(fighter); @@ -9,12 +10,6 @@ pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L ret } -pub fn install() { - smashline::Agent::new("pit") - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END, - special_s_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END, special_s_end_main); } diff --git a/fighters/pitb/src/acmd/aerials.rs b/fighters/pitb/src/acmd/aerials.rs index f2c9197d48..8a497a4560 100644 --- a/fighters/pitb/src/acmd/aerials.rs +++ b/fighters/pitb/src/acmd/aerials.rs @@ -1,87 +1,86 @@ use super::*; -unsafe extern "C" fn pitb_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 24.0, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 363, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 24.0, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 363, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 361, 85, 0, 50, 10.5, 1.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 361, 85, 0, 50, 10.5, 1.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pitb_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("bowr"), 0, 0, 0, -90, 90, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, 0.87, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, -0.87, 0, 180, -90, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("bowr"), 0, 0, 0, -90, 90, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, 0.87, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, -0.87, 0, 180, -90, 0, 0.9, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("bowl"), 0, 0, 0, -90, 90, 0, 1.3, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_pitb_sword1"), Hash40::new("tex_pitb_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("bowl"), 0, 0, 0, -90, 90, 0, 1.3, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_pitb_sword1"), Hash40::new("tex_pitb_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), true, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn pitb_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_pitb_attackair_n01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_pitb_attackair_n01")); } frame(lua_state, 18.0); - if is_excute(fighter) { - sound!(fighter, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_pitb_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_pitb_swing_m")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_pitb_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_pitb_swing_m")); } } @@ -116,191 +115,189 @@ unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn pitb_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 110, 0, 21, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 110, 0, 21, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 110, 0, 21, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 110, 0, 21, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 91, 0, 22, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 91, 0, 22, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 91, 0, 22, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 91, 0, 22, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pitb_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 43, 80, 0, 33, 3.5, 0.0, 6.2, -11.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 101, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 43, 80, 0, 33, 3.5, 0.0, 6.2, -11.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 101, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 43, 100, 0, 30, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 43, 100, 0, 30, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 1, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pitb_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); } } -unsafe extern "C" fn pitb_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 75, 106, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 75, 106, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 100, 0, 20, 3.5, 0.0, 9.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 100, 0, 20, 3.5, 0.0, 9.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pitb_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 54, 74, 0, 46, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 54, 74, 0, 46, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 54, 70, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 54, 70, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pitb_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attackairn", pitb_attack_air_n_game) - .acmd("effect_attackairn", pitb_attack_air_n_effect) - .acmd("sound_attackairn", pitb_attack_air_n_sound) - .acmd("expression_attackairn", expression_attackairn) - .acmd("game_attackairf", pitb_attack_air_f_game) - .acmd("game_attackairb", pitb_attack_air_b_game) - .acmd("effect_attackairb", pitb_attack_air_b_effect) - .acmd("game_attackairhi", pitb_attack_air_hi_game) - .acmd("game_attackairlw", pitb_attack_air_lw_game) - .acmd("expression_attackairlw", pitb_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pitb/src/acmd/ground.rs b/fighters/pitb/src/acmd/ground.rs index ded99e8960..6cdcc954aa 100644 --- a/fighters/pitb/src/acmd/ground.rs +++ b/fighters/pitb/src/acmd/ground.rs @@ -1,102 +1,101 @@ use super::*; -unsafe extern "C" fn pitb_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pitb_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pitb_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 3.0, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 32.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 32.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.37); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.37); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attack11", pitb_attack_11_game) - .acmd("game_attack12", pitb_attack_12_game) - .acmd("game_attack13", pitb_attack_13_game) - .acmd("game_attackdash", pitb_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pitb/src/acmd/mod.rs b/fighters/pitb/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/pitb/src/acmd/mod.rs +++ b/fighters/pitb/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index 88af1aba3a..19e1ffeef8 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -1,256 +1,178 @@ 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_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(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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_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_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn pitb_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.231); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.231); } frame(lua_state, 13.0); // Now effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_pitb_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pitb_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_pitb_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pitb_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pitb_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pitb_step_left_m")); } } -unsafe extern "C" fn pitb_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) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Now effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } -unsafe extern "C" fn appeal_sl_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), false, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn appeal_sr_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), false, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("pitb") - .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("game_dash", pitb_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", pitb_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_appealsl", appeal_sl_effect) - .acmd("effect_appealsr", appeal_sr_effect) - .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("game_dash", game_dash); + 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("effect_appealsl", effect_appealsl); + agent.acmd("effect_appealsr", effect_appealsr); } diff --git a/fighters/pitb/src/acmd/smashes.rs b/fighters/pitb/src/acmd/smashes.rs index 6986a7fbfb..4d412622bc 100644 --- a/fighters/pitb/src/acmd/smashes.rs +++ b/fighters/pitb/src/acmd/smashes.rs @@ -1,123 +1,121 @@ use super::*; -unsafe extern "C" fn pitb_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 10.0, 361, 121, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 10.0, 361, 121, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pitb_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); let hitVec = Vector2f { x: 0.0, y: 24.5 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pitb_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.7, 0.0, 3.3, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.6, 0.0, 2.8, 12.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 48, 93, 0, 35, 3.4, 0.0, 2.0, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.7, 0.0, 3.3, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.6, 0.0, 2.8, 12.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 48, 93, 0, 35, 3.4, 0.0, 2.0, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.7, 0.0, 3.3, -8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.6, 0.0, 2.8, -14.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 30, 93, 0, 25, 3.4, 0.0, 2.0, -19.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.7, 0.0, 3.3, -8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.6, 0.0, 2.8, -14.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 30, 93, 0, 25, 3.4, 0.0, 2.0, -19.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attacks4", pitb_attack_s4_s_game) - .acmd("game_attackhi4", pitb_attack_hi4_game) - .acmd("game_attacklw4", pitb_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pitb/src/acmd/specials.rs b/fighters/pitb/src/acmd/specials.rs index 2d09e0d555..54470d0b58 100644 --- a/fighters/pitb/src/acmd/specials.rs +++ b/fighters/pitb/src/acmd/specials.rs @@ -1,172 +1,170 @@ use super::*; -unsafe extern "C" fn pitb_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 12.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 12.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } frame(lua_state, 26.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MTRANS_AIR_UNABLE); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); // WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } } -unsafe extern "C" fn pitb_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 40, 80, 0, 63, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, false, *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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 40, 80, 0, 63, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, false, *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_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } } -unsafe extern "C" fn pitb_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 14.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 14.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 0.5, 367, 100, 0, 35, 6.0, 0.0, -3.0, -2.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 0.5, 367, 100, 0, 35, 6.0, 0.0, -3.0, -2.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); } frame(lua_state, 10.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); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 68, 110, 0, 60, 6.5, 0.0, -3.0, -2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 68, 110, 0, 60, 6.5, 0.0, -3.0, -2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_HI_RUSH_FLAG_FIX_ANGLE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_HI_RUSH_FLAG_BACK_ANGLE); JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn pitb_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 4.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 85, 0, 77, 7.5, 0.0, 7.0, -1.5, Some(0.0), Some(7.0), Some(1.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 85, 0, 77, 7.5, 0.0, 7.0, -1.5, Some(0.0), Some(7.0), Some(1.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT_FOLLOW(fighter, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 3, -2, 0, rot1, 0, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 3, 2, 0, rot2, 0, 1.3, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 3, -2, 0, rot1, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 3, 2, 0, rot2, 0, 1.3, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn pitb_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); } - } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_specialsstart", pitb_special_s_start_game) - .acmd("game_specialsend", pitb_special_s_end_game) - .acmd("game_specialairsstart", pitb_special_air_s_start_game) - .acmd("game_specialhi", pitb_special_hi_game) - .acmd("game_speciallwstartl", pitb_special_lw_start_game) - .acmd("game_speciallwstartr", pitb_special_lw_start_game) - .acmd("game_specialairlwstartl", pitb_special_lw_start_game) - .acmd("game_specialairlwstartr", pitb_special_lw_start_game) - .acmd("effect_speciallwstartl", pitb_special_lw_start_effect) - .acmd("effect_speciallwstartr", pitb_special_lw_start_effect) - .acmd("effect_specialairlwstartl", pitb_special_lw_start_effect) - .acmd("effect_specialairlwstartr", pitb_special_lw_start_effect) - .acmd("game_speciallwhold", pitb_special_lw_hold_game) - .acmd("game_specialairlwhold", pitb_special_lw_hold_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_speciallwstartl", game_speciallwstartl); + agent.acmd("game_speciallwstartr", game_speciallwstartl); + agent.acmd("game_specialairlwstartl", game_speciallwstartl); + agent.acmd("game_specialairlwstartr", game_speciallwstartl); + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); + agent.acmd("effect_speciallwstartr", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); +} \ No newline at end of file diff --git a/fighters/pitb/src/acmd/throws.rs b/fighters/pitb/src/acmd/throws.rs index 2cd51eda09..7ac7294158 100644 --- a/fighters/pitb/src/acmd/throws.rs +++ b/fighters/pitb/src/acmd/throws.rs @@ -1,121 +1,120 @@ use super::*; -unsafe extern "C" fn pitb_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pitb_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pitb_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pitb_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_catch", pitb_catch_game) - .acmd("game_catchdash", pitb_catch_dash_game) - .acmd("game_catchturn", pitb_catch_turn_game) - .acmd("game_throwf", pitb_throw_f_game) - .acmd("game_throwhi", pitb_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pitb/src/acmd/tilts.rs b/fighters/pitb/src/acmd/tilts.rs index 6f4beb3cc3..d6657c56b7 100644 --- a/fighters/pitb/src/acmd/tilts.rs +++ b/fighters/pitb/src/acmd/tilts.rs @@ -1,95 +1,91 @@ use super::*; -unsafe extern "C" fn pitb_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pitb_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.4, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.4, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); let hitVec = Vector2f { x: 4.5, y: 21.5 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 44, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 69, 44, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 34.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 34.0, 11.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 69, 48, 0, 61, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 69, 48, 0, 61, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 30.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 30.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_wind"), Hash40::new("top"), -7, 6, 2.3, -12, -42, 168, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_wind"), Hash40::new("top"), -7, 6, 2.3, -12, -42, 168, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_wind"), true, true); } - } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attacks3", pitb_attack_s3_s_game) - .acmd("game_attackhi3", pitb_attack_hi3_game) - .acmd("game_attacklw3", pitb_attack_lw3_game) - .acmd("effect_attacklw3", pitb_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pitb/src/lib.rs b/fighters/pitb/src/lib.rs index 7bb0378152..7147efa1fa 100644 --- a/fighters/pitb/src/lib.rs +++ b/fighters/pitb/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pitb"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/pitb/src/opff.rs b/fighters/pitb/src/opff.rs index 5a11edc7d8..d5a8c11cd1 100644 --- a/fighters/pitb/src/opff.rs +++ b/fighters/pitb/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bow_lc(boma: &mut BattleObjectModuleAccessor) { if boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_N_SHOOT) { if boma.is_prev_situation(*SITUATION_KIND_AIR) && boma.is_situation(*SITUATION_KIND_GROUND) { @@ -45,8 +44,6 @@ pub unsafe fn pitb_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("pitb") - .on_line(Main, pitb_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pitb_frame_wrapper); } diff --git a/fighters/pitb/src/status/mod.rs b/fighters/pitb/src/status/mod.rs index 543ba824c8..77dac10f3b 100644 --- a/fighters/pitb/src/status/mod.rs +++ b/fighters/pitb/src/status/mod.rs @@ -1,8 +1,9 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_hi; -pub fn install() { - special_hi::install(); +pub fn install(agent: &mut Agent) { + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/pitb/src/status/special_hi.rs b/fighters/pitb/src/status/special_hi.rs index a7d9d9c26e..5c419f7766 100644 --- a/fighters/pitb/src/status/special_hi.rs +++ b/fighters/pitb/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END @@ -74,17 +73,7 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("pitb") - .status( - Pre, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_pre, - ) - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_pre); + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); } diff --git a/fighters/plizardon/src/acmd/aerials.rs b/fighters/plizardon/src/acmd/aerials.rs index 508855e306..a51969c411 100644 --- a/fighters/plizardon/src/acmd/aerials.rs +++ b/fighters/plizardon/src/acmd/aerials.rs @@ -1,221 +1,216 @@ use super::*; -unsafe extern "C" fn plizardon_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("fire"), 11.0, 60, 90, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 9.0, 60, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 9.0, 60, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("fire"), 11.0, 60, 90, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 9.0, 60, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 9.0, 60, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn plizardon_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("plizardon_atk_fire_air"), Hash40::new("fire"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("plizardon_atk_fire_air"), Hash40::new("fire"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("plizardon_atk_fire_air"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("plizardon_atk_fire_air"), false, false); } } -unsafe extern "C" fn plizardon_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 10.0, 361, 95, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 361, 95, 0, 35, 3.8, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 13.0, 361, 100, 0, 45, 4.7, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 10.0, 361, 95, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 361, 95, 0, 35, 3.8, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 13.0, 361, 100, 0, 45, 4.7, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn plizardon_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 1, 0, 3.7, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 1, 0, 3.7, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("plizardon_scratch2_l"), Hash40::new("plizardon_scratch2_r"), Hash40::new("top"), 0, 10, 9, 40, 70, -90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.25, 2.0, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 10.0, 1.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 10.0, 1.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("plizardon_scratch2_l"), Hash40::new("plizardon_scratch2_r"), Hash40::new("top"), 0, 10, 9, 40, 70, -90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.25, 2.0, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 10.0, 1.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 10.0, 1.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } - } -unsafe extern "C" fn plizardon_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, -18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 11.0, 361, 100, 0, 30, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail2"), 11.0, 361, 100, 0, 30, 4.0, 2.0, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, -18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 11.0, 361, 100, 0, 30, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail2"), 11.0, 361, 100, 0, 30, 4.0, 2.0, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, -0.5, -19.0, Some(0.0), Some(9.5), Some(-25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 14.0, 361, 100, 0, 30, 4.0, -1.3, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, -0.5, -19.0, Some(0.0), Some(9.5), Some(-25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 14.0, 361, 100, 0, 30, 4.0, -1.3, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, 9.5, -25.0, Some(0.0), Some(20.0), Some(-19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, 9.5, -25.0, Some(0.0), Some(20.0), Some(-19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn plizardon_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck2"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck2"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 6.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 7.0, -0.7, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("neck2"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("neck"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 6.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 7.0, -0.7, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("neck2"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("neck"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn plizardon_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } -unsafe extern "C" fn plizardon_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 100, 0, 20, 4.5, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 100, 0, 20, 4.5, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attackairn", plizardon_attack_air_n_game) - .acmd("effect_attackairn", plizardon_attack_air_n_effect) - .acmd("game_attackairf", plizardon_attack_air_f_game) - .acmd("effect_attackairf", plizardon_attack_air_f_effect) - .acmd("game_attackairb", plizardon_attack_air_b_game) - .acmd("game_attackairhi", plizardon_attack_air_hi_game) - .acmd("expression_attackairhi", plizardon_attack_air_hi_expression) - .acmd("game_attackairlw", plizardon_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/plizardon/src/acmd/ground.rs b/fighters/plizardon/src/acmd/ground.rs index 1ff386ce53..baed427075 100644 --- a/fighters/plizardon/src/acmd/ground.rs +++ b/fighters/plizardon/src/acmd/ground.rs @@ -1,15 +1,14 @@ - use super::*; -unsafe extern "C" fn plizardon_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.4, 0.0, 8.0, 4.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.4, 0.0, 8.0, 8.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 180, 25, 0, 24, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.4, 0.0, 8.0, 4.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.4, 0.0, 8.0, 8.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 180, 25, 0, 24, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); @@ -17,84 +16,83 @@ unsafe extern "C" fn plizardon_attack_11_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn plizardon_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(1.1, 0.0, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.8, 0.0, 8.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.8, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 3.2, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(15.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.8, 0.0, 8.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.8, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 3.2, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(15.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn plizardon_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 130, 0, 60, 5.0, 0.0, 6.5, 6.5, Some(0.0), Some(6.5), Some(16.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 130, 0, 60, 5.0, 0.0, 6.5, 6.5, Some(0.0), Some(6.5), Some(16.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 13.0, 45, 44, 0, 102, 4.5, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 13.0, 55, 44, 0, 102, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 13.0, 45, 44, 0, 102, 4.5, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("trans"), 13.0, 55, 44, 0, 102, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 10.0, 55, 27, 0, 98, 4.0, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 10.0, 70, 27, 0, 98, 3.5, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 10.0, 55, 27, 0, 98, 4.0, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("trans"), 10.0, 70, 27, 0, 98, 3.5, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attack11", plizardon_attack_11_game) - .acmd("game_attack12", plizardon_attack_12_game) - .acmd("game_attack13", plizardon_attack_13_game) - .acmd("game_attackdash", plizardon_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/plizardon/src/acmd/mod.rs b/fighters/plizardon/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/plizardon/src/acmd/mod.rs +++ b/fighters/plizardon/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/plizardon/src/acmd/other.rs b/fighters/plizardon/src/acmd/other.rs index d0c557b13c..424429ab10 100644 --- a/fighters/plizardon/src/acmd/other.rs +++ b/fighters/plizardon/src/acmd/other.rs @@ -1,252 +1,174 @@ - 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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_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(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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_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_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); } } -unsafe extern "C" fn plizardon_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_plizardon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_plizardon_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, 12.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_plizardon_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_plizardon_step_right_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_plizardon_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_plizardon_step_left_m")); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -pub fn install() { - smashline::Agent::new("plizardon") - .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("game_appeallwr", plizardon_appeal_lw_r_game) - .acmd("game_appeallwl", plizardon_appeal_lw_l_game) - .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("expression_landingheavy", expression_landingheavy) - .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("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + + agent.acmd("game_dash", game_dash); + 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("expression_landingheavy", expression_landingheavy); } diff --git a/fighters/plizardon/src/acmd/smashes.rs b/fighters/plizardon/src/acmd/smashes.rs index 0dbf53342f..294e0ae6e4 100644 --- a/fighters/plizardon/src/acmd/smashes.rs +++ b/fighters/plizardon/src/acmd/smashes.rs @@ -1,138 +1,134 @@ - use super::*; -unsafe extern "C" fn plizardon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 3.5, Some(0.0), Some(5.0), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 14.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 3.5, Some(0.0), Some(5.0), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 14.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn plizardon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); - ATTACK(fighter, 1, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 1.5, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingl2"), 5.0, 368, 100, 0, 0, 5.0, 3.5, -1.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 280, 100, 32, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 5.0, 368, 100, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); + ATTACK(agent, 1, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 1.5, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingl2"), 5.0, 368, 100, 0, 0, 5.0, 3.5, -1.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 280, 100, 32, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("bust"), 5.0, 368, 100, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); let hit1 = Vector2f { x: 0.0, y: 18.0 }; AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &hit1, 8, false); AttackModule::set_vec_target_pos(boma, 2, smash::phx::Hash40::new("top"), &hit1, 8, false); AttackModule::set_vec_target_pos(boma, 4, smash::phx::Hash40::new("top"), &hit1, 8, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 320, 100, 42, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 320, 100, 42, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 340, 100, 60, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 340, 100, 60, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); let hit2 = Vector2f { x: 0.0, y: 18.0 }; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &hit2, 8, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("wingr2"), 11.0, 83, 130, 0, 40, 5.5, 3.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr4"), 11.0, 83, 130, 0, 40, 5.0, 2.7, -2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr7"), 11.0, 83, 130, 0, 40, 4.5, 6.5, 0.0, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 11.0, 83, 130, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("wingr2"), 11.0, 83, 130, 0, 40, 5.5, 3.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr4"), 11.0, 83, 130, 0, 40, 5.0, 2.7, -2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr7"), 11.0, 83, 130, 0, 40, 4.5, 6.5, 0.0, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 11.0, 83, 130, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attacks4", plizardon_attack_s4_s_game) - .acmd("game_attackhi4", plizardon_attack_hi4_game) - .acmd("game_attacklw4", plizardon_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/plizardon/src/acmd/specials.rs b/fighters/plizardon/src/acmd/specials.rs index 9e294b7d55..32b916e1f3 100644 --- a/fighters/plizardon/src/acmd/specials.rs +++ b/fighters/plizardon/src/acmd/specials.rs @@ -1,57 +1,56 @@ - use super::*; -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.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); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -69,7 +68,7 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -77,57 +76,57 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(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) { //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.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); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -145,7 +144,7 @@ unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -153,9 +152,7 @@ unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/plizardon/src/acmd/throws.rs b/fighters/plizardon/src/acmd/throws.rs index ea28a08e1a..edb3e789e4 100644 --- a/fighters/plizardon/src/acmd/throws.rs +++ b/fighters/plizardon/src/acmd/throws.rs @@ -1,70 +1,69 @@ use super::*; -unsafe extern "C" fn plizardon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 plizardon_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 6.0, 5.0, Some(0.0), Some(6.0), Some(15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 6.0, 5.0, Some(0.0), Some(6.0), Some(15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 plizardon_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 plizardon_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -99,11 +98,10 @@ unsafe extern "C" fn plizardon_throw_hi_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_catch", plizardon_catch_game) - .acmd("game_catchdash", plizardon_catch_dash_game) - .acmd("game_catchturn", plizardon_catch_turn_game) - .acmd("game_throwhi", plizardon_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/plizardon/src/acmd/tilts.rs b/fighters/plizardon/src/acmd/tilts.rs index 7075146a0d..fabd6e7ca8 100644 --- a/fighters/plizardon/src/acmd/tilts.rs +++ b/fighters/plizardon/src/acmd/tilts.rs @@ -1,188 +1,182 @@ use super::*; -unsafe extern "C" fn plizardon_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 3.0, 19.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 2.5, 16.700001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 3.0, 19.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 2.5, 16.700001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 78, 90, 0, 50, 8.0, 0.0, 13.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 3.0, 0.0, 20.0, 3.0, Some(0.0), Some(27.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, 7.0, Some(0.0), Some(30.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, -1.0, Some(0.0), Some(30.0), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 78, 90, 0, 50, 8.0, 0.0, 13.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 3.0, 0.0, 20.0, 3.0, Some(0.0), Some(27.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, 7.0, Some(0.0), Some(30.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, -1.0, Some(0.0), Some(30.0), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } -unsafe extern "C" fn plizardon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 60, 0, 60, 5.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 80, 60, 0, 60, 4.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 60, 0, 60, 5.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 80, 60, 0, 60, 4.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn plizardon_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 4, 3, 0, 10, 0, 1, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 0.7, 0.4, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 4, 3, 0, 10, 0, 1, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 0.7, 0.4, 0.9); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 4, 20, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.65); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 4, 20, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.65); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attacks3hi", plizardon_attack_s3_hi_game) - .acmd("game_attacks3", plizardon_attack_s3_s_game) - .acmd("game_attacks3lw", plizardon_attack_s3_lw_game) - .acmd("game_attackhi3", plizardon_attack_hi3_game) - .acmd("expression_attackhi3", plizardon_attack_hi3_expression) - .acmd("game_attacklw3", plizardon_attack_lw3_game) - .acmd("effect_attacklw3", plizardon_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/plizardon/src/lib.rs b/fighters/plizardon/src/lib.rs index 7bb0378152..0fda77a706 100644 --- a/fighters/plizardon/src/lib.rs +++ b/fighters/plizardon/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("plizardon"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/plizardon/src/opff.rs b/fighters/plizardon/src/opff.rs index 331ede113c..51a040f4ad 100644 --- a/fighters/plizardon/src/opff.rs +++ b/fighters/plizardon/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { let prev_situation = StatusModule::prev_situation_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { @@ -99,8 +98,7 @@ pub unsafe fn plizardon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("plizardon") - .on_line(Main, plizardon_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, plizardon_frame_wrapper); } diff --git a/fighters/plizardon/src/status.rs b/fighters/plizardon/src/status.rs deleted file mode 100644 index 1216eeeddd..0000000000 --- a/fighters/plizardon/src/status.rs +++ /dev/null @@ -1,46 +0,0 @@ -use super::*; - -mod special_s; - -// Prevents sideB from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -// Re-enables the ability to use sideB when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); - } - true.into() -} - -extern "C" fn plizardon_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_PLIZARDON { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; - let object = utils::util::get_battle_object_from_id(parent_id); - VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) -} - -pub fn install() { - smashline::Agent::new("plizardon") - .on_start(plizardon_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); - special_s::install(); -} diff --git a/fighters/plizardon/src/status/mod.rs b/fighters/plizardon/src/status/mod.rs new file mode 100644 index 0000000000..23cda6ed7c --- /dev/null +++ b/fighters/plizardon/src/status/mod.rs @@ -0,0 +1,37 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; +mod special_lw; + +// Prevents sideB from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +// Re-enables the ability to use sideB when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); + special_lw::install(agent); +} diff --git a/fighters/plizardon/src/status/special_lw.rs b/fighters/plizardon/src/status/special_lw.rs new file mode 100644 index 0000000000..7c31fc461d --- /dev/null +++ b/fighters/plizardon/src/status/special_lw.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; + let object = utils::util::get_battle_object_from_id(parent_id); + VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} diff --git a/fighters/plizardon/src/status/special_s.rs b/fighters/plizardon/src/status/special_s.rs index fda31ae795..b73b13bdab 100644 --- a/fighters/plizardon/src/status/special_s.rs +++ b/fighters/plizardon/src/status/special_s.rs @@ -1,15 +1,12 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); 0.into() } -pub fn install() { - smashline::Agent::new("plizardon") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } diff --git a/fighters/popo/Cargo.toml b/fighters/popo/Cargo.toml deleted file mode 100644 index 81e375d7b3..0000000000 --- a/fighters/popo/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "popo" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -utils = { package = "dynamic", path = "../../dynamic" } -skyline = "0.2.1" -skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] } -smash_script = { git = "https://github.com/blu-dev/smash-script", branch = "development" } -smashline = { git = "https://github.com/HDR-Development/smashline" } \ No newline at end of file diff --git a/fighters/popo/src/acmd/aerials.rs b/fighters/popo/src/acmd/aerials.rs deleted file mode 100644 index d2d1ccf5e6..0000000000 --- a/fighters/popo/src/acmd/aerials.rs +++ /dev/null @@ -1,208 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn popo_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} - -unsafe extern "C" fn popo_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn popo_attack_air_hi_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, 5.0 / (10.0 - 1.0)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0 / (33.0 - 10.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0 / (36.0 - 33.0)); - AttackModule::clear_all(boma); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("havel"), -0.75, 7.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn popo_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - // skipping the frames where they bring hammer way above their head - FT_MOTION_RATE(fighter, 1.0/(11.0 - 3.0)); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0 / (54.0 - 11.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 22.0/(63.0 - 54.0)); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn effect_attackairlw_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn popo_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn popo_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 18.0); - if is_excute(fighter){ - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attackairn", popo_attack_air_n_game) - .acmd("game_attackairf", popo_attack_air_f_game) - .acmd("effect_attackairf", popo_attack_air_f_effect) - .acmd("game_attackairb", popo_attack_air_b_game) - .acmd("effect_attackairb", popo_effect_attackairb) - .acmd("game_attackairhi", popo_attack_air_hi_game) - .acmd("effect_attackairhi", popo_attack_air_hi_effect) - .acmd("game_attackairlw", popo_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .acmd("effect_attackairlw_nana", effect_attackairlw_nana) - .acmd("effect_landingairlw", popo_landing_air_lw_effect) - .acmd("expression_landingairlw", popo_landing_air_lw_expression) - .install(); -} diff --git a/fighters/popo/src/acmd/ground.rs b/fighters/popo/src/acmd/ground.rs deleted file mode 100644 index fe8650146d..0000000000 --- a/fighters/popo/src/acmd/ground.rs +++ /dev/null @@ -1,58 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 2.5, 0.0, 5.0, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 3.0, 0.0, 5.0, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 180, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } - -} - -unsafe extern "C" fn popo_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 24.0/(41.0 - 15.0)); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attack11", popo_attack_11_game) - .acmd("game_attackdash", popo_attack_dash_game) - .install(); -} diff --git a/fighters/popo/src/acmd/mod.rs b/fighters/popo/src/acmd/mod.rs deleted file mode 100644 index 484e04a282..0000000000 --- a/fighters/popo/src/acmd/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -use super::*; -mod aerials; -mod tilts; -mod other; -mod smashes; -mod specials; -mod throws; -mod ground; - -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} \ No newline at end of file diff --git a/fighters/popo/src/acmd/other.rs b/fighters/popo/src/acmd/other.rs deleted file mode 100644 index 6d5cffa367..0000000000 --- a/fighters/popo/src/acmd/other.rs +++ /dev/null @@ -1,226 +0,0 @@ - -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_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_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_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_popo_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_FLIPPABLE(fighter, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); - } -} - -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - 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(); - 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) { - 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); - } -} - -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 29.0); - if is_excute(fighter) { - 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); - } -} - -unsafe extern "C" fn blizzard_fly_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"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .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("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) - .install(); - smashline::Agent::new("popo_blizzard") - .acmd("game_fly", blizzard_fly_game) - .install(); -} diff --git a/fighters/popo/src/acmd/smashes.rs b/fighters/popo/src/acmd/smashes.rs deleted file mode 100644 index 6751aff51f..0000000000 --- a/fighters/popo/src/acmd/smashes.rs +++ /dev/null @@ -1,197 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn popo_attack_s4_s_expression(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_R); - } - frame(lua_state, 5.0); - app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 8); - } -} - -unsafe extern "C" fn popo_attack_hi4_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, 0.500); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn popo_attack_lw4_expression(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_L); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attacks4", popo_attack_s4_s_game) - .acmd("effect_attacks4", popo_attack_s4_s_effect) - .acmd("expression_attacks4", popo_attack_s4_s_expression) - .acmd("game_attackhi4", popo_attack_hi4_game) - .acmd("game_attacklw4", popo_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .acmd("expression_attacklw4", popo_attack_lw4_expression) - .install(); -} diff --git a/fighters/popo/src/acmd/specials.rs b/fighters/popo/src/acmd/specials.rs deleted file mode 100644 index 3a586c46df..0000000000 --- a/fighters/popo/src/acmd/specials.rs +++ /dev/null @@ -1,45 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_specialn", popo_special_n_game) - .acmd("game_specialairn", popo_special_air_n_game) - .install(); -} diff --git a/fighters/popo/src/acmd/throws.rs b/fighters/popo/src/acmd/throws.rs deleted file mode 100644 index 4ff09a9449..0000000000 --- a/fighters/popo/src/acmd/throws.rs +++ /dev/null @@ -1,183 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_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); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.176); - 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 popo_catch_dash_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.285); - frame(lua_state, 7.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.21); - 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 popo_catch_turn_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.125); - frame(lua_state, 8.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.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 popo_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - // scale attack startup based on opponent weight - let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE(fighter, ((weight/100.00) * 32.0) / 36.0); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CHECK_FINISH_CAMERA(fighter, 10, 4); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 17.0/(49.0 - 37.0)); - } -} - -unsafe extern "C" fn popo_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 9); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - FT_MOTION_RATE(fighter, 28.0/20.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 19); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 10); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_catch", popo_catch_game) - .acmd("game_catchdash", popo_catch_dash_game) - .acmd("game_catchturn", popo_catch_turn_game) - .acmd("game_throwlw", popo_throw_lw_game) - .acmd("game_throwf", popo_throw_f_game) - .acmd("game_throwhi", popo_throw_hi_game) - .acmd("game_throwb", popo_throw_b_game) - .install(); -} diff --git a/fighters/popo/src/acmd/tilts.rs b/fighters/popo/src/acmd/tilts.rs deleted file mode 100644 index 04c4717968..0000000000 --- a/fighters/popo/src/acmd/tilts.rs +++ /dev/null @@ -1,132 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - FT_MOTION_RATE(fighter, 16.0 / (32.0 - 9.0)); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); - } - wait(lua_state, 5.0); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } -} - -unsafe extern "C" fn popo_attack_lw3_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, 0.714); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attacks3hi", popo_attack_s3_hi_game) - .acmd("game_attacks3", popo_attack_s3_s_game) - .acmd("game_attackslw", popo_attack_s3_lw_game) - .acmd("game_attackhi3", popo_attack_hi3_game) - .acmd("effect_attackhi3", popo_attack_hi3_effect) - .acmd("game_attacklw3", popo_attack_lw3_game) - .install(); -} diff --git a/fighters/popo/src/status.rs b/fighters/popo/src/status.rs deleted file mode 100644 index e7e50f93b4..0000000000 --- a/fighters/popo/src/status.rs +++ /dev/null @@ -1,42 +0,0 @@ -use super::*; -use globals::*; -// status script import - - -#[utils::export(popo)] -pub unsafe fn ics_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Dash_Sub(); - fighter.sub_shift_status_main(L2CValue::Ptr(ics_dash_main as *const () as _)) -} - -unsafe extern "C" fn ics_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[OBJECT_ID] == FIGHTER_KIND_NANA { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_POPO_INSTANCE_WORK_ID_FLAG_ENABLE_TRANSITION_FORBID) { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - } - fighter.status_Dash_Main(); - 0.into() -} - -// FIGHTER_STATUS_KIND_DASH // - -pub unsafe extern "C" fn dash(fighter: &mut L2CFighterCommon) -> L2CValue { - ics_dash(fighter) -} - -// FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP // - -pub unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} -pub fn install() { - smashline::Agent::new("popo") - .status(Main, *FIGHTER_STATUS_KIND_DASH, dash) - .status( - Exit, - *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, - special_hi_jump_exit, - ) - .install(); -} diff --git a/fighters/purin/src/acmd/aerials.rs b/fighters/purin/src/acmd/aerials.rs index fe28c2485f..d1747fe3a3 100644 --- a/fighters/purin/src/acmd/aerials.rs +++ b/fighters/purin/src/acmd/aerials.rs @@ -1,189 +1,185 @@ - use super::*; -unsafe extern "C" fn purin_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 3.7, 0.0, 3.0, 9.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 6.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 3.7, 0.0, 3.0, 9.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 6.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 3.5, 0.0, 3.0, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 3.5, 0.0, 3.0, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.125); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.125); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn purin_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 8.7, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 8.7, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - + } } -unsafe extern "C" fn purin_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -13.0, Some(0.0), Some(4.0), Some(-16.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -13.0, Some(0.0), Some(4.0), Some(-16.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn purin_effect_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 3.7, -7.5, 0, 190, 165, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 3.7, -7.5, 0, 190, 165, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.6); } - } -unsafe extern "C" fn purin_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(20.0-9.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(20.0-9.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn purin_effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7, 1, 0, -85, -90, 0.85, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7, 1, 0, -85, -90, 0.85, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn purin_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); for _ in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 145, 100, 0, 10, 3.6, 0.0, -2.3, 1.0, Some(0.0), Some(-1.3), Some(3.5), 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 280, 100, 30, 0, 3.0, 0.0, 3.5, 1.0, None, None, None, 0.8, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 145, 100, 0, 10, 3.6, 0.0, -2.3, 1.0, Some(0.0), Some(-1.3), Some(3.5), 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 280, 100, 30, 0, 3.0, 0.0, 3.5, 1.0, None, None, None, 0.8, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 5.0, 0.0, -2.4, 3.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 3.0, 0.0, 3.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 5.0, 0.0, -2.4, 3.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 3.0, 0.0, 3.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attackairn", purin_attack_air_n_game) - .acmd("game_attackairf", purin_attack_air_f_game) - .acmd("game_attackairb", purin_attack_air_b_game) - .acmd("effect_attackairb", purin_effect_air_b_game) - .acmd("game_attackairhi", purin_attack_air_hi_game) - .acmd("effect_attackairhi", purin_effect_attackairhi) - .acmd("game_attackairlw", purin_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/purin/src/acmd/ground.rs b/fighters/purin/src/acmd/ground.rs index 65120a416a..b32c8136c8 100644 --- a/fighters/purin/src/acmd/ground.rs +++ b/fighters/purin/src/acmd/ground.rs @@ -1,48 +1,44 @@ - use super::*; -unsafe extern "C" fn purin_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 18, 2.5, 0.0, 5.8, 7.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 180, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 18, 2.5, 0.0, 5.8, 7.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 180, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 12.0, 43, 83, 0, 57, 5.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 12.0, 43, 83, 0, 57, 5.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 8.0, 43, 83, 0, 8, 4.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 8.0, 43, 83, 0, 8, 4.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attack11", purin_attack_11_game) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/purin/src/acmd/mod.rs b/fighters/purin/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/purin/src/acmd/mod.rs +++ b/fighters/purin/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/purin/src/acmd/other.rs b/fighters/purin/src/acmd/other.rs index 8acd686bef..f1a348dc11 100644 --- a/fighters/purin/src/acmd/other.rs +++ b/fighters/purin/src/acmd/other.rs @@ -1,192 +1,113 @@ - 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_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_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(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_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_rnd_futtobi01"), Hash40::new("seq_purin_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_purin_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_purin_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, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_purin_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_purin_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_purin_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_purin_step_left_m")); } } -unsafe extern "C" fn purin_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, 14.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("purin") - .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", purin_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_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); } diff --git a/fighters/purin/src/acmd/smashes.rs b/fighters/purin/src/acmd/smashes.rs index d89fdf3025..b497b6309f 100644 --- a/fighters/purin/src/acmd/smashes.rs +++ b/fighters/purin/src/acmd/smashes.rs @@ -1,33 +1,29 @@ - use super::*; -unsafe extern "C" fn purin_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("toer"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attacklw4", purin_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/purin/src/acmd/specials.rs b/fighters/purin/src/acmd/specials.rs index cb220de3e0..840fb204c6 100644 --- a/fighters/purin/src/acmd/specials.rs +++ b/fighters/purin/src/acmd/specials.rs @@ -1,118 +1,79 @@ - use super::*; -unsafe extern "C" fn purin_special_n_start_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_special_air_n_start_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 30, 60, 0, 60, 2.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 30, 60, 0, 60, 2.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn purin_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 30, 60, 0, 60, 2.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 60, 0, 60, 2.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn purin_special_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_air_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn purin_special_air_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } -} - -unsafe extern "C" fn purin_special_n_end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, false); } } -unsafe extern "C" fn purin_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn purin_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_INPUT); @@ -120,34 +81,33 @@ unsafe extern "C" fn purin_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_CHANGE_ENERGY); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PURIN_SPECIAL_S_ENERGY_MODE_FALL, *FIGHTER_PURIN_STATUS_SPECIAL_S_WORK_INT_ENERGY_MODE); WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_CHANGE_ENERGY); } frame(lua_state, 41.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 purin_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 361, 66, 0, 106, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 361, 66, 0, 106, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); if(AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT)){ @@ -156,28 +116,27 @@ unsafe extern "C" fn purin_special_lw_game(fighter: &mut L2CAgentBase) { } } } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_specialnstartr", purin_special_n_start_r_game) - .acmd("game_specialairnstartr", purin_special_air_n_start_r_game) - .acmd("game_specialn", purin_special_n_game) - .acmd("game_specialairn", purin_special_air_n_game) - .acmd("game_specialnhold", purin_special_n_hold_game) - .acmd("game_specialairnhold", purin_special_air_n_hold_game) - .acmd("game_specialnturn", purin_special_n_turn_game) - .acmd("game_specialairnturn", purin_special_air_n_turn_game) - .acmd("game_specialairnendl", purin_special_n_end) - .acmd("game_specialairnendr", purin_special_n_end) - .acmd("game_specialnendr", purin_special_n_end) - .acmd("game_specialnendl", purin_special_n_end) - .acmd("game_specials", purin_special_s_game) - .acmd("game_specialairs", purin_special_air_s_game) - .acmd("game_speciallwl", purin_special_lw_game) - .acmd("game_speciallwr", purin_special_lw_game) - .acmd("game_specialairlwl", purin_special_lw_game) - .acmd("game_specialairlwr", purin_special_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstartr", game_specialnstart); + agent.acmd("game_specialairnstartr", game_specialnstart); + agent.acmd("game_specialnhold", game_specialnstart); + agent.acmd("game_specialairnhold", game_specialnstart); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialnturn", game_specialnturn); + agent.acmd("game_specialairnturn", game_specialnturn); + agent.acmd("game_specialnendr", game_specialnend); + agent.acmd("game_specialnendl", game_specialnend); + agent.acmd("game_specialairnendl", game_specialnend); + agent.acmd("game_specialairnendr", game_specialnend); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_speciallwl", game_speciallw); + agent.acmd("game_speciallwr", game_speciallw); + agent.acmd("game_specialairlwl", game_speciallw); + agent.acmd("game_specialairlwr", game_speciallw); } diff --git a/fighters/purin/src/acmd/throws.rs b/fighters/purin/src/acmd/throws.rs index b99e73fb50..4d9feba029 100644 --- a/fighters/purin/src/acmd/throws.rs +++ b/fighters/purin/src/acmd/throws.rs @@ -1,176 +1,177 @@ use super::*; -unsafe extern "C" fn purin_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.35), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.35), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 purin_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 4.0, Some(0.0), Some(5.2), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 4.0, Some(0.0), Some(5.2), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 purin_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.2, -4.0, Some(0.0), Some(5.2), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, -4.0, Some(0.0), Some(5.2), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 35, 30, 0, 103, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 35, 30, 0, 103, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 361, 110, 0, 40, 10.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *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_NONE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 361, 110, 0, 40, 10.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *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_NONE, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 2); + CHECK_FINISH_CAMERA(agent, 13, 2); } frame(lua_state, 12.0); - if is_excute(fighter,) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent,) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 135, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 135, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter,-14, 0); + CHECK_FINISH_CAMERA(agent,-14, 0); } frame(lua_state, 26.0); - if is_excute(fighter){ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent){ + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn expression_throwb(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_throwb(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); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 28.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 20, 0, 115, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 20, 0, 115, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -4, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -4, 9); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 5.0/(38.0-3.0)); + FT_MOTION_RATE(agent, 5.0/(38.0-3.0)); } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 30, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 30, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 35, 130, 0, 10, 6.0, 0.0, 4.0, 3.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 35, 130, 0, 10, 6.0, 0.0, 4.0, 3.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma,true,false); - CHECK_FINISH_CAMERA(fighter,3,0) + CHECK_FINISH_CAMERA(agent,3,0) } frame(lua_state, 62.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_catch", purin_catch_game) - .acmd("game_catchdash", purin_catch_dash_game) - .acmd("game_catchturn", purin_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("expression_throwb", expression_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("expression_throwb", expression_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/purin/src/acmd/tilts.rs b/fighters/purin/src/acmd/tilts.rs index 1909d612af..a426106a74 100644 --- a/fighters/purin/src/acmd/tilts.rs +++ b/fighters/purin/src/acmd/tilts.rs @@ -1,105 +1,103 @@ - use super::*; -unsafe extern "C" fn purin_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -8.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -4.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -8.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -4.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attacks3", purin_attack_s3_s_game) - .acmd("game_attacks3hi", purin_attack_s3_hi_game) - .acmd("game_attacks3lw", purin_attack_s3_lw_game) - .acmd("game_attackhi3", purin_game_attackhi3) - .acmd("game_attacklw3", purin_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/purin/src/lib.rs b/fighters/purin/src/lib.rs index 7bb0378152..8be0587bcd 100644 --- a/fighters/purin/src/lib.rs +++ b/fighters/purin/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("purin"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/purin/src/opff.rs b/fighters/purin/src/opff.rs index 54e8f1ea40..4593d8ddeb 100644 --- a/fighters/purin/src/opff.rs +++ b/fighters/purin/src/opff.rs @@ -53,8 +53,6 @@ pub unsafe fn purin_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("purin") - .on_line(Main, purin_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, purin_frame_wrapper); } diff --git a/fighters/purin/src/status/mod.rs b/fighters/purin/src/status/mod.rs new file mode 100644 index 0000000000..52d4ab1814 --- /dev/null +++ b/fighters/purin/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_lw::install(agent); +} diff --git a/fighters/purin/src/status.rs b/fighters/purin/src/status/special_lw.rs similarity index 92% rename from fighters/purin/src/status.rs rename to fighters/purin/src/status/special_lw.rs index b8cd720ad8..1b2568a928 100644 --- a/fighters/purin/src/status.rs +++ b/fighters/purin/src/status/special_lw.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; -// status script import - // FIGHTER_STATUS_KIND_SPECIAL_LW -pub unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { if PostureModule::lr(fighter.module_accessor) != 1.0 { WorkModule::set_int64(fighter.module_accessor, hash40("special_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); @@ -15,10 +12,10 @@ pub unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_r") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); } special_lw_situation_helper(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -103,8 +100,7 @@ unsafe extern "C" fn special_lw_situation_helper(fighter: &mut L2CFighterCommon) MotionModule::set_rate(fighter.module_accessor, special_lw_mot_rate); } } -pub fn install() { - smashline::Agent::new("purin") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/pzenigame/src/acmd/aerials.rs b/fighters/pzenigame/src/acmd/aerials.rs index ba977de86e..04e2f100d7 100644 --- a/fighters/pzenigame/src/acmd/aerials.rs +++ b/fighters/pzenigame/src/acmd/aerials.rs @@ -1,170 +1,162 @@ - use super::*; -unsafe extern "C" fn pzenigame_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.850); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.850); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 11.0, 35, 90, 0, 32, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("bust"), 11.0, 35, 90, 0, 32, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 361, 90, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 361, 90, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pzenigame_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 4.0, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 4.0, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pzenigame_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 5.8, 0.0, 5.0, -5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 6.0, 0.0, 5.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 5.8, 0.0, 5.0, -5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 6.0, 0.0, 5.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn pzenigame_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - } -unsafe extern "C" fn pzenigame_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 3.5, -2.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 3.5, -2.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pzenigame_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn pzenigame_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.2, 0.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.4, 0.0, -1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.6, 0.0, -4.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.2, 0.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.4, 0.0, -1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.6, 0.0, -4.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 6.0, 0.0, -4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 6.0, 0.0, -4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attackairn", pzenigame_attack_air_n_game) - .acmd("game_attackairf", pzenigame_attack_air_f_game) - .acmd("game_attackairb", pzenigame_attack_air_b_game) - .acmd("game_landingairb", pzenigame_landing_air_b_game) - .acmd("game_attackairhi", pzenigame_attack_air_hi_game) - .acmd("expression_attackairhi", pzenigame_attack_air_hi_expression) - .acmd("game_attackairlw", pzenigame_attack_air_lw_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_landingairb", stub); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pzenigame/src/acmd/ground.rs b/fighters/pzenigame/src/acmd/ground.rs index 9110961a02..53417382b7 100644 --- a/fighters/pzenigame/src/acmd/ground.rs +++ b/fighters/pzenigame/src/acmd/ground.rs @@ -1,91 +1,88 @@ - use super::*; -unsafe extern "C" fn pzenigame_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.5, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.8, 0.0, 5.0, 7.2, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.5, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.8, 0.0, 5.0, 7.2, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pzenigame_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.2, -1.5, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.5, 1.2, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.5, 361, 20, 0, 25, 2.8, 4.0, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.2, -1.5, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.5, 1.2, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.5, 361, 20, 0, 25, 2.8, 4.0, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn pzenigame_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.2, -1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.5, 1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.8, 5.0, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.2, -1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.5, 1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.8, 5.0, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pzenigame_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 45, 4.2, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.45); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 45, 4.2, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.45); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 66, 45, 0, 70, 3.5, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 66, 45, 0, 70, 3.5, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attack11", pzenigame_attack_11_game) - .acmd("game_attack12", pzenigame_attack_12_game) - .acmd("game_attack13", pzenigame_attack_13_game) - .acmd("game_attackdash", pzenigame_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pzenigame/src/acmd/mod.rs b/fighters/pzenigame/src/acmd/mod.rs index 9d951ba688..d8a22387b4 100644 --- a/fighters/pzenigame/src/acmd/mod.rs +++ b/fighters/pzenigame/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pzenigame/src/acmd/other.rs b/fighters/pzenigame/src/acmd/other.rs index d717ec8b2c..e7cf7a982f 100644 --- a/fighters/pzenigame/src/acmd/other.rs +++ b/fighters/pzenigame/src/acmd/other.rs @@ -1,122 +1,46 @@ - 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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_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(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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_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_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); } } -unsafe extern "C" fn dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -132,17 +56,17 @@ unsafe extern "C" fn dash_effect(agent: &mut L2CAgentBase) { } } -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_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn runbrake_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbrake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -155,7 +79,7 @@ unsafe extern "C" fn runbrake_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn runbrakel_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbrakel(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -168,7 +92,7 @@ unsafe extern "C" fn runbrakel_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn runbraker_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbraker(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -181,7 +105,7 @@ unsafe extern "C" fn runbraker_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turnrun_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_turnrun(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -202,7 +126,7 @@ unsafe extern "C" fn turnrun_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turnrunbrake_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_turnrunbrake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -211,50 +135,49 @@ unsafe extern "C" fn turnrunbrake_effect(agent: &mut L2CAgentBase) { } } -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("pzenigame") - .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("effect_dash", dash_effect) - .acmd("sound_dash", dash_sound) - .acmd("effect_runbrake", runbrake_effect) - .acmd("effect_runbrakel", runbrakel_effect) - .acmd("effect_runbraker", runbraker_effect) - .acmd("effect_turnrun", turnrun_effect) - .acmd("effect_turnrunbrake", turnrunbrake_effect) - .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_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("effect_dash", effect_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("effect_runbrake", effect_runbrake); + agent.acmd("effect_runbrakel", effect_runbrakel); + agent.acmd("effect_runbraker", effect_runbraker); + agent.acmd("effect_turnrun", effect_turnrun); + agent.acmd("effect_turnrunbrake", effect_turnrunbrake); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pzenigame/src/acmd/smashes.rs b/fighters/pzenigame/src/acmd/smashes.rs index d22764709a..d65d07c6f8 100644 --- a/fighters/pzenigame/src/acmd/smashes.rs +++ b/fighters/pzenigame/src/acmd/smashes.rs @@ -1,122 +1,116 @@ - use super::*; -unsafe extern "C" fn pzenigame_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn pzenigame_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn pzenigame_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 3.5, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 3.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 2.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 3.5, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 3.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 2.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn pzenigame_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.2, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.0, 0.0, 3.8, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.8, 0.0, 3.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.5, 0.0, 3.2, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.2, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.0, 0.0, 3.8, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.8, 0.0, 3.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.5, 0.0, 3.2, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.2, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.0, 0.0, 3.8, -10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.8, 0.0, 3.5, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.5, 0.0, 3.2, -19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.2, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.0, 0.0, 3.8, -10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.8, 0.0, 3.5, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.5, 0.0, 3.2, -19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } - } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attacks4hi", pzenigame_attack_s4_hi_game) - .acmd("game_attacks4", pzenigame_attack_s4_s_game) - .acmd("game_attacks4lw", pzenigame_attack_s4_lw_game) - .acmd("game_attacklw4", pzenigame_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pzenigame/src/acmd/specials.rs b/fighters/pzenigame/src/acmd/specials.rs index 4e80ceba8b..e63efa98e4 100644 --- a/fighters/pzenigame/src/acmd/specials.rs +++ b/fighters/pzenigame/src/acmd/specials.rs @@ -1,91 +1,86 @@ - use super::*; -unsafe extern "C" fn pzenigame_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 24.0/(43.0-9.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + FT_MOTION_RATE(agent, 24.0/(43.0-9.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } frame(lua_state, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn pzenigame_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 24.0/(43.0-9.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + FT_MOTION_RATE(agent, 24.0/(43.0-9.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } frame(lua_state, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_specialhi", pzenigame_special_hi_game) - .acmd("game_specialairhi", pzenigame_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/pzenigame/src/acmd/throws.rs b/fighters/pzenigame/src/acmd/throws.rs index c7a031a55a..7e1da6082e 100644 --- a/fighters/pzenigame/src/acmd/throws.rs +++ b/fighters/pzenigame/src/acmd/throws.rs @@ -1,74 +1,70 @@ - use super::*; -unsafe extern "C" fn pzenigame_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.1, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pzenigame_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 pzenigame_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_catch", pzenigame_catch_game) - .acmd("game_catchdash", pzenigame_catch_dash_game) - .acmd("game_catchturn", pzenigame_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/pzenigame/src/acmd/tilts.rs b/fighters/pzenigame/src/acmd/tilts.rs index 99361804a8..93d9400d4e 100644 --- a/fighters/pzenigame/src/acmd/tilts.rs +++ b/fighters/pzenigame/src/acmd/tilts.rs @@ -1,124 +1,118 @@ - use super::*; -unsafe extern "C" fn pzenigame_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pzenigame_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pzenigame_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pzenigame_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 6.0, 88, 90, 0, 50, 5.0, 1.7, 0.7, 0.7, Some(1.7), Some(0.7), Some(0.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 88, 90, 0, 50, 5.2, 1.7, 1.2, 1.2, Some(1.7), Some(1.2), Some(1.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 88, 90, 0, 50, 4.0, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 6.0, 88, 90, 0, 50, 5.0, 1.7, 0.7, 0.7, Some(1.7), Some(0.7), Some(0.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 88, 90, 0, 50, 5.2, 1.7, 1.2, 1.2, Some(1.7), Some(1.2), Some(1.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 88, 90, 0, 50, 4.0, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pzenigame_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 3.5, 0.0, 3.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 2.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 3.5, 0.0, 3.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 2.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attacks3hi", pzenigame_attack_s3_hi_game) - .acmd("game_attacks3", pzenigame_attack_s3_s_game) - .acmd("game_attacks3lw", pzenigame_attack_s3_lw_game) - .acmd("game_attackhi3", pzenigame_attack_hi3_game) - .acmd("game_attacklw3", pzenigame_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pzenigame/src/lib.rs b/fighters/pzenigame/src/lib.rs index 7bb0378152..77f22346b1 100644 --- a/fighters/pzenigame/src/lib.rs +++ b/fighters/pzenigame/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pzenigame"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/pzenigame/src/opff.rs b/fighters/pzenigame/src/opff.rs index 97ad7f0699..bd67a8c201 100644 --- a/fighters/pzenigame/src/opff.rs +++ b/fighters/pzenigame/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { //PM-like neutral-b canceling if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { @@ -101,13 +100,13 @@ pub extern "C" fn pzenigame_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFight pzenigame_frame(fighter) } } + pub unsafe fn pzenigame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .on_line(Main, pzenigame_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pzenigame_frame_wrapper); } diff --git a/fighters/pzenigame/src/status.rs b/fighters/pzenigame/src/status.rs deleted file mode 100644 index 4e99adcd09..0000000000 --- a/fighters/pzenigame/src/status.rs +++ /dev/null @@ -1,34 +0,0 @@ -use super::*; -use globals::*; -// status script import - -pub unsafe extern "C" fn end_run(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_Run(); - MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); - 0.into() -} - -unsafe extern "C" fn pzenigame_special_s_loop_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let ret = smashline::original_status(Main, fighter, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP)(fighter); - DamageModule::set_damage_lock(fighter.module_accessor, false); - ret -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; - let object = utils::util::get_battle_object_from_id(parent_id); - VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) -} - -pub fn install() { - smashline::Agent::new("pzenigame") - .status(End, *FIGHTER_STATUS_KIND_RUN, end_run) - .status( - Main, - *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP, - pzenigame_special_s_loop_main, - ) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); -} diff --git a/fighters/pzenigame/src/status/mod.rs b/fighters/pzenigame/src/status/mod.rs new file mode 100644 index 0000000000..8c81a7f0f3 --- /dev/null +++ b/fighters/pzenigame/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod run; +mod special_s; +mod special_lw; + +pub fn install(agent: &mut Agent) { + run::install(agent); + special_s::install(agent); + special_lw::install(agent); +} diff --git a/fighters/pzenigame/src/status/run.rs b/fighters/pzenigame/src/status/run.rs new file mode 100644 index 0000000000..22e0c8416f --- /dev/null +++ b/fighters/pzenigame/src/status/run.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_STATUS_KIND_RUN + +pub unsafe extern "C" fn run_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_Run(); + MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_RUN, run_end); +} diff --git a/fighters/pzenigame/src/status/special_lw.rs b/fighters/pzenigame/src/status/special_lw.rs new file mode 100644 index 0000000000..072070aa07 --- /dev/null +++ b/fighters/pzenigame/src/status/special_lw.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; + let object = utils::util::get_battle_object_from_id(parent_id); + VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} \ No newline at end of file diff --git a/fighters/pzenigame/src/status/special_s.rs b/fighters/pzenigame/src/status/special_s.rs new file mode 100644 index 0000000000..66dbb19be2 --- /dev/null +++ b/fighters/pzenigame/src/status/special_s.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP + +unsafe extern "C" fn special_s_loop_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let ret = smashline::original_status(Main, fighter, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP)(fighter); + DamageModule::set_damage_lock(fighter.module_accessor, false); + ret +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_main); +} diff --git a/fighters/reflet/src/acmd/aerials.rs b/fighters/reflet/src/acmd/aerials.rs index fc5946acd7..18b5f0ca77 100644 --- a/fighters/reflet/src/acmd/aerials.rs +++ b/fighters/reflet/src/acmd/aerials.rs @@ -1,53 +1,53 @@ use super::*; -unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } else { @@ -55,11 +55,11 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -68,80 +68,79 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn reflet_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 26.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } -unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(12.0)); + FT_MOTION_RATE(agent, 9.0/(12.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -150,11 +149,11 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -163,88 +162,87 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn reflet_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); app::sv_animcmd::execute(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } } -unsafe extern "C" fn reflet_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } } -unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -253,11 +251,11 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -266,71 +264,69 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn reflet_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } - } -unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -339,16 +335,16 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { AttackModule::clear_all(boma); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -358,89 +354,89 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 24.0); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } -unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { //Air-Only Hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); //Ground-Only Hitboxes - ATTACK(fighter, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -449,71 +445,72 @@ unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } - } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attackairn", reflet_attack_air_n_game) - .acmd("effect_attackairn", reflet_attack_air_n_effect) - .acmd("game_attackairf", reflet_attack_air_f_game) - .acmd("expression_attackairf", reflet_attack_air_f_expression) - .acmd("effect_attackairf", reflet_attack_air_f_effect) - .acmd("game_attackairb", reflet_attack_air_b_game) - .acmd("effect_attackairb", reflet_attack_air_b_effect) - .acmd("game_attackairhi", reflet_attack_air_hi_game) - .acmd("effect_attackairhi", reflet_attack_air_hi_effect) - .acmd("game_attackairlw", reflet_attack_air_lw_game) - .acmd("effect_attackairlw", reflet_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/reflet/src/acmd/ground.rs b/fighters/reflet/src/acmd/ground.rs index 9598da2f4e..69eef10aa6 100644 --- a/fighters/reflet/src/acmd/ground.rs +++ b/fighters/reflet/src/acmd/ground.rs @@ -1,182 +1,182 @@ - use super::*; -unsafe extern "C" fn reflet_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 2.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(22.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(22.0-7.0)); AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn reflet_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.5); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_HI_CURRENT_POINT) > 1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } frame(lua_state, 7.0); if WorkModule::get_float(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLOAT_SPECIAL_S_CURRENT_POINT) > 0.1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn reflet_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_100_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let boma = agent.boma(); for _ in 0..99 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 3); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - wait_loop_clear(fighter); - } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + wait_loop_clear(agent); + } } } -unsafe extern "C" fn reflet_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attack11", reflet_attack_11_game) - .acmd("expression_attack11", reflet_attack_11_expression) - .acmd("game_attack12", reflet_attack_12_game) - .acmd("expression_attack12", reflet_attack_12_expression) - .acmd("game_attack13", reflet_attack_13_game) - .acmd("game_attack100", reflet_attack_100_game) - .acmd("game_attack100end", reflet_attack_100_end_game) - .acmd("game_attackdash", reflet_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100", game_attack100); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/reflet/src/acmd/mod.rs b/fighters/reflet/src/acmd/mod.rs index 484e04a282..d8a22387b4 100644 --- a/fighters/reflet/src/acmd/mod.rs +++ b/fighters/reflet/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index a7b427c197..d96e3303ec 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -1,313 +1,105 @@ - 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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_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(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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_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_reflet_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn reflet_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, 17.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); - } -} - -unsafe extern "C" fn reflet_elwind_shoot0_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_elwind_landing_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"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn reflet_arcthunder_shoot2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcthunder_spark_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *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); - ATTACK(fighter, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *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); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn reflet_thoron_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); - //let damage = (1 + (charge-1)*9/14) as f32; - let damage = 1.5 + (charge/2) as f32; if is_excute(agent) { - if charge > 0 && charge <= 8 { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *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); - - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *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); - } - AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn reflet_arcfire_burn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, 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); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, 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); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.45); - } -} - -pub fn install() { - smashline::Agent::new("reflet_gigafire") - .acmd("game_burn", reflet_arcfire_burn_game) - .acmd("game_rise", reflet_arcfire_rise_game) - .acmd("effect_rise", reflet_arcfire_rise_effect) - .install(); - smashline::Agent::new("reflet") - .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", reflet_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("reflet_thunder") - .acmd("game_shoot2", reflet_arcthunder_shoot2_game) - .acmd("game_gigaspark", reflet_arcthunder_spark_game) - .acmd("game_tron0", reflet_thoron_game) - .install(); - smashline::Agent::new("reflet_elwind") - .acmd("game_shoot0", reflet_elwind_shoot0_game) - .acmd("game_landing", reflet_elwind_landing_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); } diff --git a/fighters/reflet/src/acmd/smashes.rs b/fighters/reflet/src/acmd/smashes.rs index 3fc3547a9e..c2bf431dac 100644 --- a/fighters/reflet/src/acmd/smashes.rs +++ b/fighters/reflet/src/acmd/smashes.rs @@ -1,35 +1,34 @@ - use super::*; -unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.323); + FT_MOTION_RATE(agent, 0.323); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -38,86 +37,85 @@ unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); } } } - } -unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *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_SWORD); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -125,12 +123,10 @@ unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { } } } - } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks4", reflet_attack_s4_s_game) - .acmd("game_attacklw4", reflet_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/reflet/src/acmd/specials.rs b/fighters/reflet/src/acmd/specials.rs index f67b622627..aedbcba5cc 100644 --- a/fighters/reflet/src/acmd/specials.rs +++ b/fighters/reflet/src/acmd/specials.rs @@ -1,50 +1,49 @@ - use super::*; -unsafe extern "C" fn reflet_special_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_air_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.7); //FAF is frame 61 +unsafe extern "C" fn game_specialntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.7); //FAF is frame 61 } -unsafe extern "C" fn reflet_special_air_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.35); //FAF is frame 63 +unsafe extern "C" fn game_specialairntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.35); //FAF is frame 63 } -unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -54,30 +53,29 @@ unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } } wait(lua_state, 1.0); } - } -unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -87,29 +85,21 @@ unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } } wait(lua_state, 1.0); } - } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_specialntronstart", reflet_special_n_tron_start_game) - .acmd( - "game_specialairntronstart", - reflet_special_air_n_tron_start_game, - ) - .acmd("game_specialntronend", reflet_special_n_tron_end_game) - .acmd( - "game_specialairntronend", - reflet_special_air_n_tron_end_game, - ) - .acmd("game_specialhi", reflet_special_hi_game) - .acmd("game_specialairhi", reflet_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialntronstart", game_specialntronstart); + agent.acmd( "game_specialairntronstart",game_specialairntronstart); + agent.acmd("game_specialntronend", game_specialntronend); + agent.acmd("game_specialairntronend",game_specialairntronend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/reflet/src/acmd/throws.rs b/fighters/reflet/src/acmd/throws.rs index 285f1bfbe7..656210151a 100644 --- a/fighters/reflet/src/acmd/throws.rs +++ b/fighters/reflet/src/acmd/throws.rs @@ -1,31 +1,30 @@ use super::*; -unsafe extern "C" fn reflet_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 reflet_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -45,7 +44,7 @@ unsafe extern "C" fn reflet_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,83 +64,84 @@ unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 21, 9); + CHECK_FINISH_CAMERA(agent, 21, 9); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn reflet_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 18); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 47.0, 19.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 47.0, 19.0); frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 6); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 37.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 37.0, 11.0); frame(lua_state, 37.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_catch", reflet_catch_game) - .acmd("game_catchdash", reflet_catch_dash_game) - .acmd("game_catchturn", reflet_catch_turn_game) - .acmd("game_throwb", reflet_throw_b_game) - .acmd("game_throwhi", reflet_throw_hi_game) - .acmd("game_throwlw", reflet_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/reflet/src/acmd/tilts.rs b/fighters/reflet/src/acmd/tilts.rs index 7380fc2422..7404cc1113 100644 --- a/fighters/reflet/src/acmd/tilts.rs +++ b/fighters/reflet/src/acmd/tilts.rs @@ -1,158 +1,156 @@ use super::*; -unsafe extern "C" fn reflet_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 17.0/(33.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0/(33.0-13.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn reflet_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn reflet_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn reflet_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 4.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 4.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 5.0); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 8.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 22.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 22.0, 19.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 4.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks3", reflet_attack_s3_s_game) - .acmd("expression_attacks3", reflet_attack_s3_s_expression) - .acmd("game_attackhi3", reflet_attack_hi3_game) - .acmd("expression_attackhi3", reflet_attack_hi3_expression) - .acmd("game_attacklw3", reflet_attack_lw3_game) - .acmd("expression_attacklw3", reflet_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/reflet/src/elwind/acmd.rs b/fighters/reflet/src/elwind/acmd.rs new file mode 100644 index 0000000000..77acde61e7 --- /dev/null +++ b/fighters/reflet/src/elwind/acmd.rs @@ -0,0 +1,33 @@ +use super::*; + +unsafe extern "C" fn game_shoot0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, 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_NONE, *ATTACK_REGION_NONE); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot0", game_shoot0); + + agent.acmd("game_landing", game_landing); +} diff --git a/fighters/reflet/src/elwind/mod.rs b/fighters/reflet/src/elwind/mod.rs new file mode 100644 index 0000000000..a913d87998 --- /dev/null +++ b/fighters/reflet/src/elwind/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_elwind"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/gigafire/acmd.rs b/fighters/reflet/src/gigafire/acmd.rs new file mode 100644 index 0000000000..1c0be1d233 --- /dev/null +++ b/fighters/reflet/src/gigafire/acmd.rs @@ -0,0 +1,46 @@ +use super::*; + +unsafe extern "C" fn game_burn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, 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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_rise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, 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); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, 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); + } +} + +unsafe extern "C" fn effect_rise(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.45); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_burn", game_burn); + + agent.acmd("game_rise", game_rise); + agent.acmd("effect_rise", effect_rise); +} diff --git a/fighters/reflet/src/gigafire/mod.rs b/fighters/reflet/src/gigafire/mod.rs new file mode 100644 index 0000000000..336fda9e89 --- /dev/null +++ b/fighters/reflet/src/gigafire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_gigafire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/lib.rs b/fighters/reflet/src/lib.rs index 1ad1fd8b2b..35474ae73e 100644 --- a/fighters/reflet/src/lib.rs +++ b/fighters/reflet/src/lib.rs @@ -3,8 +3,15 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +mod gigafire; +mod thunder; +mod elwind; use smash::{ lib::{ @@ -36,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); -} + let agent = &mut Agent::new("reflet"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + gigafire::install(); + thunder::install(); + elwind::install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/opff.rs b/fighters/reflet/src/opff.rs index ac0320ba4c..56f5d1bf59 100644 --- a/fighters/reflet/src/opff.rs +++ b/fighters/reflet/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { //PM-like neutral-b canceling @@ -136,8 +135,7 @@ pub unsafe fn reflet_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("reflet") - .on_line(Main, reflet_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, reflet_frame_wrapper); } diff --git a/fighters/reflet/src/status/attack_air.rs b/fighters/reflet/src/status/attack_air.rs index 837ceb9120..f8e31d7e73 100644 --- a/fighters/reflet/src/status/attack_air.rs +++ b/fighters/reflet/src/status/attack_air.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR extern "Rust" { #[link_name = "attack_air_float_pre"] @@ -8,11 +9,11 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } -unsafe extern "C" fn reflet_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::reflet::FLOAT.into()) } -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND].get_i32() != statuses::reflet::FLOAT { VisibilityModule::set_int64(fighter.module_accessor, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON); @@ -21,14 +22,12 @@ pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn reflet_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_main(fighter, statuses::reflet::FLOAT.into()) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/reflet/src/status/float.rs b/fighters/reflet/src/status/float.rs index 1013e2930f..4b7089d887 100644 --- a/fighters/reflet/src/status/float.rs +++ b/fighters/reflet/src/status/float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "float_pre_common"] @@ -12,6 +11,8 @@ extern "Rust" { fn float_end_common(fighter: &mut L2CFighterCommon) -> L2CValue; } +// statuses::reflet::FLOAT + unsafe extern "C" fn float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { float_pre_common(fighter) } @@ -222,10 +223,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, statuses::reflet::FLOAT, float_pre) - .status(Main, statuses::reflet::FLOAT, float_main) - .status(End, statuses::reflet::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::reflet::FLOAT, float_pre); + agent.status(Main, statuses::reflet::FLOAT, float_main); + agent.status(End, statuses::reflet::FLOAT, float_end); } diff --git a/fighters/reflet/src/status.rs b/fighters/reflet/src/status/mod.rs similarity index 87% rename from fighters/reflet/src/status.rs rename to fighters/reflet/src/status/mod.rs index d8583fe0c2..d2c7602f34 100644 --- a/fighters/reflet/src/status.rs +++ b/fighters/reflet/src/status/mod.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attack_air; @@ -33,12 +35,12 @@ unsafe extern "C" fn reflet_on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::reflet::FLOAT); } -pub fn install() { - attack_air::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(reflet_on_start); - special_n::install(); + attack_air::install(agent); - float::install(); + special_n::install(agent); - Agent::new("reflet").on_start(reflet_on_start).install(); + float::install(agent); } diff --git a/fighters/reflet/src/status/special_n.rs b/fighters/reflet/src/status/special_n.rs index 9538415d0b..ed0d93d846 100644 --- a/fighters/reflet/src/status/special_n.rs +++ b/fighters/reflet/src/status/special_n.rs @@ -1,13 +1,12 @@ use super::*; -use globals::*; -pub unsafe extern "C" fn init_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_N + +pub unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::set_int(fighter.battle_object, vars::reflet::instance::THUNDER_CHARGE, fighter.get_int(*FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_N_CURRENT_POINT)); smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); } diff --git a/fighters/reflet/src/thunder/acmd.rs b/fighters/reflet/src/thunder/acmd.rs new file mode 100644 index 0000000000..4bfacba53f --- /dev/null +++ b/fighters/reflet/src/thunder/acmd.rs @@ -0,0 +1,60 @@ +use super::*; + +unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *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); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *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); + } + frame(lua_state, 25.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_tron0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); + //let damage = (1 + (charge-1)*9/14) as f32; + let damage = 1.5 + (charge/2) as f32; + if is_excute(agent) { + if charge > 0 && charge <= 8 { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *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); + + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *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); + } + AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot2", game_shoot2); + + agent.acmd("game_gigaspark", game_gigaspark); + + agent.acmd("game_tron0", game_tron0); +} diff --git a/fighters/reflet/src/thunder/mod.rs b/fighters/reflet/src/thunder/mod.rs new file mode 100644 index 0000000000..5cd1daa939 --- /dev/null +++ b/fighters/reflet/src/thunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_thunder"); + acmd::install(agent); + agent.install(); +} diff --git a/fighters/richter/src/acmd/other.rs b/fighters/richter/src/acmd/other.rs index 9ab58eb7a0..354f35843d 100644 --- a/fighters/richter/src/acmd/other.rs +++ b/fighters/richter/src/acmd/other.rs @@ -47,7 +47,7 @@ unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - + } unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { diff --git a/fighters/ridley/src/acmd/aerials.rs b/fighters/ridley/src/acmd/aerials.rs index a26fd59814..213f3e2f73 100644 --- a/fighters/ridley/src/acmd/aerials.rs +++ b/fighters/ridley/src/acmd/aerials.rs @@ -1,65 +1,63 @@ - use super::*; -unsafe extern "C" fn ridley_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 12.0, 44, 73, 0, 55, 5.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 9.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 9.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 12.0, 44, 73, 0, 55, 5.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 9.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 9.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 9.0, 44, 74, 0, 55, 5.5, 7.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 6.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 9.0, 44, 74, 0, 55, 5.5, 7.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 6.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 63.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 ridley_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_tail_arc_02"), Hash40::new("ridley_tail_arc_02"), Hash40::new("top"), 0, 12, -1, 0, 0, 90, 0.75, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_tail_arc_02"), Hash40::new("ridley_tail_arc_02"), Hash40::new("top"), 0, 12, -1, 0, 0, 90, 0.75, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.4); } } -unsafe extern "C" fn ridley_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 66, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 66, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); @@ -68,233 +66,224 @@ unsafe extern "C" fn ridley_attack_air_f_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 5, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 7.0, 361, 87, 0, 45, 5.0, 6.4, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 5.0, 361, 90, 0, 45, 6.5, -0.5, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 90, 0, 45, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 7.0, 361, 87, 0, 45, 5.0, 6.4, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 5.0, 361, 90, 0, 45, 6.5, -0.5, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 90, 0, 45, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.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 ridley_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 7.0/(13.0 - 1.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 55, 94, 0, 35, 6.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0, 361, 82, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 16.0, 361, 82, 0, 35, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 55, 94, 0, 35, 6.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0, 361, 82, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 16.0, 361, 82, 0, 35, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(31.0 - 27.0)); - } + FT_MOTION_RATE_RANGE(agent, 27.0, 31.0, 5.0); frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ridley_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_air_b"), Hash40::new("ridley_air_b"), Hash40::new("top"), 0, 8, -6, -183, 35, 18, 0.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_air_b"), Hash40::new("ridley_air_b"), Hash40::new("top"), 0, 8, -6, -183, 35, 18, 0.9, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn ridley_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 90, 70, 0, 70, 5.5, 0.0, 34.5, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 90, 70, 0, 70, 5.5, 0.0, 34.5, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ridley_attack_air_lw_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(19.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 19.0, 10.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail4"), 12.0, 361, 50, 0, 60, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail4"), 12.0, 361, 50, 0, 60, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.5); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ridley_attack_air_lw_effect(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 10, -5, 0, -40, 90, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 10, -5, 0, -40, 90, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 0.55); } } -unsafe extern "C" fn ridley_attack_air_lw_sound(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_attackair_n01")); } } -unsafe extern "C" fn ridley_attack_air_lw_expression(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("tail7"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } } -unsafe extern "C" fn ridley_landing_air_lw_sound(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_landing02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_landing02")); } } -unsafe extern "C" fn ridley_landing_air_lw_expression(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_landingairlw(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); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, 0); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attackairn", ridley_attack_air_n_game) - .acmd("effect_attackairn", ridley_attack_air_n_effect) - .acmd("game_attackairf", ridley_attack_air_f_game) - .acmd("game_attackairb", ridley_attack_air_b_game) - .acmd("effect_attackairb", ridley_attack_air_b_effect) - .acmd("game_attackairhi", ridley_attack_air_hi_game) - .acmd("game_attackairlw", ridley_attack_air_lw_game) - .acmd("effect_attackairlw", ridley_attack_air_lw_effect) - .acmd("sound_attackairlw", ridley_attack_air_lw_sound) - .acmd("expression_attackairlw", ridley_attack_air_lw_expression) - .acmd("sound_landingairlw", ridley_landing_air_lw_sound) - .acmd("expression_landingairlw", ridley_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/ridley/src/acmd/ground.rs b/fighters/ridley/src/acmd/ground.rs index d8c785db29..fb4be33901 100644 --- a/fighters/ridley/src/acmd/ground.rs +++ b/fighters/ridley/src/acmd/ground.rs @@ -1,110 +1,99 @@ - use super::*; -unsafe extern "C" fn ridley_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.5, 180, 15, 0, 25, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.5, 180, 15, 0, 25, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - frame(lua_state, 16.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } } -unsafe extern "C" fn ridley_attack11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), 0, 12, 4, -24.6, -5, 209, 1.35, true, *EF_FLIP_YZ); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), 0, 12, 4, -24.6, -5, 209, 1.35, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn ridley_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.5, 361, 20, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 361, 20, 0, 30, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 2.5, 361, 20, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.5, 361, 20, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 361, 20, 0, 30, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 2.5, 361, 20, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - frame(lua_state, 18.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } } -unsafe extern "C" fn ridley_attack12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), -1, 10.5, 7.5, 8.5, 5.7, 33.2, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), -1, 10.5, 7.5, 8.5, 5.7, 33.2, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn ridley_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.0, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.8, 0.0, 7.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.0, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.8, 0.0, 7.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.9 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 42, 80, 0, 70, 7.0, 0.0, 6.5, 14.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 42, 80, 0, 70, 7.0, 0.0, 6.5, 14.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attack11", ridley_attack_11_game) - .acmd("effect_attack11", ridley_attack11_effect) - .acmd("game_attack12", ridley_attack_12_game) - .acmd("effect_attack12", ridley_attack12_effect) - .acmd("game_attack13", ridley_attack_13_game) - .acmd("game_attackdash", ridley_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ridley/src/acmd/mod.rs b/fighters/ridley/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/ridley/src/acmd/mod.rs +++ b/fighters/ridley/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ridley/src/acmd/other.rs b/fighters/ridley/src/acmd/other.rs index 5175dbca9a..59a5964173 100644 --- a/fighters/ridley/src/acmd/other.rs +++ b/fighters/ridley/src/acmd/other.rs @@ -1,230 +1,133 @@ - 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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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(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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_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_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_ridley_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ridley_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dashturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + 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); } } -unsafe extern "C" fn ridley_breath_fly_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"), 5.0, 50, 48, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 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_NONE); - } - wait(lua_state, 30.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 4.0); - WorkModule::on_flag(boma, *WEAPON_RIDLEY_BREATH_INSTANCE_WORK_ID_FLAG_CHANGE_SCALE); - } -} +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("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_dashturn); -pub fn install() { - smashline::Agent::new("ridley") - .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("expression_landingheavy", expression_landingheavy) - .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) - .install(); - smashline::Agent::new("ridley_breath") - .acmd("game_fly", ridley_breath_fly_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ridley/src/acmd/smashes.rs b/fighters/ridley/src/acmd/smashes.rs index 0c9db4b660..a50142b87b 100644 --- a/fighters/ridley/src/acmd/smashes.rs +++ b/fighters/ridley/src/acmd/smashes.rs @@ -1,94 +1,91 @@ - use super::*; -unsafe extern "C" fn ridley_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 7.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 82, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 82, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } - } -unsafe extern "C" fn ridley_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 17.0, 82, 81, 0, 58, 6.0, -1.5, -1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 17.0, 82, 81, 0, 58, 6.0, -1.5, -1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_lw4_expression(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_attacklw4(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); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter,*MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent,*MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 24.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, 0); } frame(lua_state, 53.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attacks4", ridley_attack_s4_s_game) - .acmd("game_attackhi4", ridley_attack_hi4_game) - .acmd("expression_attacklw4", ridley_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4s); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ridley/src/acmd/specials.rs b/fighters/ridley/src/acmd/specials.rs index 4b83d52cca..8c87cd1843 100644 --- a/fighters/ridley/src/acmd/specials.rs +++ b/fighters/ridley/src/acmd/specials.rs @@ -1,641 +1,548 @@ - use super::*; -unsafe extern "C" fn ridley_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(15.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 6.0); } -unsafe extern "C" fn ridley_special_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } } -unsafe extern "C" fn ridley_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_FLAG_SHOOT); } } -unsafe extern "C" fn ridley_special_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_bleath_hold"), Hash40::new("mouth1"), 5, 1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_bleath_hold"), Hash40::new("mouth1"), 5, 1, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_bleath_hold"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_bleath_hold"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ridley_special_s02")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn ridley_special_n_explode_expression(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); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_ridley_special_s02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); } } -unsafe extern "C" fn ridley_special_air_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn expression_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } -unsafe extern "C" fn ridley_special_air_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ridley_special_s02")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 8.0, 6.0, 7.5, 7.5); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_S_FLAG_START_JUMP); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 7.0, 6.0, 7.5, 5.5); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 7.8, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 4.3, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 5.0, 0.0, 8.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 7.8, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 4.3, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 8.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); GrabModule::set_constraint(boma, 0, true); GrabModule::set_constraint(boma, 1, true); GrabModule::set_constraint(boma, 2, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 39.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn ridley_special_air_hi_charge_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 40, 66, 0, 75, 6.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairhichargef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 40, 66, 0, 75, 6.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 4.0, 0.0, 16.3, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 6.0, 0.0, 13.5, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairhichargeb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 4.0, 0.0, 16.3, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 6.0, 0.0, 13.5, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 4.0, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 6.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairhichargehi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 4.0, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 6.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhichargelw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 295, 35, 0, 50, 6.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 44, 50, 0, 85, 6.5, 0.0, 4.5, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 295, 35, 0, 50, 6.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 44, 50, 0, 85, 6.5, 0.0, 4.5, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_lw_stab_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstab(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 30.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::ridley::status::SKEWER_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::ridley::status::SKEWER_STICK_Y); let mut z_mod = -1.0 * grab_y; // no angle (normal Skewer) if grab_y == 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(29.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(29.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } // angle up else if grab_y > 0.0 { z_mod = 3.0 * grab_y; - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } // angle down else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } if WorkModule::get_int(boma, *FIGHTER_RIDLEY_INSTANCE_WORK_ID_INT_DISABLE_SPECIAL_LW_FINISH_COUNT) <= 0 { AttackModule::set_no_dead_all(boma, true, false); } - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.3); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.3); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_lw_stab_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstab(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::ridley::status::SKEWER_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::ridley::status::SKEWER_STICK_Y); let mut rot = 0 - ((grab_y * 25.0) as i32); let mut y_mod = if grab_y == 0.0 {0.0} else if grab_y > 0.0 {6.0} else {-3.0}; if grab_y < 0.0 { rot = 0 - ((grab_y * 15.0) as i32); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_death_stab_line"), Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, 8.0 + y_mod, 18, rot, 0, 0, 0.9, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_death_stab_line"), Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, 8.0 + y_mod, 18, rot, 0, 0, 0.9, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 32.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); } } -unsafe extern "C" fn ridley_special_lw_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwfinish(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) { JostleModule::set_status(boma, false); - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 57, 100, 150, 0, 2.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_stab"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 57, 100, 150, 0, 2.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_stab"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); AttackModule::set_no_finish_camera(boma, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, true, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let capture_id = LinkModule::get_node_object_id(boma, *LINK_NO_CAPTURE) as u32; - VarModule::set_int(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_CATCH_ID, capture_id as i32); - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_THROW); + VarModule::set_int(agent.battle_object, vars::ridley::instance::SPECIAL_LW_CATCH_ID, capture_id as i32); + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_THROW); WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_THROW); JostleModule::set_status(boma, true); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn ridley_special_lw_pogo_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); } frame(lua_state, 32.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); /* Air-only */ - ATTACK(fighter, 6, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 7, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 6, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 7, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail7"), 12.0, 46, 70, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail5"), 12.0, 46, 70, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 5, 0, Hash40::new("tail3"), 12.0, 46, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 3, 4, 5, 0.5); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 1, 2, 6, 7, 0.7); + ATTACK(agent, 3, 0, Hash40::new("tail7"), 12.0, 46, 70, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail5"), 12.0, 46, 70, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 5, 0, Hash40::new("tail3"), 12.0, 46, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 3, 4, 5, 0.5); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 1, 2, 6, 7, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 1, 2, 0.5); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 1, 2, 0.5); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); AttackModule::clear_all(boma); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); } } -unsafe extern "C" fn ridley_special_lw_pogo_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, -7, -8, 60, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, -7, -8, 60, 0, 0, 0.9, true); } frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); } } -unsafe extern "C" fn ridley_special_lw_pogo_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_special_l01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_special_l02")); } } -unsafe extern "C" fn ridley_special_lw_pogo_expression(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_speciallwpogo(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); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 0); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(17.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 12.0); frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn ridley_special_lw_pogo_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); +unsafe extern "C" fn effect_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); EffectModule::set_visible_kind(boma, Hash40::new("ridley_death_stab_line"), false); EffectModule::set_visible_kind(boma, Hash40::new("sys_sp_flash"), false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -18, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), -18, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_landing03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_landing03")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_attackair_f01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_attackair_f01")); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, 0); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_specialnstart", ridley_special_n_start_game) - .acmd("game_specialairnstart", ridley_special_n_start_game) - .acmd("game_specialnhold", ridley_special_n_hold_game) - .acmd("game_specialairnhold", ridley_special_n_hold_game) - .acmd("game_specialnshoot", ridley_special_n_shoot_game) - .acmd("game_specialairnshoot", ridley_special_n_shoot_game) - .acmd("game_specialnexplode", ridley_special_n_explode_game) - .acmd("effect_specialnexplode", ridley_special_n_explode_effect) - .acmd("sound_specialnexplode", ridley_special_n_explode_sound) - .acmd( - "expression_specialnexplode", - ridley_special_n_explode_expression, - ) - .acmd("game_specialairnexplode", ridley_special_air_n_explode_game) - .acmd( - "effect_specialairnexplode", - ridley_special_air_n_explode_effect, - ) - .acmd( - "sound_specialairnexplode", - ridley_special_air_n_explode_sound, - ) - .acmd( - "expression_specialairnexplode", - ridley_special_air_n_explode_expression, - ) - .acmd("game_specialsstart", ridley_special_s_start_game) - .acmd("game_specialairsstart", ridley_special_s_start_game) - .acmd( - "game_specialairhichargef", - ridley_special_air_hi_charge_f_game, - ) - .acmd( - "game_specialairhichargeb", - ridley_special_air_hi_charge_b_game, - ) - .acmd( - "game_specialairhichargehi", - ridley_special_air_hi_charge_hi_game, - ) - .acmd( - "game_specialairhichargelw", - ridley_special_air_hi_charge_lw_game, - ) - .acmd("game_speciallwstab", ridley_special_lw_stab_game) - .acmd("game_specialairlwstab", ridley_special_lw_stab_game) - .acmd("effect_speciallwstab", ridley_special_lw_stab_effect) - .acmd("effect_specialairlwstab", ridley_special_lw_stab_effect) - .acmd("game_speciallwfinish", ridley_special_lw_finish_game) - .acmd("game_specialairlwfinish", ridley_special_lw_finish_game) - .acmd("game_specialairlwpogo", ridley_special_lw_pogo_game) - .acmd("effect_specialairlwpogo", ridley_special_lw_pogo_effect) - .acmd("sound_specialairlwpogo", ridley_special_lw_pogo_sound) - .acmd( - "expression_specialairlwpogo", - ridley_special_lw_pogo_expression, - ) - .acmd( - "game_speciallwpogolanding", - ridley_special_lw_pogo_landing_game, - ) - .acmd( - "effect_speciallwpogolanding", - ridley_special_lw_pogo_landing_effect, - ) - .acmd( - "sound_speciallwpogolanding", - ridley_special_lw_pogo_landing_sound, - ) - .acmd( - "expression_speciallwpogolanding", - ridley_special_lw_pogo_landing_expression, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnhold", game_specialnhold); + agent.acmd("game_specialairnhold", game_specialnhold); + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("game_specialnexplode", game_specialnexplode); + agent.acmd("effect_specialnexplode", effect_specialnexplode); + agent.acmd("sound_specialnexplode", sound_specialnexplode); + agent.acmd("expression_specialnexplode", expression_specialnexplode); + agent.acmd("game_specialairnexplode", game_specialnexplode); + agent.acmd("effect_specialairnexplode", effect_specialairnexplode); + agent.acmd("sound_specialairnexplode", sound_specialnexplode); + agent.acmd("expression_specialairnexplode", expression_specialnexplode); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + + agent.acmd("game_specialairhichargef", game_specialairhichargef); + agent.acmd("game_specialairhichargeb", game_specialairhichargeb); + agent.acmd("game_specialairhichargehi", game_specialairhichargehi); + agent.acmd("game_specialairhichargelw", game_specialairhichargelw); + + agent.acmd("game_speciallwstab", game_speciallwstab); + agent.acmd("game_specialairlwstab", game_speciallwstab); + agent.acmd("effect_speciallwstab", effect_speciallwstab); + agent.acmd("effect_specialairlwstab", effect_speciallwstab); + agent.acmd("game_speciallwfinish", game_speciallwfinish); + agent.acmd("game_specialairlwfinish", game_speciallwfinish); + agent.acmd("game_specialairlwpogo", game_speciallwpogo); + agent.acmd("effect_specialairlwpogo", effect_speciallwpogo); + agent.acmd("sound_specialairlwpogo", sound_speciallwpogo); + agent.acmd("expression_specialairlwpogo", expression_speciallwpogo); + agent.acmd("game_speciallwpogolanding", game_speciallwpogolanding); + agent.acmd("effect_speciallwpogolanding", effect_speciallwpogolanding); + agent.acmd("sound_speciallwpogolanding", sound_speciallwpogolanding); + agent.acmd("expression_speciallwpogolanding", expression_speciallwpogolanding); } diff --git a/fighters/ridley/src/acmd/throws.rs b/fighters/ridley/src/acmd/throws.rs index 7d8c3a6018..c27983c501 100644 --- a/fighters/ridley/src/acmd/throws.rs +++ b/fighters/ridley/src/acmd/throws.rs @@ -1,28 +1,27 @@ use super::*; -unsafe extern "C" fn ridley_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ridley_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -42,7 +41,7 @@ unsafe extern "C" fn ridley_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ridley_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -62,76 +61,77 @@ unsafe extern "C" fn ridley_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ridley_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 38, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 38, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 30, 17); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 30, 17); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ridley_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 24, 4); + CHECK_FINISH_CAMERA(agent, 24, 4); } frame(lua_state, 18.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ridley_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 75, 98, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 75, 98, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 4, 1); - CHECK_FINISH_CAMERA(fighter, 19, 2); + if is_excute(agent) { + FT_CATCH_STOP(agent, 4, 1); + CHECK_FINISH_CAMERA(agent, 19, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_catch", ridley_catch_game) - .acmd("game_catchdash", ridley_catch_dash_game) - .acmd("game_catchturn", ridley_catch_turn_game) - .acmd("game_throwf", ridley_throw_f_game) - .acmd("game_throwb", ridley_throw_b_game) - .acmd("game_throwlw", ridley_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ridley/src/acmd/tilts.rs b/fighters/ridley/src/acmd/tilts.rs index 4b5c1cbdaf..225405199c 100644 --- a/fighters/ridley/src/acmd/tilts.rs +++ b/fighters/ridley/src/acmd/tilts.rs @@ -1,167 +1,149 @@ use super::*; -unsafe extern "C" fn ridley_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("wingr2"), 10.0, 85, 110, 0, 55, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr3"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, -5.7, 2.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 10.0, 85, 110, 0, 55, 6.0, 0.0, 13.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("wingr2"), 10.0, 85, 110, 0, 55, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr3"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, -5.7, 2.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 85, 110, 0, 55, 6.0, 0.0, 13.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); AttackModule::clear(boma, 4, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_hi3_expression(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_attackhi3(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); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("wingr1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_wing"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } -unsafe extern "C" fn ridley_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 78, 80, 0, 75, 4.0, 0.0, 3.8, 19.0, Some(0.0), Some(3.8), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 85, 80, 0, 75, 4.5, 0.0, 3.8, 28.5, Some(0.0), Some(3.8), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 78, 80, 0, 75, 4.0, 0.0, 3.8, 19.0, Some(0.0), Some(3.8), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 85, 80, 0, 75, 4.5, 0.0, 3.8, 28.5, Some(0.0), Some(3.8), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn ridley_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_tail_arc"), Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 8.5, 6.5, -9.2, -5, -163, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_tail_arc"), Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 8.5, 6.5, -9.2, -5, -163, 1, true, *EF_FLIP_YZ); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attacks3hi", ridley_attack_s3_hi_game) - .acmd("game_attacks3", ridley_attack_s3_s_game) - .acmd("game_attacks3lw", ridley_attack_s3_lw_game) - .acmd("game_attackhi3", ridley_attack_hi3_game) - .acmd("expression_attackhi3", ridley_attack_hi3_expression) - .acmd("game_attacklw3", ridley_attack_lw3_game) - .acmd("effect_attacklw3", ridley_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/ridley/src/breath/acmd.rs b/fighters/ridley/src/breath/acmd.rs new file mode 100644 index 0000000000..9d3035f8ba --- /dev/null +++ b/fighters/ridley/src/breath/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 48, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 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_NONE); + } + wait(lua_state, 30.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 4.0); + WorkModule::on_flag(boma, *WEAPON_RIDLEY_BREATH_INSTANCE_WORK_ID_FLAG_CHANGE_SCALE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/ridley/src/breath/mod.rs b/fighters/ridley/src/breath/mod.rs new file mode 100644 index 0000000000..99111e0a79 --- /dev/null +++ b/fighters/ridley/src/breath/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ridley_breath"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ridley/src/lib.rs b/fighters/ridley/src/lib.rs index 8e2ddcc726..37ecf3c486 100644 --- a/fighters/ridley/src/lib.rs +++ b/fighters/ridley/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod breath; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ridley"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + breath::install(); } diff --git a/fighters/ridley/src/opff.rs b/fighters/ridley/src/opff.rs index c22dadc700..aab4c8058b 100644 --- a/fighters/ridley/src/opff.rs +++ b/fighters/ridley/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn space_pirate_rush_flight(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, stick_x: f32) { if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FALL { let motion_value1 = 0.9; @@ -162,8 +161,7 @@ pub unsafe fn ridley_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ridley") - .on_line(Main, ridley_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ridley_frame_wrapper); } diff --git a/fighters/ridley/src/status.rs b/fighters/ridley/src/status.rs deleted file mode 100644 index 404ec21f5f..0000000000 --- a/fighters/ridley/src/status.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::*; -use globals::*; - -mod special_n; -mod special_s; -mod special_lw; - -pub fn install() { - special_n::install(); - special_s::install(); - special_lw::install(); -} diff --git a/fighters/ridley/src/status/mod.rs b/fighters/ridley/src/status/mod.rs new file mode 100644 index 0000000000..da6b1473da --- /dev/null +++ b/fighters/ridley/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod special_n; +mod special_s; +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_lw::install(agent); +} diff --git a/fighters/ridley/src/status/special_lw.rs b/fighters/ridley/src/status/special_lw.rs index 8a6275e45c..4a333dd754 100644 --- a/fighters/ridley/src/status/special_lw.rs +++ b/fighters/ridley/src/status/special_lw.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn special_lw_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND || VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB); @@ -154,12 +155,6 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon // return true.into() // } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - special_lw_status_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } \ No newline at end of file diff --git a/fighters/ridley/src/status/special_n.rs b/fighters/ridley/src/status/special_n.rs index c51554c896..8a4d679db4 100644 --- a/fighters/ridley/src/status/special_n.rs +++ b/fighters/ridley/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); @@ -84,6 +85,8 @@ unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, return 0.into() } +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT + unsafe extern "C" fn special_n_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { VarModule::off_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); @@ -144,17 +147,7 @@ unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) } } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT, - special_n_shoot_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main); } \ No newline at end of file diff --git a/fighters/ridley/src/status/special_s.rs b/fighters/ridley/src/status/special_s.rs index a8e4106afe..c943ae1918 100644 --- a/fighters/ridley/src/status/special_s.rs +++ b/fighters/ridley/src/status/special_s.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn special_s_failure_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE + +unsafe extern "C" fn special_s_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue { let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(fighter.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(fighter.module_accessor)) + WorkModule::get_param_int(fighter.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; if cancel_frame < 1.0 { VarModule::set_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, 1.0); @@ -44,12 +45,6 @@ pub unsafe fn side_special_failure_main_loop(fighter: &mut L2CFighterCommon) -> false.into() } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE, - special_s_failure_status_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE, special_s_failure_main); } \ No newline at end of file diff --git a/fighters/robot/src/acmd/aerials.rs b/fighters/robot/src/acmd/aerials.rs index 720e1a74e1..2b84c847dc 100644 --- a/fighters/robot/src/acmd/aerials.rs +++ b/fighters/robot/src/acmd/aerials.rs @@ -1,122 +1,119 @@ use super::*; -unsafe extern "C" fn robot_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 11.0, 75, 100, 0, 50, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("hip"), 11.0, 75, 100, 0, 50, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, 2.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -5.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, 2.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); + ATTACK(agent, 3, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -5.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_BOMB); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - LAST_EFFECT_SET_ALPHA(fighter, 0.45); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.1, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + LAST_EFFECT_SET_ALPHA(agent, 0.45); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.1, 0.1); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); } - } -unsafe extern "C" fn robot_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(6.1-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("handl2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(6.1-6.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("handl2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(7.2-6.1)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("handl2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(7.2-6.1)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("handl2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(9.0-7.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(9.0-7.2)); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(13.0-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(13.0-9.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(35.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(35.0-13.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 8, 180, -130, 90, 1.0, true, *EF_FLIP_ZX); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 8, 180, -130, 90, 1.0, true, *EF_FLIP_ZX); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -129,364 +126,361 @@ unsafe extern "C" fn robot_attack_air_f_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 1.4, 1.4); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 1.4, 1.4); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handr2"), 1.0, 0, 2.0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("handr2"), 1.0, 0, 2.0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.4); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_d"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_d"), false, false); } } -unsafe extern "C" fn robot_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::set_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 0.0); - FT_MOTION_RATE(fighter, 2.0); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::set_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 0.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } else { - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } for _ in 0..5 { wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) - && !VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED) + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) + && !VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED) && WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) > 10.0 { // If holding down the button, increment the charge and continue the slowed animation if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED); - VarModule::add_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 1.0); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED); + VarModule::add_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 1.0); let current_fuel = WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - let current_fuel_depletion = (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0); + let current_fuel_depletion = (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0); if (current_fuel_depletion > current_fuel) { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); WorkModule::set_float(boma, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - MeterModule::drain_direct(fighter.battle_object, 200.0); - FT_MOTION_RATE(fighter, 1.0); + MeterModule::drain_direct(agent.battle_object, 200.0); + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } // If no longer holding the button, play out the rest of the animation as normal else { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); - FT_MOTION_RATE(fighter, 1.0); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + FT_MOTION_RATE(agent, 1.0); } } } } } - if !VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED) { - WorkModule::set_float(boma, WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) - (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - MeterModule::drain_direct(fighter.battle_object, (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0)); - FT_MOTION_RATE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED) { + WorkModule::set_float(boma, WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) - (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + MeterModule::drain_direct(agent.battle_object, (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0)); + FT_MOTION_RATE(agent, 1.0); - if VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX); + if VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX); } } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_BAIR) { - if VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { - SET_SPEED_EX(fighter, 1.75, 0.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { + SET_SPEED_EX(agent, 1.75, 0.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } else { - let boost_speed_x = 1.1 + (0.13 * VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); - let boost_speed_y = 0.0 + (0.04 * VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); - SET_SPEED_EX(fighter, boost_speed_x, boost_speed_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let boost_speed_x = 1.1 + (0.13 * VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); + let boost_speed_y = 0.0 + (0.04 * VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); + SET_SPEED_EX(agent, boost_speed_x, boost_speed_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - let charge_attack_damage_mul = 1.0 + (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); - ATTACK(fighter, 0, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 7.5, 3.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 0.0, 0.0, 0.0, Some(16.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + let charge_attack_damage_mul = 1.0 + (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); + ATTACK(agent, 0, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 7.5, 3.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 0.0, 0.0, 0.0, Some(16.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } else { - ATTACK(fighter, 0, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0, 35, 70, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0, 35, 70, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); WorkModule::off_flag(boma, vars::robot::instance::AIRTIME_BAIR); } frame(lua_state, 24.0); - if is_excute(fighter) { - let charge_attack_damage_mul = 1.0 + (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); - ATTACK(fighter, 0, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + let charge_attack_damage_mul = 1.0 + (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); + ATTACK(agent, 0, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); EffectModule::set_scale_last(boma, &Vector3f::new(0.9, 0.55, 1.0)); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } else { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.35); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 1.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } } - } -unsafe extern "C" fn robot_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - PLAY_SE(fighter, Hash40::new("vc_robot_attack05")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + PLAY_SE(agent, Hash40::new("vc_robot_attack05")); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); wait(lua_state, 3.0); - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { wait(lua_state, 3.0); - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_robot_attackair_b01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_robot_attackair_b01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_robot_attackair_b01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_robot_attackair_b01")); } } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_jet")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_jet")); } } -unsafe extern "C" fn robot_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame_normal = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_lw"), 0); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame_normal = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_boost = landing_frame_normal + 3.0; - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, landing_frame_boost/landing_frame_normal); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, landing_frame_boost/landing_frame_normal); } } } -unsafe extern "C" fn robot_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 8.0, 0.0, 16.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 10.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 8.0, 0.0, 16.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 10.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 2.0, -4.0, Some(0.0), Some(2.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 80, 100, 40, 0, 2.0, 0.0, -3.0, -4.0, Some(0.0), Some(-3.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 2.0, -4.0, Some(0.0), Some(2.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 80, 100, 40, 0, 2.0, 0.0, -3.0, -4.0, Some(0.0), Some(-3.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 85, 0, 45, 6.0, 0.0, 2.5, 0.0, Some(0.0), Some(2.5), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 85, 0, 45, 6.0, 0.0, 2.5, 0.0, Some(0.0), Some(2.5), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn robot_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut effectX = 48.0; frame(lua_state, 6.0); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); @@ -502,90 +496,91 @@ unsafe extern "C" fn robot_attack_air_lw_effect(fighter: &mut L2CAgentBase) { _ => Vector3f::new(0.196, 0.196, 0.216) }; for _ in 0..6 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 3, 10, 1.5, effectX, 30, 0, 1.2, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 3, 10, 1.5, effectX, 30, 0, 1.2, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 3.0); effectX += 8.0; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } wait(lua_state, 3.0); } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3.0, 2.0, 8.0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3.0, 2.0, 8.0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn robot_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_robot_attack07")); - PLAY_SE(fighter, Hash40::new("se_common_swing_07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_robot_attack07")); + PLAY_SE(agent, Hash40::new("se_common_swing_07")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } } -unsafe extern "C" fn robot_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attackairn", robot_attack_air_n_game) - .acmd("effect_attackairn", robot_attack_air_n_effect) - .acmd("game_attackairf", robot_attack_air_f_game) - .acmd("effect_attackairf", robot_attack_air_f_effect) - .acmd("game_attackairb", robot_attack_air_b_game) - .acmd("effect_attackairb", robot_attack_air_b_effect) - .acmd("sound_attackairb", robot_attack_air_b_sound) - .acmd("game_landingairb", robot_landing_air_b_game) - .acmd("game_attackairhi", robot_attack_air_hi_game) - .acmd("game_attackairlw", robot_attack_air_lw_game) - .acmd("effect_attackairlw", robot_attack_air_lw_effect) - .acmd("sound_attackairlw", robot_attack_air_lw_sound) - .acmd("expression_attackairlw", robot_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/robot/src/acmd/ground.rs b/fighters/robot/src/acmd/ground.rs index 0208a5e670..3a4eef627f 100644 --- a/fighters/robot/src/acmd/ground.rs +++ b/fighters/robot/src/acmd/ground.rs @@ -1,78 +1,76 @@ - use super::*; -unsafe extern "C" fn robot_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 9.0, 10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 180, 15, 0, 23, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 9.0, 10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 180, 15, 0, 23, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn robot_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 9.5, 6.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 8.6, 10.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.6, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(15.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 9.5, 6.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 8.6, 10.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.6, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(15.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 6.0, 0.0, 6.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 6.0, 0.0, 6.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 5.0, 0.0, 5.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 5.0, 0.0, 5.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(8.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 5.0, 0.0, 6.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(8.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 5.0, 0.0, 6.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attack11", robot_attack_11_game) - .acmd("game_attack12", robot_attack_12_game) - .acmd("game_attackdash", robot_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/robot/src/acmd/mod.rs b/fighters/robot/src/acmd/mod.rs index e2d01f3d67..d8a22387b4 100644 --- a/fighters/robot/src/acmd/mod.rs +++ b/fighters/robot/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/robot/src/acmd/other.rs b/fighters/robot/src/acmd/other.rs index 8ce1bc18be..86402fc471 100644 --- a/fighters/robot/src/acmd/other.rs +++ b/fighters/robot/src/acmd/other.rs @@ -1,210 +1,119 @@ - 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_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_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(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_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_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_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_robot_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_robot_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, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_landing01")); } } -unsafe extern "C" fn 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, 14.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 robot_beam_fly_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_robobeam_l"), Hash40::new("top"), 0, 0, 2.5, 0, 0, 0, 0.65, true); - } } -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("robot_beam") - .acmd("effect_flymax", robot_beam_fly_max_effect) - .install(); - smashline::Agent::new("robot") - .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("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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/robot/src/acmd/smashes.rs b/fighters/robot/src/acmd/smashes.rs index a5e5ab3cb1..333bc5ecbf 100644 --- a/fighters/robot/src/acmd/smashes.rs +++ b/fighters/robot/src/acmd/smashes.rs @@ -1,137 +1,131 @@ - use super::*; -unsafe extern "C" fn robot_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 12.7, 13.3, Some(0.0), Some(10.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 15.9, 23.200001, Some(0.0), Some(10.6), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 18.799999, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 10.3, 14.0, Some(0.0), Some(10.3), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 10.3, 24.0, Some(0.0), Some(10.3), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 10.3, 34.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 10.3, 14.0, Some(0.0), Some(10.3), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 10.3, 24.0, Some(0.0), Some(10.3), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 10.3, 34.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 12.7, 13.3, Some(0.0), Some(10.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 15.9, 23.200001, Some(0.0), Some(10.6), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 18.799999, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 7.9, 13.3, Some(0.0), Some(9.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 4.7, 23.200001, Some(0.0), Some(10.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 1.8, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 7.9, 13.3, Some(0.0), Some(9.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 4.7, 23.200001, Some(0.0), Some(10.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 1.8, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 100, 100, 135, 0, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 100, 100, 135, 0, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 106, 0, 40, 8.7, 0.0, 25.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 85, 106, 0, 40, 6.2, 0.0, 34.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 106, 0, 40, 8.7, 0.0, 25.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 85, 106, 0, 40, 6.2, 0.0, 34.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - } - + } } -unsafe extern "C" fn robot_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("body"), 5.0, 33, 180, 0, 37, 5.5, -1.5, 0.0, 13.0, Some(-1.5), Some(0.0), Some(-13.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("body"), 5.0, 33, 180, 0, 37, 5.5, -1.5, 0.0, 13.0, Some(-1.5), Some(0.0), Some(-13.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attacks4hi", robot_attack_s4_hi_game) - .acmd("game_attacks4", robot_attack_s4_s_game) - .acmd("game_attacks4lw", robot_attack_s4_lw_game) - .acmd("game_attackhi4", robot_attack_hi4_game) - .acmd("game_attacklw4", robot_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/robot/src/acmd/specials.rs b/fighters/robot/src/acmd/specials.rs index 1dd1dcdfb2..0f8bbc5f3b 100644 --- a/fighters/robot/src/acmd/specials.rs +++ b/fighters/robot/src/acmd/specials.rs @@ -1,69 +1,39 @@ use super::*; -unsafe extern "C" fn robot_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); - ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(37.0-10.0)); - } -} - -unsafe extern "C" fn robot_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); - ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(37.0-10.0)); - } -} - -unsafe extern "C" fn robot_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 9.0, 361, 95, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 361, 95, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 9.0, 361, 95, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 361, 95, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -76,26 +46,26 @@ unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 3, 0, -15, 0, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 3, 0, -15, 0, 1.5, true, *EF_FLIP_YZ); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -108,45 +78,92 @@ unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + } +} + +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s01")); + } + + frame(lua_state, 22.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s04")); + } +} + +unsafe extern "C" fn sound_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s01")); } +} + +unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_spinattacks"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 4); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 21.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } } -unsafe extern "C" fn robot_special_s_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialshi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 7.0, 105, 85, 0, 55, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 105, 85, 0, 55, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 7.0, 105, 85, 0, 55, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 105, 85, 0, 55, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialshi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -159,27 +176,27 @@ unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, 45, 0, -225, 1.5, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, 45, 0, -225, 1.5, true, *EF_FLIP_NONE); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, -45, 0, 45, 1.5, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, -45, 0, 45, 1.5, true, *EF_FLIP_NONE); } let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { @@ -193,46 +210,45 @@ unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 1.5, 1.5); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 1.5, 1.5); } - } -unsafe extern "C" fn robot_special_s_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialslw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 5.0, 25, 35, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 25, 35, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 5.0, 25, 35, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 25, 35, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialslw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -245,20 +261,20 @@ unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10.5, 5, 30, -15, -20, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10.5, 5, 30, -15, -20, 1.5, true, *EF_FLIP_YZ); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -271,293 +287,221 @@ unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 23.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } - } -unsafe extern "C" fn robot_special_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_spinattacks"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 4); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); +} + +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } - frame(lua_state, 21.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); +} + +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_s_damage")); } } -unsafe extern "C" fn robot_special_hi_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn robot_special_hi_rise_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); +unsafe extern "C" fn game_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON); + if is_excute(agent) { + WorkModule::on_flag(boma, vars::robot::status::HELD_BUTTON); let mut workingDamage = robotFrames/3.5; - if robotFrames <= 10.0 { - MeterModule::drain_direct(fighter.object(), 20.0); + MeterModule::drain_direct(agent.object(), 20.0); } else { - MeterModule::drain_direct(fighter.object(), (robotFrames * 2.0)); + MeterModule::drain_direct(agent.object(), (robotFrames * 2.0)); } - if (workingDamage < 4.0) { workingDamage = 0.0; } - if workingDamage != 0.0 { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 4, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 5, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 4, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 5, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } - frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB) { - FT_MOTION_RATE(fighter, 9.0/(22.0-4.0)); + if VarModule::is_flag(agent.battle_object, vars::robot::instance::GROUNDED_UPB) { + FT_MOTION_RATE(agent, 9.0/(22.0-4.0)); } } - /*frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB) { - VarModule::on_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::instance::GROUNDED_UPB) { + VarModule::on_flag(agent.battle_object, vars::robot::instance::UPB_CANCEL); } }*/ - frame(lua_state, 22.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::robot::instance::UPB_CANCEL); } - } -unsafe extern "C" fn robot_special_hi_rise_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.55, 2.25); +unsafe extern "C" fn effect_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.55, 2.25); } if (robotFrames/3.5) > 4.0 { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 8.55); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 8.55); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 3.15, 0.55, 0.55); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 3.15, 0.55, 0.55); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); } } else { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.1, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.1, 0.1); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); } } } -unsafe extern "C" fn robot_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - } -} - -unsafe extern "C" fn robot_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - } -} - -unsafe extern "C" fn robot_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_s_damage")); - } -} - -unsafe extern "C" fn robot_special_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_s_damage")); - } -} - -unsafe extern "C" fn robot_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn robot_special_air_s_start_sound(fighter: &mut L2CAgentBase) { -} - - -unsafe extern "C" fn robot_special_air_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s01")); - } -} - -unsafe extern "C" fn robot_special_air_s_end_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_s_start_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s01")); - } - - frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } -} - -unsafe extern "C" fn robot_special_s_end_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_hi_rise_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); +unsafe extern "C" fn expression_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if (robotFrames/4.0) >= 12.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); } else if (robotFrames/4.0) >= 8.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else if (robotFrames/4.0) >= 4.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } - - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_speciallw", robot_special_lw_game) - .acmd("game_specialairlw", robot_special_air_lw_game) - .acmd("game_specials", robot_special_s_game) - .acmd("game_specialairs", robot_special_s_game) - .acmd("effect_specials", robot_special_s_effect) - .acmd("effect_specialairs", robot_special_s_effect) - .acmd("game_specialshi", robot_special_s_hi_game) - .acmd("game_specialairshi", robot_special_s_hi_game) - .acmd("effect_specialshi", robot_special_s_hi_effect) - .acmd("effect_specialairshi", robot_special_s_hi_effect) - .acmd("game_specialslw", robot_special_s_lw_game) - .acmd("game_specialairslw", robot_special_s_lw_game) - .acmd("effect_specialslw", robot_special_s_lw_effect) - .acmd("effect_specialairslw", robot_special_s_lw_effect) - .acmd("expression_specials", robot_special_s_expression) - .acmd("expression_specialairs", robot_special_s_expression) - .acmd("expression_specialshi", robot_special_s_expression) - .acmd("expression_specialairshi", robot_special_s_expression) - .acmd("expression_specialslw", robot_special_s_expression) - .acmd("expression_specialairslw", robot_special_s_expression) - .acmd("game_specialhi", robot_special_hi_game) - .acmd("game_specialairhi", robot_special_hi_game) - .acmd("game_specialhirise", robot_special_hi_rise_game) - .acmd("effect_specialhirise", robot_special_hi_rise_effect) - .acmd("effect_specialhi", robot_special_hi_effect) - .acmd("effect_specialairhi", robot_special_air_hi_effect) - .acmd("sound_specialhi", robot_special_hi_sound) - .acmd("sound_specialairhi", robot_special_air_hi_sound) - .acmd("expression_specialhi", robot_special_hi_expression) - .acmd("expression_specialairhi", robot_special_hi_expression) - .acmd("sound_specialairsstart", robot_special_air_s_start_sound) - .acmd("sound_specialairs", robot_special_air_s_sound) - .acmd("sound_specialairsend", robot_special_air_s_end_sound) - .acmd("sound_specialsstart", robot_special_s_start_sound) - .acmd("sound_specials", robot_special_s_sound) - .acmd("sound_specialsend", robot_special_s_end_sound) - .acmd("expression_specialhirise", robot_special_hi_rise_expression) - .install(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); + ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 21.0/(37.0-10.0)); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specialairs); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); + + agent.acmd("game_specialshi", game_specialshi); + agent.acmd("game_specialairshi", game_specialshi); + agent.acmd("effect_specialshi", effect_specialshi); + agent.acmd("effect_specialairshi", effect_specialshi); + agent.acmd("expression_specialshi", expression_specials); + agent.acmd("expression_specialairshi", expression_specials); + + agent.acmd("game_specialslw", game_specialslw); + agent.acmd("game_specialairslw", game_specialslw); + agent.acmd("effect_specialslw", effect_specialslw); + agent.acmd("effect_specialairslw", effect_specialslw); + agent.acmd("expression_specialslw", expression_specials); + agent.acmd("expression_specialairslw", expression_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("sound_specialairhi", sound_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("expression_specialairhi", expression_specialhi); + + agent.acmd("game_specialhirise", game_specialhirise); + agent.acmd("effect_specialhirise", effect_specialhirise); + agent.acmd("expression_specialhirise", expression_specialhirise); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + + agent.acmd("sound_specialsstart", stub); + agent.acmd("sound_specialairsstart", stub); + agent.acmd("sound_specialsend", stub); + agent.acmd("sound_specialairsend", stub); } diff --git a/fighters/robot/src/acmd/throws.rs b/fighters/robot/src/acmd/throws.rs index 0023a5c601..737114893c 100644 --- a/fighters/robot/src/acmd/throws.rs +++ b/fighters/robot/src/acmd/throws.rs @@ -1,109 +1,106 @@ use super::*; -unsafe extern "C" fn robot_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.3); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.3); + 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 robot_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.19); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.19); + 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 robot_catch_turn_game(fghter: &mut L2CAgentBase) { - let lua_state = fghter.lua_state_agent; - let boma = fghter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fghter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fghter) { - CATCH(fghter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -2.0, Some(0.0), Some(8.0), Some(-15.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -2.0, Some(0.0), Some(8.0), Some(-15.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fghter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fghter) { - grab!(fghter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 63, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 63, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 50.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 114, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 3); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 114, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 58.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_catch", robot_catch_game) - .acmd("game_catchdash", robot_catch_dash_game) - .acmd("game_catchturn", robot_catch_turn_game) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/robot/src/acmd/tilts.rs b/fighters/robot/src/acmd/tilts.rs index 1c836a22a0..20f544132a 100644 --- a/fighters/robot/src/acmd/tilts.rs +++ b/fighters/robot/src/acmd/tilts.rs @@ -1,112 +1,106 @@ - use super::*; -unsafe extern "C" fn robot_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("fingerl1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("fingerr1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("fingerl1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("fingerr1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 13.0, 6.0, Some(0.0), Some(13.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 13.0, 6.0, Some(0.0), Some(13.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 90, 80, 0, 55, 4.5, 27.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 4.0, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 90, 80, 0, 55, 4.5, 27.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 4.0, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 35, 80, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 361, 20, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 35, 80, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 361, 20, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attacks3hi", robot_attack_s3_hi_game) - .acmd("game_attacks3", robot_attack_s3_s_game) - .acmd("game_attacks3lw", robot_attack_s3_lw_game) - .acmd("game_attackhi3", robot_attack_hi3_game) - .acmd("game_attacklw3", robot_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/robot/src/beam/acmd.rs b/fighters/robot/src/beam/acmd.rs new file mode 100644 index 0000000000..2e340484b0 --- /dev/null +++ b/fighters/robot/src/beam/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn effect_flymax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_robobeam_l"), Hash40::new("top"), 0, 0, 2.5, 0, 0, 0, 0.65, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_flymax", effect_flymax); +} diff --git a/fighters/robot/src/beam/mod.rs b/fighters/robot/src/beam/mod.rs new file mode 100644 index 0000000000..094609e935 --- /dev/null +++ b/fighters/robot/src/beam/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("robot_beam"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/robot/src/lib.rs b/fighters/robot/src/lib.rs index 8e2ddcc726..cbcf485cb0 100644 --- a/fighters/robot/src/lib.rs +++ b/fighters/robot/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod beam; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("robot"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + beam::install(); } diff --git a/fighters/robot/src/opff.rs b/fighters/robot/src/opff.rs index aea6e97b20..0d61c4f8d6 100644 --- a/fighters/robot/src/opff.rs +++ b/fighters/robot/src/opff.rs @@ -186,7 +186,6 @@ unsafe fn meter_control(boma: &mut BattleObjectModuleAccessor) { MeterModule::drain_direct(boma.object(), 2.0); } } - } pub unsafe fn moveset(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { @@ -229,9 +228,8 @@ pub unsafe fn robot_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("robot") - .on_line(Main, robot_frame_wrapper) - .on_line(Main, robot_meter) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, robot_frame_wrapper); + agent.on_line(Main, robot_meter); } diff --git a/fighters/robot/src/status/mod.rs b/fighters/robot/src/status/mod.rs new file mode 100644 index 0000000000..bd3c2188e3 --- /dev/null +++ b/fighters/robot/src/status/mod.rs @@ -0,0 +1,11 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; +mod special_hi; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); +} diff --git a/fighters/robot/src/status.rs b/fighters/robot/src/status/special_hi.rs similarity index 66% rename from fighters/robot/src/status.rs rename to fighters/robot/src/status/special_hi.rs index 5b653e301a..eb09002ad0 100644 --- a/fighters/robot/src/status.rs +++ b/fighters/robot/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -317,14 +318,6 @@ unsafe extern "C" fn special_hi_end(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - unsafe extern "C" fn special_hi_keep_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_rise"), 0.0, 1.0, false, 0.0, false, false); @@ -410,14 +403,6 @@ unsafe extern "C" fn special_hi_keep_main_loop(fighter: &mut L2CFighterCommon) - 0.into() } -unsafe extern "C" fn special_hi_keep_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_keep_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - unsafe extern "C" fn special_hi_keep_end(fighter: &mut L2CFighterCommon) -> L2CValue { PostureModule::set_rot(fighter.module_accessor, &Vector3f::zero(), 0); @@ -427,216 +412,18 @@ unsafe extern "C" fn special_hi_keep_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s"), 0.0, 1.0, false, 0.0, false, false); - //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR); - } else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); - } - - fighter.main_shift(special_s_main_loop) -} - -unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - let boma = fighter.module_accessor; - - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - } - - //momentum hop code - /*if frame == 3.0 { - if current_situation_kind == *SITUATION_KIND_AIR && - WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { - - let velocity = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::clear_speed_all(fighter.module_accessor); - - if velocity >= 0.0 { - let vec = Vector3f{x: 0.05, y: 0.25, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } else { - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - ground_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: 0.35, y: 1.55, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } - } else if current_situation_kind == *SITUATION_KIND_GROUND { - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - ground_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: 0.45, y: 0.0, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } - }*/ - - if frame >= 12.0 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - /*} else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP);*/ - } - } - - if frame > 15.0 - && frame <= 18.0 { - let stick_y = ControlModule::get_stick_y(fighter.module_accessor); - if stick_y > 0.3 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_hi"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_hi"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); - } - } else if stick_y < -0.3 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_lw"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_lw"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } - } else { - PLAY_SE(fighter, Hash40::new("se_robot_special_s02")); - } - } - - if frame == 18.0 && - current_situation_kind == *SITUATION_KIND_AIR && - WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, FIGHTER_KINETIC_ENERGY_ID_MOTION); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } - - if frame == 19.0 { - WorkModule::off_flag(fighter.module_accessor, vars::robot::instance::AIRTIME_SIDEB); - } - - if StatusModule::is_situation_changed(fighter.module_accessor) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), -1.0, 1.0, 0.0, false, false); - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s"), -1.0, 1.0, 0.0, false, false); - } - } - - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); - } - - 0.into() - -} - -unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exec_stop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn stub_status(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -pub fn install() { - smashline::Agent::new("robot") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_init) - .status( - Main, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_main, - ) - .status( - Init, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_init, - ) - .status( - Exec, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_exec, - ) - .status( - End, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_end, - ) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .status( - ExecStop, - *FIGHTER_STATUS_KIND_SPECIAL_S, - special_s_exec_stop, - ) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end) - .status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit) - .status( - Main, - *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, - special_s_attack_main, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end); + agent.status(Main, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_main); + agent.status(End, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_end); + + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, stub_status); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, stub_status); + agent.status(Init, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, stub_status); + agent.status(Exec, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, stub_status); +} \ No newline at end of file diff --git a/fighters/robot/src/status/special_s.rs b/fighters/robot/src/status/special_s.rs new file mode 100644 index 0000000000..ea7fca38ea --- /dev/null +++ b/fighters/robot/src/status/special_s.rs @@ -0,0 +1,163 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s"), 0.0, 1.0, false, 0.0, false, false); + //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR); + } else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); + } + + fighter.main_shift(special_s_main_loop) +} + +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + let boma = fighter.module_accessor; + + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + } + + //momentum hop code + /*if frame == 3.0 { + if current_situation_kind == *SITUATION_KIND_AIR && + WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { + + let velocity = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::clear_speed_all(fighter.module_accessor); + + if velocity >= 0.0 { + let vec = Vector3f{x: 0.05, y: 0.25, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } else { + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + ground_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: 0.35, y: 1.55, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } + } else if current_situation_kind == *SITUATION_KIND_GROUND { + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + ground_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: 0.45, y: 0.0, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } + }*/ + + if frame >= 12.0 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + /*} else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP);*/ + } + } + + if frame > 15.0 + && frame <= 18.0 { + let stick_y = ControlModule::get_stick_y(fighter.module_accessor); + if stick_y > 0.3 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_hi"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_hi"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); + } + } else if stick_y < -0.3 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_lw"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_lw"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); + } + } else { + PLAY_SE(fighter, Hash40::new("se_robot_special_s02")); + } + } + + if frame == 18.0 && + current_situation_kind == *SITUATION_KIND_AIR && + WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, FIGHTER_KINETIC_ENERGY_ID_MOTION); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + } + + if frame == 19.0 { + WorkModule::off_flag(fighter.module_accessor, vars::robot::instance::AIRTIME_SIDEB); + } + + if StatusModule::is_situation_changed(fighter.module_accessor) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), -1.0, 1.0, 0.0, false, false); + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s"), -1.0, 1.0, 0.0, false, false); + } + } + + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); + } + + 0.into() +} + +unsafe extern "C" fn stub_status(fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Main, *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, stub_status); +} \ No newline at end of file diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index 8680b37b73..01a7af7e6b 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -1,245 +1,253 @@ - use super::*; -unsafe extern "C" fn rockman_attackairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 3.0); +unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 62, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 62, 80, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("footl"), 7.0, 62, 80, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 4.5, 62, 80, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.5, 62, 80, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("footl"), 4.5, 62, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 35.0); + frame(lua_state, 35.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rockman_attackairn_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); +unsafe extern "C" fn effect_attackairnmelee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 6, 1, 30, 0, 0, 0.6, true, *EF_FLIP_YZ, 1); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true, 0.5); LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn rockman_attackairn_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); +unsafe extern "C" fn sound_attackairnmelee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } -unsafe extern "C" fn rockman_attackairn_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairnmelee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn rockman_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0, 55, 84, 0, 60, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0, 55, 84, 0, 60, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 10.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 10.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rockman_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_flamesword"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_flamesword"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("rockman_flamesword_ptc"), Hash40::new("top"), 0, 9.0, 0.0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("rockman_flamesword_arc"), Hash40::new("top"), 0.0, 9.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("rockman_flamesword_ptc"), Hash40::new("top"), 0, 9.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_flamesword_arc"), Hash40::new("top"), 0.0, 9.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("rockman_flamesword"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("rockman_flamesword"), -1); } } -unsafe extern "C" fn rockman_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn rockman_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 2.0 / 3.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0 / 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 5.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.0, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 5.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.0, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 6.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.5, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 6.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.5, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 7.6, 0.0, 9.5, -13.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 4.5, 0.0, 9.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 7.6, 0.0, 9.5, -13.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 4.5, 0.0, 9.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rockman_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_slashcraw"), Hash40::new("rockman_slashcraw"), Hash40::new("top"), 0, 10, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 3.0 / 2.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_slashcraw"), Hash40::new("rockman_slashcraw"), Hash40::new("top"), 0, 10, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 3.0 / 2.0); } } -unsafe extern "C" fn rockman_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(9.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(9.0 - 1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_AIRSHOOTER, false, 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rockman_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(23.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(23.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_HARDKNUCKLE, false, 0); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairnmelee", rockman_attackairn); - agent.acmd("effect_attackairnmelee", rockman_attackairn_eff); - agent.acmd("sound_attackairnmelee", rockman_attackairn_snd); - agent.acmd("expression_attackairnmelee", rockman_attackairn_exp); - agent.acmd("game_attackairf", rockman_attack_air_f_game); - agent.acmd("effect_attackairf", rockman_attack_air_f_effect); - agent.acmd("expression_attackairf", rockman_attack_air_f_expression); - agent.acmd("game_attackairb", rockman_attack_air_b_game); - agent.acmd("effect_attackairb", rockman_attack_air_b_effect); - agent.acmd("game_attackairhi", rockman_attack_air_hi_game); - agent.acmd("game_attackairlw", rockman_attack_air_lw_game); + agent.acmd("game_attackairnmelee", game_attackairnmelee); + agent.acmd("effect_attackairnmelee", effect_attackairnmelee); + agent.acmd("sound_attackairnmelee", sound_attackairnmelee); + agent.acmd("expression_attackairnmelee", expression_attackairnmelee); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index 01d566a8e4..f69b240a01 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -1,250 +1,267 @@ - use super::*; -unsafe extern "C" fn rockman_attack11(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); +unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 15, 0, 30, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 100, 15, 0, 30, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 4.5, Some(0.0), Some(3.3), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - // frame(agent.lua_state_agent, 20.0); + // frame(lua_state, 20.0); // if is_excute(agent) { - // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } -unsafe extern "C" fn rockman_attack11_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); +unsafe extern "C" fn effect_attack11melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 8, 0, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 8, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn rockman_attack11_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); +unsafe extern "C" fn sound_attack11melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_s")); } } -unsafe extern "C" fn rockman_attack11_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack11melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(agent.module_accessor, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn rockman_attack12(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 15, 0, 30, 4.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 15, 0, 30, 3.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - // frame(agent.lua_state_agent, 20.0); + // frame(lua_state, 20.0); // if is_excute(agent) { - // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } -unsafe extern "C" fn rockman_attack12_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 8, 2, 10, -39, 10, 0.95, true, *EF_FLIP_YZ); FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn rockman_attack12_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); +unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } -unsafe extern "C" fn rockman_attack12_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack12(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); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 5); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn rockman_attack13(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 74, 70, 0, 70, 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attack13_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -80, 0, 0, 1.0, true, *EF_FLIP_YZ); EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 4, -80, 0, 0, 1.0, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -80, 0, 0, 1.0, true); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn rockman_attack13_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 9.0); +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 9.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_step_right_m")); } } -unsafe extern "C" fn rockman_attack13_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack13(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); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn rockman_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0 / (22.0 - 8.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 70, 0, 60, 4.0, 0.0, 5.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0 / (22.0 - 8.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 70, 0, 60, 4.0, 0.0, 5.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 65, 70, 0, 75, 2.5, 0.0, 5.0, 3.5, Some(0.0), Some(10.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 65, 70, 0, 75, 2.5, 0.0, 5.0, 3.5, Some(0.0), Some(10.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 14.0 / (58.0 - 25.0)); + FT_MOTION_RATE(agent, 14.0 / (58.0 - 25.0)); } frame(lua_state, 58.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn rockman_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 8, 0, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 11, -1, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 3, -6, 0, 180, 0, 0.6, true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 8, 0, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 11, -1, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 3, -6, 0, 180, 0, 0.6, true, *EF_FLIP_YZ, 0.6); } wait(lua_state, 5.0); } - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn rockman_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_rockman_attackhard_l01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_rockman_attackhard_l01")); } } -unsafe extern "C" fn rockman_attack_dash_expression(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_INTP, SLOPE_STATUS_LR, 6); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_LEFT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_RIGHT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); +unsafe extern "C" fn expression_attackdash(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_INTP, SLOPE_STATUS_LR, 6); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_LEFT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_RIGHT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitm"), @@ -254,30 +271,33 @@ unsafe extern "C" fn rockman_attack_dash_expression(fighter: &mut L2CAgentBase) ); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 6); } wait(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 6); } } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11melee", rockman_attack11); - agent.acmd("effect_attack11melee", rockman_attack11_eff); - agent.acmd("sound_attack11melee", rockman_attack11_snd); - agent.acmd("expression_attack11melee", rockman_attack11_exp); - agent.acmd("game_attack12", rockman_attack12); - agent.acmd("effect_attack12", rockman_attack12_eff); - agent.acmd("sound_attack12", rockman_attack12_snd); - agent.acmd("expression_attack12", rockman_attack12_exp); - agent.acmd("game_attack13", rockman_attack13); - agent.acmd("effect_attack13", rockman_attack13_eff); - agent.acmd("sound_attack13", rockman_attack13_snd); - agent.acmd("expression_attack13", rockman_attack13_exp); - agent.acmd("game_attackdash", rockman_attack_dash_game); - agent.acmd("effect_attackdash", rockman_attack_dash_effect); - agent.acmd("sound_attackdash", rockman_attack_dash_sound); - agent.acmd("expression_attackdash", rockman_attack_dash_expression); + agent.acmd("game_attack11melee", game_attack11melee); + agent.acmd("effect_attack11melee", effect_attack11melee); + agent.acmd("sound_attack11melee", sound_attack11melee); + agent.acmd("expression_attack11melee", expression_attack11melee); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("sound_attack12", sound_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/rockman/src/acmd/mod.rs b/fighters/rockman/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/rockman/src/acmd/mod.rs +++ b/fighters/rockman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 01f42b0696..b0a1cb8842 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -1,101 +1,100 @@ - use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_rockman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_rockman_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, 6.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_rockman_step_right_m"), Hash40::new("se_rockman_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_rockman_step_right_m"), Hash40::new("se_rockman_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_rockman_step_left_m"), Hash40::new("se_rockman_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_rockman_step_left_m"), Hash40::new("se_rockman_step_right_m")); } } -unsafe extern "C" fn 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, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } /* -#[acmd_script( agent = "rockman_crashbomb", script = "game_regular" , category = ACMD_GAME , low_priority)] -unsafe fn rockman_crashbomb_stick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// rockman_crashbomb +unsafe fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("body").hash as i64, Hash40::new("body_open").hash as i64); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(owner_boma, rockman::DETONATE_CRASHBOMB){ ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } - } */ -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(agent: &mut Agent) { - agent.acmd("game_dash", dash_game); - agent.acmd("sound_dash", dash_sound); - agent.acmd("game_turndash", turn_dash_game); - agent.acmd("game_escapeair", escape_air_game); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index b3b9613f7c..3c643b02ae 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -1,397 +1,421 @@ - use super::*; -unsafe extern "C" fn rockman_attacks4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 361, 60, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 361, 60, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attacks4_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 9, 3, 90, -90, -40, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn rockman_attacks4_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } -unsafe extern "C" fn rockman_attacks4_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 35.0); + frame(lua_state, 35.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn rockman_attacks4hi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 72, 60, 0, 90, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 72, 60, 0, 90, 4.0, 0.0, 6.0, 2.0, Some(0.0), Some(16.0), Some(3.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { - AttackModule::clear(agent.module_accessor, 1, false); + AttackModule::clear(boma, 1, false); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attacks4hi_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2.5, 0, 3, -80, 0, 10, 1, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn rockman_attacks4hi_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 13.0); +unsafe extern "C" fn sound_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 13.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")) } } -unsafe extern "C" fn rockman_attacks4hi_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn rockman_attacks4lw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 361, 40, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 361, 40, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attacks4lw_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 1.5, -7, 0, 8, -5, 1, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn rockman_attacks4lw_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); +unsafe extern "C" fn sound_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } -unsafe extern "C" fn rockman_attacks4lw_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn rockman_attacks4charge_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 12, 0, 4, 0, 0, 0, false); } for _ in 0..i32::MAX { - wait(agent.lua_state_agent, 5.0); + wait(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, false); } } } -unsafe extern "C" fn rockman_attacks4charge_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); +unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_smash_start")); } } -unsafe extern "C" fn rockman_attacks4charge_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.8, -1, 0.8, 0.8, -1, Hash40::new("invalid")); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 61.0); + frame(lua_state, 61.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn rockman_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, 6.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, -8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, 6.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, -8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 90, 100, 40, 0, 3.0, 0.0, 9.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 2.3, 0.0, 23.799999, 3.0, Some(0.0), Some(23.799999), Some(-3.0), 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 7.0, 0.0, 19.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 90, 100, 40, 0, 3.0, 0.0, 9.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 2.3, 0.0, 23.799999, 3.0, Some(0.0), Some(23.799999), Some(-3.0), 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 7.0, 0.0, 19.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 11.0, 0.0, 19.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 11.0, 0.0, 19.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rockman_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.818); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.818); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", rockman_attacks4); - agent.acmd("effect_attacks4", rockman_attacks4_eff); - agent.acmd("sound_attacks4", rockman_attacks4_snd); - agent.acmd("expression_attacks4", rockman_attacks4_exp); - agent.acmd("game_attacks4hi", rockman_attacks4hi); - agent.acmd("effect_attacks4hi", rockman_attacks4hi_eff); - agent.acmd("sound_attacks4hi", rockman_attacks4hi_snd); - agent.acmd("expression_attacks4hi", rockman_attacks4hi_exp); - agent.acmd("game_attacks4lw", rockman_attacks4lw); - agent.acmd("effect_attacks4lw", rockman_attacks4lw_eff); - agent.acmd("sound_attacks4lw", rockman_attacks4lw_snd); - agent.acmd("expression_attacks4lw", rockman_attacks4lw_exp); - agent.acmd("effect_attacks4charge", rockman_attacks4charge_eff); - agent.acmd("sound_attacks4charge", rockman_attacks4charge_snd); - agent.acmd("expression_attacks4charge", rockman_attacks4charge_exp); - agent.acmd("game_attackhi4", rockman_attack_hi4_game); - agent.acmd("game_attacklw4", rockman_attack_lw4_game); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("sound_attacks4hi", sound_attacks4hi); + agent.acmd("expression_attacks4hi", expression_attacks4hi); + + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("sound_attacks4lw", sound_attacks4lw); + agent.acmd("expression_attacks4lw", expression_attacks4lw); + + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("sound_attacks4charge", sound_attacks4charge); + agent.acmd("expression_attacks4charge", expression_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index 963a2d27aa..50f1b10248 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -1,272 +1,287 @@ - use super::*; -unsafe extern "C" fn rockman_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 12.6, 5.5, Some(0.0), Some(6.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 9.6, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 12.6, 5.5, Some(0.0), Some(6.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 9.6, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(25.0 - 5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(25.0 - 5.0)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rockman_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_specialn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 11.0); +unsafe extern "C" fn game_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); FT_MOTION_RATE(agent, 1.0 / 7.0); - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CHARGESHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CHARGESHOT, false, -1); VarModule::off_flag(agent.battle_object, vars::rockman::status::CHARGE_SHOT_KEEP_CHARGE); } } -unsafe extern "C" fn rockman_specialn_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("rockman_chargeshot_elec"), Hash40::new("havel"), 0, 0, -1.5, 0, 0, 0, 1, true); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_chargeshot_shot"), Hash40::new("rockman_chargeshot_shot"), Hash40::new("top"), 0, 7.2, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn rockman_specialn_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); +unsafe extern "C" fn sound_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_rockman_smash_s02")); } } -unsafe extern "C" fn rockman_specialn_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_ROCKBUSTER, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 18.0); - if WorkModule::get_float(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE) < 1.0 { + frame(lua_state, 18.0); + if WorkModule::get_float(boma, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE) < 1.0 { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } else { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } -unsafe extern "C" fn rockman_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, false, 0); } else{ - //VarModule::on_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + //VarModule::on_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *WEAPON_ROCKMAN_CRASHBOMB_STATUS_KIND_EXPLODE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - FT_MOTION_RATE(fighter, 15.0 / (44.0 - 19.0)); + FT_MOTION_RATE(agent, 15.0 / (44.0 - 19.0)); } } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn rockman_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_light"), Hash40::new("havel"), 0, 0, 1.2, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_light"), Hash40::new("havel"), 0, 0, 1.2, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_misfire"), Hash40::new("rockman_clashbomb_misfire"), Hash40::new("top"), 0, 7.5, 10, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_misfire"), Hash40::new("rockman_clashbomb_misfire"), Hash40::new("top"), 0, 7.5, 10, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn rockman_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, false, 0); } else{ - //VarModule::on_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + //VarModule::on_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *WEAPON_ROCKMAN_CRASHBOMB_STATUS_KIND_EXPLODE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } - } -unsafe extern "C" fn rockman_special_air_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn rockman_speciallw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 5.0); - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { - ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); + ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rockman_specialairlw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 5.0); - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { - ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); + ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } FT_MOTION_RATE(agent, 1.0); } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", rockman_attack_11_game); - agent.acmd("game_attackairn", rockman_attack_air_n_game); - agent.acmd("game_attacks3", rockman_attack_s3_game); - agent.acmd("game_busterchargeshot", rockman_specialn); - agent.acmd("game_busterairchargeshot", rockman_specialn); - agent.acmd("effect_busterchargeshot", rockman_specialn_eff); - agent.acmd("effect_busterairchargeshot", rockman_specialn_eff); - agent.acmd("sound_busterchargeshot", rockman_specialn_snd); - agent.acmd("sound_busterairchargeshot", rockman_specialn_snd); - agent.acmd("expression_busterchargeshot", rockman_specialn_exp); - agent.acmd("expression_busterairchargeshot", rockman_specialn_exp); - agent.acmd("game_specials", rockman_special_s_game); - agent.acmd("effect_specials", rockman_special_s_effect); - agent.acmd("game_specialairs", rockman_special_air_s_game); - agent.acmd("effect_specialairs", rockman_special_air_s_effect); - agent.acmd("game_speciallw", rockman_speciallw); - agent.acmd("game_specialairlw", rockman_specialairlw); + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_busterchargeshot", game_busterchargeshot); + agent.acmd("effect_busterchargeshot", effect_busterchargeshot); + agent.acmd("sound_busterchargeshot", sound_busterchargeshot); + agent.acmd("expression_busterchargeshot", expression_busterchargeshot); + + agent.acmd("game_busterairchargeshot", game_busterchargeshot); + agent.acmd("effect_busterairchargeshot", effect_busterchargeshot); + agent.acmd("sound_busterairchargeshot", sound_busterchargeshot); + agent.acmd("expression_busterairchargeshot", expression_busterchargeshot); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + + agent.acmd("game_speciallw", game_speciallw); + + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/rockman/src/acmd/throws.rs b/fighters/rockman/src/acmd/throws.rs index dcdf8a8361..e852fd2b19 100644 --- a/fighters/rockman/src/acmd/throws.rs +++ b/fighters/rockman/src/acmd/throws.rs @@ -1,149 +1,150 @@ use super::*; -unsafe extern "C" fn rockman_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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.6, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); GrabModule::set_constraint(boma, 0, true); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.16); + FT_MOTION_RATE(agent, 1.16); } -unsafe extern "C" fn rockman_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.6, 4.5, Some(0.0), Some(6.6), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.6, 4.5, Some(0.0), Some(6.6), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); GrabModule::set_constraint(boma, 0, true); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.17); + FT_MOTION_RATE(agent, 1.17); } -unsafe extern "C" fn rockman_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 2.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.6, -3.8, Some(0.0), Some(6.6), Some(-14.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.6, -3.8, Some(0.0), Some(6.6), Some(-14.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); GrabModule::set_constraint(boma, 0, true); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 rockman_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 13); + CHECK_FINISH_CAMERA(agent, 13, 13); } frame(lua_state, 18.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn rockman_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 14.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 14.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 21); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn rockman_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 75, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 75, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 7, 1); - CHECK_FINISH_CAMERA(fighter, 10, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 7, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", rockman_catch_game); - agent.acmd("game_catchdash", rockman_catch_dash_game); - agent.acmd("game_catchturn", rockman_catch_turn_game); - agent.acmd("game_throwb", rockman_throw_b_game); - agent.acmd("game_throwhi", rockman_throw_hi_game); - agent.acmd("game_throwlw", rockman_throw_lw_game); -} + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index 70502ad43b..ca0b4f89fc 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -1,171 +1,178 @@ use super::*; -unsafe extern "C" fn rockman_attacks3(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 13.0); +unsafe extern "C" fn game_attacks3melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 0.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 270, 10, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.2); } - frame(agent.lua_state_agent, 21.0); + frame(lua_state, 21.0); FT_MOTION_RATE_RANGE(agent, 21.0, 53.0, 26.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 53.0); + frame(lua_state, 53.0); FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rockman_attacks3_eff(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); +unsafe extern "C" fn effect_attacks3melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -8, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_jump_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 8, -1, 10, -39, -140, 0.95, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 3.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn rockman_attacks3_snd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); +unsafe extern "C" fn sound_attacks3melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_jump01")); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_step_left_m")); } } -unsafe extern "C" fn rockman_attacks3_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3melee(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_L); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn rockman_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0 / (6.0 - 5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0 / (6.0 - 5.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 85, 73, 0, 84, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 85, 73, 0, 84, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 85, 54, 0, 80, 6.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 85, 54, 0, 80, 6.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rockman_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 10.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 10.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_power"), Hash40::new("armr"), 3.5, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_power"), Hash40::new("armr"), 3.5, 0, 0, 0, 0, 0, 1, true); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), 4, 3, -2, 5, 0, 10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), 4, 3, -2, 5, 0, 10, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), -4, 3, -2, 5, 0, -10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), -4, 3, -2, 5, 0, -10, 1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("rockman_rockupper_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("rockman_rockupper_arc"), -1); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("rockman_rockupper_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("rockman_rockupper_arc"), true, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("rockman_rockupper_power"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("rockman_rockupper_power"), false, true); } } -unsafe extern "C" fn rockman_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.75); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.75); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0 / (22.0 - 5.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 67, 60, 0, 70, 3.25, 0.0, 3.2, 3.5, Some(0.0), Some(3.2), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0 / (22.0 - 5.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 67, 60, 0, 70, 3.25, 0.0, 3.2, 3.5, Some(0.0), Some(3.2), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 30.0 / (46.0 - 22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 30.0 / (46.0 - 22.0)); JostleModule::set_status(boma, true); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3melee", rockman_attacks3); - agent.acmd("effect_attacks3melee", rockman_attacks3_eff); - agent.acmd("sound_attacks3melee", rockman_attacks3_snd);; - agent.acmd("expression_attacks3melee", rockman_attacks3_exp); - agent.acmd("game_attackhi3", rockman_attack_hi3_game); - agent.acmd("effect_attackhi3", rockman_attack_hi3_effect); - agent.acmd("game_attacklw3", rockman_attack_lw3_game); + agent.acmd("game_attacks3melee", game_attacks3melee); + agent.acmd("effect_attacks3melee", effect_attacks3melee); + agent.acmd("sound_attacks3melee", sound_attacks3melee);; + agent.acmd("expression_attacks3melee", expression_attacks3melee); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/rockman/src/airshooter/acmd.rs b/fighters/rockman/src/airshooter/acmd.rs new file mode 100644 index 0000000000..b097813655 --- /dev/null +++ b/fighters/rockman/src/airshooter/acmd.rs @@ -0,0 +1,24 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 366, 100, 50, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + } + frame(lua_state, 20.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::rockman_airshooter::status::MOVE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 50, 0, 90, 7.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + WorkModule::on_flag(boma, *WEAPON_ROCKMAN_AIRSHOOTER_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/rockman/src/airshooter/acmd/aerials.rs b/fighters/rockman/src/airshooter/acmd/aerials.rs deleted file mode 100644 index b704fa947a..0000000000 --- a/fighters/rockman/src/airshooter/acmd/aerials.rs +++ /dev/null @@ -1,24 +0,0 @@ -use super::*; - -unsafe extern "C" fn rockman_airshooter_regular_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"), 1.0, 366, 100, 50, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::rockman_airshooter::status::MOVE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 50, 0, 90, 7.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, 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_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - WorkModule::on_flag(boma, *WEAPON_ROCKMAN_AIRSHOOTER_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_airshooter_regular_game); -} diff --git a/fighters/rockman/src/airshooter/acmd/mod.rs b/fighters/rockman/src/airshooter/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/rockman/src/airshooter/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/airshooter/status/regular.rs b/fighters/rockman/src/airshooter/status.rs similarity index 100% rename from fighters/rockman/src/airshooter/status/regular.rs rename to fighters/rockman/src/airshooter/status.rs diff --git a/fighters/rockman/src/airshooter/status/mod.rs b/fighters/rockman/src/airshooter/status/mod.rs deleted file mode 100644 index ed205154ce..0000000000 --- a/fighters/rockman/src/airshooter/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod regular; - -pub fn install(agent: &mut Agent) { - regular::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/chargeshot/acmd/specials.rs b/fighters/rockman/src/chargeshot/acmd.rs similarity index 70% rename from fighters/rockman/src/chargeshot/acmd/specials.rs rename to fighters/rockman/src/chargeshot/acmd.rs index 06435989c8..a334dec74d 100644 --- a/fighters/rockman/src/chargeshot/acmd/specials.rs +++ b/fighters/rockman/src/chargeshot/acmd.rs @@ -1,8 +1,9 @@ use super::*; -unsafe extern "C" fn rockman_chargeshot_regular(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { - let is_charge_max = 1.0 <= WorkModule::get_float(agent.module_accessor, *WEAPON_ROCKMAN_CHARGESHOT_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + let is_charge_max = 1.0 <= WorkModule::get_float(boma, *WEAPON_ROCKMAN_CHARGESHOT_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); let damage; let bkb; let kbg; @@ -18,10 +19,10 @@ unsafe extern "C" fn rockman_chargeshot_regular(agent: &mut L2CAgentBase) { } ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, bkb, 2.6, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.32); - AttackModule::enable_safe_pos(agent.module_accessor); + AttackModule::enable_safe_pos(boma); } } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_chargeshot_regular); + agent.acmd("game_regular", game_regular); } diff --git a/fighters/rockman/src/chargeshot/acmd/mod.rs b/fighters/rockman/src/chargeshot/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/chargeshot/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/chargeshot/status/regular.rs b/fighters/rockman/src/chargeshot/status.rs similarity index 96% rename from fighters/rockman/src/chargeshot/status/regular.rs rename to fighters/rockman/src/chargeshot/status.rs index 4bf544a332..6df8ec3617 100644 --- a/fighters/rockman/src/chargeshot/status/regular.rs +++ b/fighters/rockman/src/chargeshot/status.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_chargeshot_regular_init(weapon: &mut L2CWeaponCommon) -> L2CValue { +unsafe extern "C" fn regular_init(weapon: &mut L2CWeaponCommon) -> L2CValue { // Original Implementation // let life_min = WorkModule::get_param_int(weapon.module_accessor, hash40("param_chargeshot"), hash40("life_min")); // let life_max = WorkModule::get_param_int(weapon.module_accessor, hash40("param_chargeshot"), hash40("life_max")); @@ -97,6 +97,6 @@ pub fn install(agent: &mut Agent) { agent.status( Init, *WEAPON_ROCKMAN_CHARGESHOT_STATUS_KIND_REGULAR, - rockman_chargeshot_regular_init, + regular_init, ); } \ No newline at end of file diff --git a/fighters/rockman/src/chargeshot/status/mod.rs b/fighters/rockman/src/chargeshot/status/mod.rs deleted file mode 100644 index ed205154ce..0000000000 --- a/fighters/rockman/src/chargeshot/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod regular; - -pub fn install(agent: &mut Agent) { - regular::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/hardknuckle/acmd.rs b/fighters/rockman/src/hardknuckle/acmd.rs new file mode 100644 index 0000000000..4b441d4a27 --- /dev/null +++ b/fighters/rockman/src/hardknuckle/acmd.rs @@ -0,0 +1,62 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 61, 0, 8, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 74, 0, 38, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_ROCKMAN_HARDKNUCKLE_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + // sv_kinetic_energy!( + // set_speed, + // agent, + // WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + // 0.0, + // -0.5 + // ); + sv_kinetic_energy!( + set_stable_speed, + agent, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + 0.0, + 0.0 + ); + sv_kinetic_energy!( + set_brake, + agent, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + 0.0, + 0.8 + ); + } + // frame(lua_state, 6.0); + // if is_excute(agent) { + // AttackModule::clear_all(boma); + // } +} + +unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("rockman_hardknuckle"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + // frame(lua_state, 6.0); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("rockman_hardknuckle"), true, true); + // } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); + agent.acmd("effect_regular", effect_regular); +} diff --git a/fighters/rockman/src/hardknuckle/acmd/aerials.rs b/fighters/rockman/src/hardknuckle/acmd/aerials.rs deleted file mode 100644 index fdfa9323e2..0000000000 --- a/fighters/rockman/src/hardknuckle/acmd/aerials.rs +++ /dev/null @@ -1,62 +0,0 @@ -use super::*; - -unsafe extern "C" fn rockman_hardknuckle_regular_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"), 14.0, 270, 61, 0, 8, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 74, 0, 38, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_ROCKMAN_HARDKNUCKLE_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - // sv_kinetic_energy!( - // set_speed, - // fighter, - // WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - // 0.0, - // -0.5 - // ); - sv_kinetic_energy!( - set_stable_speed, - fighter, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - 0.0, - 0.0 - ); - sv_kinetic_energy!( - set_brake, - fighter, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - 0.0, - 0.8 - ); - } - // frame(lua_state, 6.0); - // if is_excute(fighter) { - // AttackModule::clear_all(boma); - // } -} - -unsafe extern "C" fn rockman_hardknuckle_regular_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("rockman_hardknuckle"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - // frame(lua_state, 6.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("rockman_hardknuckle"), true, true); - // } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_hardknuckle_regular_game); - agent.acmd("effect_regular", rockman_hardknuckle_regular_effect); -} diff --git a/fighters/rockman/src/hardknuckle/acmd/mod.rs b/fighters/rockman/src/hardknuckle/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/rockman/src/hardknuckle/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/leafshield/acmd/specials.rs b/fighters/rockman/src/leafshield/acmd.rs similarity index 73% rename from fighters/rockman/src/leafshield/acmd/specials.rs rename to fighters/rockman/src/leafshield/acmd.rs index 5901207ed1..6b1b89c4d9 100644 --- a/fighters/rockman/src/leafshield/acmd/specials.rs +++ b/fighters/rockman/src/leafshield/acmd.rs @@ -1,64 +1,72 @@ use super::*; -unsafe extern "C" fn rockman_leafshield_start(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } } -unsafe extern "C" fn rockman_leafshield_shield(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_shield(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } } -unsafe extern "C" fn rockman_leafshield_fly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } } pub fn install(agent: &mut Agent) { - agent.acmd("game_start", rockman_leafshield_start); - agent.acmd("game_startreverse", rockman_leafshield_start); - agent.acmd("game_shield", rockman_leafshield_shield); - agent.acmd("game_shieldreverse", rockman_leafshield_shield); - agent.acmd("game_fly", rockman_leafshield_fly); - agent.acmd("game_flyreverse", rockman_leafshield_fly); + agent.acmd("game_start", game_start); + + agent.acmd("game_startreverse", game_start); + + agent.acmd("game_shield", game_shield); + + agent.acmd("game_shieldreverse", game_shield); + + agent.acmd("game_fly", game_fly); + + agent.acmd("game_flyreverse", game_fly); } diff --git a/fighters/rockman/src/leafshield/acmd/mod.rs b/fighters/rockman/src/leafshield/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/leafshield/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/lib.rs b/fighters/rockman/src/lib.rs index c3c9a26375..df90f11811 100644 --- a/fighters/rockman/src/lib.rs +++ b/fighters/rockman/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/rockman/src/opff.rs b/fighters/rockman/src/opff.rs index 35d3577760..d3539f2e00 100644 --- a/fighters/rockman/src/opff.rs +++ b/fighters/rockman/src/opff.rs @@ -131,6 +131,7 @@ pub unsafe fn rockman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, rockman_frame_wrapper); } diff --git a/fighters/rockman/src/rockbuster/acmd/specials.rs b/fighters/rockman/src/rockbuster/acmd.rs similarity index 86% rename from fighters/rockman/src/rockbuster/acmd/specials.rs rename to fighters/rockman/src/rockbuster/acmd.rs index e68800a9a0..9e59699031 100644 --- a/fighters/rockman/src/rockbuster/acmd/specials.rs +++ b/fighters/rockman/src/rockbuster/acmd.rs @@ -1,19 +1,20 @@ use super::*; -unsafe extern "C" fn rockman_rockbuster_regular_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 22, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 11, 2.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.8, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_rockbuster_regular_game); + agent.acmd("game_regular", game_regular); } diff --git a/fighters/rockman/src/rockbuster/acmd/mod.rs b/fighters/rockman/src/rockbuster/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/rockbuster/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/status.rs b/fighters/rockman/src/status.rs deleted file mode 100644 index bc6dc11099..0000000000 --- a/fighters/rockman/src/status.rs +++ /dev/null @@ -1,91 +0,0 @@ -use super::*; -use globals::*; - -pub mod helper; -mod walk; -mod attack; -mod attack_s3; -mod attack_s4; - -mod attack_air; -mod ladder_attack; - -mod special_n; -mod rockbuster; - -mod special_s; - -mod special_lw; - -unsafe extern "C" fn rockman_check_special_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_RELEASE) - && VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { - fighter.global_table[CMD_CAT1].assign(&L2CValue::I32(*FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_N)); - } - false.into() -} - -unsafe extern "C" fn rockman_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { - (!WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD)).into() -} - -unsafe extern "C" fn rockman_check_turn_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { - let leafshield = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD); - WorkModule::set_flag(fighter.module_accessor, leafshield, *FIGHTER_STATUS_TURN_FLAG_NO_TURN_TO_ESCAPE); - false.into() -} - -extern "C" fn agent_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let fighter_kind = utility::get_kind(&mut *fighter.module_accessor); - if fighter_kind != *FIGHTER_KIND_ROCKMAN { - return; - } - fighter.global_table[0x27].assign(&L2CValue::Ptr(rockman_check_special_uniq as *const () as _)); - fighter.global_table[0x26].assign(&L2CValue::Ptr(rockman_check_special_uniq as *const () as _)); - fighter.global_table[DASH_CALLBACK].assign(&false.into()); - fighter.global_table[0x2A].assign(&false.into()); - fighter.global_table[0x2B].assign(&false.into()); - fighter.global_table[0x34].assign(&false.into()); - fighter.global_table[0x35].assign(&L2CValue::Ptr(rockman_check_turn_uniq as *const () as _)); - fighter.global_table[0x4E].assign(&false.into()); - fighter.global_table[USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(rockman_special_lw_uniq as *const () as _)); - } -} - -unsafe extern "C" fn rockman_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("appeal_lw_l"), - hash40("appeal_lw_r") - ].contains(&mot) { - VisibilityModule::set_whole(fighter.module_accessor, true); - } - fighter.status_end_Rebirth(); - 0.into() -} - -pub fn install(agent: &mut Agent) { - agent.on_start(agent_reset); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rockman_rebirth_end); - - walk::install(agent); - - attack::install(agent); - - attack_s3::install(agent); - - attack_s4::install(agent); - - attack_s4::install(agent); - - attack_air::install(agent); - ladder_attack::install(agent); - - special_n::install(agent); - rockbuster::install(agent); - - special_s::install(agent); - - special_lw::install(agent); -} diff --git a/fighters/rockman/src/status/attack.rs b/fighters/rockman/src/status/attack.rs index 7a44f2e049..3838680a2f 100644 --- a/fighters/rockman/src/status/attack.rs +++ b/fighters/rockman/src/status/attack.rs @@ -1,9 +1,11 @@ use super::*; -unsafe extern "C" fn rockman_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Attack() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, rockman_attack_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, attack_pre); } diff --git a/fighters/rockman/src/status/attack_air.rs b/fighters/rockman/src/status/attack_air.rs index f2c0c90026..dc612ec239 100644 --- a/fighters/rockman/src/status/attack_air.rs +++ b/fighters/rockman/src/status/attack_air.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn rockman_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_AIR + +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); if [ @@ -11,7 +13,7 @@ unsafe extern "C" fn rockman_attack_air_main(fighter: &mut L2CFighterCommon) -> fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) } -unsafe extern "C" fn rockman_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_AttackAir() } @@ -19,7 +21,7 @@ pub fn install(agent: &mut Agent) { agent.status( Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, - rockman_attack_air_main, + attack_air_main, ); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, rockman_attack_air_end); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); } diff --git a/fighters/rockman/src/status/attack_s3.rs b/fighters/rockman/src/status/attack_s3.rs index 8d2837cde6..f435f50908 100644 --- a/fighters/rockman/src/status/attack_s3.rs +++ b/fighters/rockman/src/status/attack_s3.rs @@ -1,9 +1,11 @@ use super::*; -unsafe extern "C" fn rockman_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_S3 + +unsafe extern "C" fn attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_AttackS3() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, rockman_attack_s3_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_pre); } diff --git a/fighters/rockman/src/status/attack_s4.rs b/fighters/rockman/src/status/attack_s4.rs index ff7490df9d..138f38f5f9 100644 --- a/fighters/rockman/src/status/attack_s4.rs +++ b/fighters/rockman/src/status/attack_s4.rs @@ -1,9 +1,11 @@ use super::*; -unsafe extern "C" fn rockman_attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_S4 + +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackS4() } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, rockman_attack_s4_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); } diff --git a/fighters/rockman/src/status/helper.rs b/fighters/rockman/src/status/helper.rs index 8fd5a8f51f..edb48e6a9b 100644 --- a/fighters/rockman/src/status/helper.rs +++ b/fighters/rockman/src/status/helper.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe fn rockman_special_motion_helper( +pub unsafe fn special_motion_helper( fighter: &mut L2CFighterCommon, mot_g: L2CValue, mot_a: L2CValue, diff --git a/fighters/rockman/src/status/ladder_attack.rs b/fighters/rockman/src/status/ladder_attack.rs index 4dce5234fd..46a25a0de4 100644 --- a/fighters/rockman/src/status/ladder_attack.rs +++ b/fighters/rockman/src/status/ladder_attack.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn rockman_ladder_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_LADDER_ATTACK + +unsafe extern "C" fn ladder_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_LadderAttack_common(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); if [ @@ -11,19 +13,11 @@ unsafe extern "C" fn rockman_ladder_attack_main(fighter: &mut L2CFighterCommon) fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_LadderAttack_Main as *const () as _)) } -unsafe extern "C" fn rockman_ladder_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn ladder_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_LadderAttack() } pub fn install(agent: &mut Agent) { - agent.status( - Main, - *FIGHTER_STATUS_KIND_LADDER_ATTACK, - rockman_ladder_attack_main, - ); - agent.status( - End, - *FIGHTER_STATUS_KIND_LADDER_ATTACK, - rockman_ladder_attack_end, - ); + agent.status(Main, *FIGHTER_STATUS_KIND_LADDER_ATTACK, ladder_attack_main); + agent.status(End, *FIGHTER_STATUS_KIND_LADDER_ATTACK, ladder_attack_end); } diff --git a/fighters/rockman/src/status/mod.rs b/fighters/rockman/src/status/mod.rs new file mode 100644 index 0000000000..18eeba540a --- /dev/null +++ b/fighters/rockman/src/status/mod.rs @@ -0,0 +1,76 @@ +use super::*; +use globals::*; +// status script import + +pub mod helper; +mod rebirth; +mod walk; +mod attack; +mod attack_s3; +mod attack_s4; + +mod attack_air; +mod ladder_attack; + +mod special_n; +mod rockbuster; + +mod special_s; + +mod special_lw; + +unsafe extern "C" fn check_special_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_RELEASE) + && VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { + fighter.global_table[CMD_CAT1].assign(&L2CValue::I32(*FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_N)); + } + false.into() +} + +unsafe extern "C" fn special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { + (!WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD)).into() +} + +unsafe extern "C" fn check_turn_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { + let leafshield = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD); + WorkModule::set_flag(fighter.module_accessor, leafshield, *FIGHTER_STATUS_TURN_FLAG_NO_TURN_TO_ESCAPE); + false.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[0x27].assign(&L2CValue::Ptr(check_special_uniq as *const () as _)); + fighter.global_table[0x26].assign(&L2CValue::Ptr(check_special_uniq as *const () as _)); + fighter.global_table[DASH_CALLBACK].assign(&false.into()); + fighter.global_table[0x2A].assign(&false.into()); + fighter.global_table[0x2B].assign(&false.into()); + fighter.global_table[0x34].assign(&false.into()); + fighter.global_table[0x35].assign(&L2CValue::Ptr(check_turn_uniq as *const () as _)); + fighter.global_table[0x4E].assign(&false.into()); + fighter.global_table[USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(special_lw_uniq as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + rebirth::install(agent); + + walk::install(agent); + + attack::install(agent); + + attack_s3::install(agent); + + attack_s4::install(agent); + + attack_s4::install(agent); + + attack_air::install(agent); + ladder_attack::install(agent); + + special_n::install(agent); + rockbuster::install(agent); + + special_s::install(agent); + + special_lw::install(agent); +} diff --git a/fighters/rockman/src/status/rebirth.rs b/fighters/rockman/src/status/rebirth.rs new file mode 100644 index 0000000000..dad1f89645 --- /dev/null +++ b/fighters/rockman/src/status/rebirth.rs @@ -0,0 +1,19 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("appeal_lw_l"), + hash40("appeal_lw_r") + ].contains(&mot) { + VisibilityModule::set_whole(fighter.module_accessor, true); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} diff --git a/fighters/rockman/src/status/rockbuster/helper.rs b/fighters/rockman/src/status/rockbuster/helper.rs index 3be0c0612f..f91eb81e71 100644 --- a/fighters/rockman/src/status/rockbuster/helper.rs +++ b/fighters/rockman/src/status/rockbuster/helper.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe fn rockman_rockbuster_pre_helper( +pub unsafe fn rockbuster_pre_helper( prev_status: L2CValue ) -> L2CValue { [ @@ -15,7 +15,7 @@ pub unsafe fn rockman_rockbuster_pre_helper( ].contains(&prev_status.get_i32()).into() } -pub unsafe fn rockman_rockbuster_main_helper( +pub unsafe fn rockbuster_main_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, is_jump_squat: L2CValue, @@ -62,12 +62,12 @@ pub unsafe fn rockman_rockbuster_main_helper( } if !is_turn.get_bool() { let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), step.into(), (!step_is_zero).into(), is_jump_squat.get_bool().into(), was_shoot_walk.get_bool().into()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), step.into(), (!step_is_zero).into(), is_jump_squat.get_bool().into(), was_shoot_walk.get_bool().into()); } WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT_MINI_JUMP_ATTACK); } -pub unsafe fn rockman_rockbuster_main_loop_helper( +pub unsafe fn rockbuster_main_loop_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, is_walk: L2CValue @@ -94,17 +94,17 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( let mut allow_end = true; if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND && fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_TURN != 0 - && rockman_rockbuster_can_turn_helper(fighter).get_bool() { + && rockbuster_can_turn_helper(fighter).get_bool() { allow_end = false; } if allow_end && is_end { if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT_END) { - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); step = 2; } else { - step = rockman_rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); + step = rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT_END); } } @@ -112,7 +112,7 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( else if step == 2 { if is_end { WorkModule::inc_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); - step = rockman_rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); + step = rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); } } else if step == 3 && is_end { @@ -127,7 +127,7 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( ret.into() } -pub unsafe fn rockman_rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) -> L2CValue { let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); let count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); if step == 1 @@ -146,7 +146,7 @@ pub unsafe fn rockman_rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) false.into() } -pub unsafe fn rockman_rockbuster_shoot_end_helper( +pub unsafe fn rockbuster_shoot_end_helper( fighter: &mut L2CFighterCommon, _step: L2CValue, is_air: L2CValue, @@ -156,7 +156,7 @@ pub unsafe fn rockman_rockbuster_shoot_end_helper( let count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); if count < 3 { if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_LOOP) { - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); ControlModule::reset_trigger(fighter.module_accessor); ControlModule::clear_command(fighter.module_accessor, false); @@ -165,11 +165,11 @@ pub unsafe fn rockman_rockbuster_shoot_end_helper( return 2.into(); } } - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 3.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 3.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); 3.into() } -pub unsafe fn rockman_rockbuster_change_motion_helper( +pub unsafe fn rockbuster_change_motion_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, step: L2CValue, @@ -307,7 +307,7 @@ pub unsafe fn rockman_rockbuster_change_motion_helper( } } -pub unsafe extern "C" fn rockman_rockbuster_walk_mot_helper(_fighter: &mut L2CFighterCommon, walk_mot: L2CValue, curr_mot: L2CValue) -> L2CValue { +pub unsafe extern "C" fn rockbuster_walk_mot_helper(_fighter: &mut L2CFighterCommon, walk_mot: L2CValue, curr_mot: L2CValue) -> L2CValue { let curr = curr_mot.get_u64(); let walk = walk_mot.get_u64(); if curr == hash40("walk_fast") diff --git a/fighters/rockman/src/status/rockbuster/shoot_air.rs b/fighters/rockman/src/status/rockbuster/shoot_air.rs index f1155f573c..291d691d26 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_air.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_air.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let status_attr_add = if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_SPECIAL_N { fighter.sub_status_pre_SpecialNCommon(); *FIGHTER_STATUS_ATTR_START_TURN @@ -44,22 +44,22 @@ unsafe extern "C" fn rockman_rockbuster_shoot_air_pre(fighter: &mut L2CFighterCo 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_flick_x(fighter.module_accessor); ControlModule::reset_flick_sub_x(fighter.module_accessor); fighter.global_table[FLICK_X].assign(&L2CValue::I32(0xFE)); - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { fighter.sub_set_pass(); } fighter.set_situation(SITUATION_KIND_AIR.into()); GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_FALL); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_air_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_air_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -83,11 +83,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_AIR, - rockman_rockbuster_shoot_air_pre, + rockbuster_shoot_air_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_AIR, - rockman_rockbuster_shoot_air_main, + rockbuster_shoot_air_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_jump.rs b/fighters/rockman/src/status/rockbuster/shoot_jump.rs index 4fefc44511..d2f28b4163 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_jump.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_jump.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), @@ -36,13 +36,13 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_jump_main_loop as *const () as _)) +unsafe extern "C" fn rockbuster_shoot_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_jump_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_jump_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -66,11 +66,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP, - rockman_rockbuster_shoot_jump_pre, + rockbuster_shoot_jump_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP, - rockman_rockbuster_shoot_jump_main, + rockbuster_shoot_jump_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs b/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs index 2022e21a01..e786e0ca91 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), @@ -36,7 +36,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFi 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_jump_life = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_STICK_JUMP_COMMAND_LIFE); if stick_jump_life == 0 || fighter.global_table[FLICK_Y_DIR].get_i32() <= 0 { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_BUTTON); @@ -53,7 +53,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CF WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); } - rockman_rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); MotionModule::change_motion( fighter.module_accessor, Hash40::new("jump_squat_buster"), @@ -65,13 +65,13 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CF false ); if !StopModule::is_stop(fighter.module_accessor) { - rockman_rockbuster_shoot_jump_squat_substatus(fighter, false.into()); + rockbuster_shoot_jump_squat_substatus(fighter, false.into()); } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(rockman_rockbuster_shoot_jump_squat_substatus as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_jump_squat_main_loop as *const () as _)) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(rockbuster_shoot_jump_squat_substatus as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_jump_squat_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_substatus(fighter: &mut L2CFighterCommon, param_2: L2CValue) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_substatus(fighter: &mut L2CFighterCommon, param_2: L2CValue) -> L2CValue { if !param_2.get_bool() { fighter.sub_jump_squat_uniq_check_sub(FIGHTER_ROCKMAN_STATUS_ROCKBUSTER_SHOOT_JUMP_WORK_ID_FLAG_BUTTON.into()); fighter.sub_jump_squat_uniq_check_sub_mini_attack(); @@ -79,8 +79,8 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_substatus(fighter: &mut 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_jump_squat_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if sit == *SITUATION_KIND_AIR { let status = if helper_ret { @@ -109,11 +109,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP_SQUAT, - rockman_rockbuster_shoot_jump_squat_pre, + rockbuster_shoot_jump_squat_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP_SQUAT, - rockman_rockbuster_shoot_jump_squat_main, + rockbuster_shoot_jump_squat_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_landing.rs b/fighters/rockman/src/status/rockbuster/shoot_landing.rs index 6bdb740299..11ee690db9 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_landing.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_landing.rs @@ -1,9 +1,9 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_landing_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_landing_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - let was_rockbuster_status = rockman_rockbuster_pre_helper(prev_status.into()).get_bool(); + let was_rockbuster_status = rockbuster_pre_helper(prev_status.into()).get_bool(); let fs_succeeds_add = if was_rockbuster_status || prev_status == *FIGHTER_STATUS_KIND_ATTACK_AIR { *FS_SUCCEEDS_KEEP_SLOPE } @@ -44,15 +44,15 @@ unsafe extern "C" fn rockman_rockbuster_shoot_landing_pre(fighter: &mut L2CFight 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); +unsafe extern "C" fn rockbuster_shoot_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_landing_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_landing_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_landing_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_landing_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -99,11 +99,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING, - rockman_rockbuster_shoot_landing_pre, + rockbuster_shoot_landing_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING, - rockman_rockbuster_shoot_landing_main, + rockbuster_shoot_landing_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_turn.rs b/fighters/rockman/src/status/rockbuster/shoot_turn.rs index 8020bb28b1..b98f715143 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_turn.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_turn.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_turn_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_turn_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), @@ -35,15 +35,15 @@ unsafe extern "C" fn rockman_rockbuster_shoot_turn_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_turn_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); +unsafe extern "C" fn rockbuster_shoot_turn_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); PostureModule::reverse_lr(fighter.module_accessor); let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); if step == 2 { WorkModule::inc_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); } WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); + rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_LOOP); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_L_SHOULDER_FIX); let ude_motion = MotionModule::motion_kind_partial(fighter.module_accessor, *FIGHTER_ROCKMAN_MOTION_PART_SET_UDE); @@ -62,10 +62,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_turn_main(fighter: &mut L2CFighter false, false ); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_turn_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_turn_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_turn_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_turn_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let helper_ret = false; let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { @@ -120,11 +120,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN, - rockman_rockbuster_shoot_turn_pre, + rockbuster_shoot_turn_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN, - rockman_rockbuster_shoot_turn_main, + rockbuster_shoot_turn_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_wait.rs b/fighters/rockman/src/status/rockbuster/shoot_wait.rs index 5941e86695..b7cd72b8df 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_wait.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_wait.rs @@ -1,14 +1,14 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mut status_data_arg = 0; let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); if step != 0 { status_data_arg = 0; } let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - let was_rockbuster_status = rockman_rockbuster_pre_helper(prev_status.into()).get_bool(); + let was_rockbuster_status = rockbuster_pre_helper(prev_status.into()).get_bool(); let fs_succeeds_add = if was_rockbuster_status || prev_status == *FIGHTER_STATUS_KIND_ATTACK_AIR { *FS_SUCCEEDS_KEEP_SLOPE } @@ -58,18 +58,18 @@ unsafe extern "C" fn rockman_rockbuster_shoot_wait_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); let was_walk = fighter.global_table[PREV_STATUS_KIND].get_i32() == *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK; - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), was_walk.into(), L2CValue::Void()); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_wait_main_loop as *const () as _)) + rockbuster_main_helper(fighter, false.into(), false.into(), was_walk.into(), L2CValue::Void()); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_wait_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), false.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() @@ -123,7 +123,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_wait_main_loop(fighter: &mut L2CFi } if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_TURN != 0 && !helper_ret - && rockman_rockbuster_can_turn_helper(fighter).get_bool() { + && rockbuster_can_turn_helper(fighter).get_bool() { fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN.into(), true.into()); return 1.into(); } @@ -148,11 +148,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT, - rockman_rockbuster_shoot_wait_pre, + rockbuster_shoot_wait_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT, - rockman_rockbuster_shoot_wait_main, + rockbuster_shoot_wait_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_walk.rs b/fighters/rockman/src/status/rockbuster/shoot_walk.rs index 4a28d6cf52..b51affe3d2 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_walk.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_walk.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); let keep_flag; let keep_int; @@ -51,7 +51,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); if prev_status != *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT { fighter.sub_GetLightItemImm(L2CValue::Void()); @@ -62,7 +62,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighter WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - rockman_rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); if prev_status != *FIGHTER_STATUS_KIND_WALK { let walk_speed_max = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_speed_max"), 0); fighter.init_walk_speed( @@ -82,10 +82,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighter 1.0f32.into() ); } - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_walk_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_walk_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let walk_speed = WorkModule::get_float(fighter.module_accessor, *FIGHTER_STATUS_WALK_WORK_FLOAT_SPEED); let walk_speed_max = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_speed_max"), 0); let walk_accel_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_accel_mul"), 0); @@ -108,10 +108,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main_loop(fighter: &mut L2CFi hash40("buster_walk_slow").into(), FIGHTER_STATUS_WALK_WORK_FLOAT_SPEED.into(), 1.0f32.into(), - L2CValue::Ptr(rockman_rockbuster_walk_mot_helper as *const () as _) + L2CValue::Ptr(rockbuster_walk_mot_helper as *const () as _) ); - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() @@ -184,11 +184,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK, - rockman_rockbuster_shoot_walk_pre, + rockbuster_shoot_walk_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK, - rockman_rockbuster_shoot_walk_main, + rockbuster_shoot_walk_main, ); } diff --git a/fighters/rockman/src/status/special_lw.rs b/fighters/rockman/src/status/special_lw.rs index 1f61c1db9f..d00ffb175f 100644 --- a/fighters/rockman/src/status/special_lw.rs +++ b/fighters/rockman/src/status/special_lw.rs @@ -1,14 +1,16 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_lw_main_loop as *const () as _)) +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); if StatusModule::is_changing(fighter.module_accessor) || StatusModule::is_situation_changed(fighter.module_accessor) { - rockman_special_motion_helper( + special_motion_helper( fighter, hash40("special_lw").into(), hash40("special_air_lw").into(), @@ -46,9 +48,5 @@ unsafe extern "C" fn rockman_special_lw_main_loop(fighter: &mut L2CFighterCommon } pub fn install(agent: &mut Agent) { - agent.status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - rockman_special_lw_main, - ); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/rockman/src/status/special_n.rs b/fighters/rockman/src/status/special_n.rs index 788da2d750..80fa9394b3 100644 --- a/fighters/rockman/src/status/special_n.rs +++ b/fighters/rockman/src/status/special_n.rs @@ -4,7 +4,9 @@ use super::helper::*; pub const CHARGE_SHOT_DELAY_CHARGE_FRAME : i32 = 50; pub const CHARGE_SHOT_MAX_FRAME : i32 = 160; -unsafe extern "C" fn rockman_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_N + +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if !VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { let prev_escape = fighter.global_table[PREV_STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ESCAPE; @@ -49,17 +51,17 @@ unsafe extern "C" fn rockman_special_n_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn rockman_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::rockman::status::CHARGE_SHOT_KEEP_CHARGE); let charge_frame = VarModule::get_int(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_FRAME); let top = charge_frame as f32 - CHARGE_SHOT_DELAY_CHARGE_FRAME as f32; let bottom = CHARGE_SHOT_MAX_FRAME as f32 - CHARGE_SHOT_DELAY_CHARGE_FRAME as f32; let ratio = top / bottom; WorkModule::set_float(fighter.module_accessor, ratio, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_n_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); if StatusModule::is_situation_changed(fighter.module_accessor) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { @@ -68,7 +70,7 @@ unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) } } if StatusModule::is_changing(fighter.module_accessor) || StatusModule::is_situation_changed(fighter.module_accessor) { - rockman_special_motion_helper( + special_motion_helper( fighter, hash40("buster_charge_shot").into(), hash40("buster_air_charge_shot").into(), @@ -100,12 +102,12 @@ unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn rockman_special_n_end(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(_fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); } diff --git a/fighters/rockman/src/status/special_s.rs b/fighters/rockman/src/status/special_s.rs index f1198234a1..4d9d7f8125 100644 --- a/fighters/rockman/src/status/special_s.rs +++ b/fighters/rockman/src/status/special_s.rs @@ -1,7 +1,9 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_S + +unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -34,7 +36,7 @@ unsafe extern "C" fn rockman_special_s_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn rockman_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_METALBLADE) { LinkModule::send_event_nodes( fighter.module_accessor, @@ -44,10 +46,10 @@ unsafe extern "C" fn rockman_special_s_main(fighter: &mut L2CFighterCommon) -> L ); WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_ID_FLAG_ALREADY_EXIST_METALBLADE); } - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); let mut change_motion = false; if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_ID_FLAG_STICK_CHECK_FRAME_END) { @@ -100,7 +102,7 @@ unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) mot_a = hash40("special_air_n"); } } - rockman_special_motion_helper( + special_motion_helper( fighter, mot_g.into(), mot_a.into(), @@ -132,7 +134,7 @@ unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn rockman_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { if WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_INT_METALBLADE_ID) != 0 { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x29b79a80a1)); } @@ -140,7 +142,7 @@ unsafe extern "C" fn rockman_special_s_end(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); } diff --git a/fighters/rockman/src/status/walk.rs b/fighters/rockman/src/status/walk.rs index 150feaa694..ea1de0e7dc 100644 --- a/fighters/rockman/src/status/walk.rs +++ b/fighters/rockman/src/status/walk.rs @@ -1,9 +1,8 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_WALK -pub unsafe extern "C" fn pre_walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ground_brake = WorkModule::get_param_float(fighter.module_accessor, hash40("ground_brake"), 0); let mut initial_speed = VarModule::get_float(fighter.battle_object, vars::common::instance::CURR_DASH_SPEED); @@ -20,7 +19,7 @@ pub unsafe extern "C" fn pre_walk(fighter: &mut L2CFighterCommon) -> L2CValue { smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_WALK)(fighter) } -pub unsafe extern "C" fn walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_WALK_FLAG_SLIP); WorkModule::enable_transition_term_group(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL); WorkModule::enable_transition_term_group(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ITEM); @@ -34,15 +33,15 @@ pub unsafe extern "C" fn walk(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::unable_transition_term_group_ex(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_SLIP); - fighter.sub_shift_status_main(L2CValue::Ptr(walk_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(walk_main_loop as *const () as _)) } -unsafe extern "C" fn walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_Walk_Main(); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk); - agent.status(Main, *FIGHTER_STATUS_KIND_WALK, walk); + agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, walk_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WALK, walk_main); } diff --git a/fighters/rosetta/src/acmd/aerials.rs b/fighters/rosetta/src/acmd/aerials.rs index 314f963aa6..5e7d72e1d7 100644 --- a/fighters/rosetta/src/acmd/aerials.rs +++ b/fighters/rosetta/src/acmd/aerials.rs @@ -1,318 +1,256 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn rosetta_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 1.0, 70, 10, 0, 90, 5.5, 1.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 1.0, 70, 10, 0, 90, 5.5, 1.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 4.0, -2.5, 0.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 1.0, 100, 10, 0, 72, 5.8, 6.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 1.0, 86, 10, 0, 90, 4.5, 3.0, 6.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("hip"), 1.0, 25, 10, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 4.0, -2.5, 0.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 1.0, 100, 10, 0, 72, 5.8, 6.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 1.0, 86, 10, 0, 90, 4.5, 3.0, 6.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("hip"), 1.0, 25, 10, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::clear(boma, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 4.0, 361, 132, 0, 50, 8.0, 6.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 361, 132, 0, 50, 6.0, -3.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 4.0, 361, 132, 0, 50, 8.0, 6.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 361, 132, 0, 50, 6.0, -3.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 78.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 rosetta_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 5.5, 0.0, 10.0, -17.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 5.5, 0.0, 10.0, -17.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 5.0, 0.0, 10.0, -17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 5.0, 0.0, 10.0, -17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn rosetta_tico_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } } -unsafe extern "C" fn rosetta_tico_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); - } -} - -unsafe extern "C" fn rosetta_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 88, 98, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 88, 98, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 6.0, 88, 98, 0, 40, 2.5, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 6.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 88, 98, 0, 40, 2.5, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 6.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 4.0, 88, 98, 0, 20, 2.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 4.0, 88, 98, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 88, 98, 0, 20, 2.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 4.0, 88, 98, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rosetta_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } } - } -unsafe extern "C" fn rosetta_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); /* Air */ - ATTACK(fighter, 2, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 7.0, 45, 100, 0, 35, 2.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 45, 100, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 7.0, 45, 100, 0, 35, 2.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 45, 100, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 5.0, 361, 30, 0, 20, 1.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 30, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 5.0, 361, 30, 0, 20, 1.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 30, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rosetta_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(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) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, true); } } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } - } - } -unsafe extern "C" fn rosetta_tico_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); -pub fn install() { - smashline::Agent::new("rosetta_tico") - .acmd("game_attackairb", rosetta_tico_attack_air_b_game) - .acmd("effect_attackairb", rosetta_tico_attack_air_b_effect) - .acmd("game_attackairlw", rosetta_tico_attack_air_lw_game) - .install(); - smashline::Agent::new("rosetta") - .acmd("expression_attackairn", rosetta_attack_air_n_expression) - .acmd("game_attackairf", rosetta_attack_air_f_game) - .acmd("game_attackairb", rosetta_attack_air_b_game) - .acmd("game_attackairhi", rosetta_attack_air_hi_game) - .acmd("effect_attackairhi", rosetta_attack_air_hi_effect) - .acmd("game_attackairlw", rosetta_attack_air_lw_game) - .acmd("effect_attackairlw", rosetta_attack_air_lw_effect) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/rosetta/src/acmd/ground.rs b/fighters/rosetta/src/acmd/ground.rs index 9e2bd2b0f4..466207e529 100644 --- a/fighters/rosetta/src/acmd/ground.rs +++ b/fighters/rosetta/src/acmd/ground.rs @@ -1,40 +1,36 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 12, 0, 47, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 30, 50, 0, 30, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 12, 0, 47, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 30, 50, 0, 30, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(20.0), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(5.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 1, Hash40::new("head"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 1, Hash40::new("bust"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(20.0), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(5.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 1, Hash40::new("head"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 1, Hash40::new("bust"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attackdash", rosetta_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/rosetta/src/acmd/mod.rs b/fighters/rosetta/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/rosetta/src/acmd/mod.rs +++ b/fighters/rosetta/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/rosetta/src/acmd/other.rs b/fighters/rosetta/src/acmd/other.rs index 02407e748f..fecac7f6c7 100644 --- a/fighters/rosetta/src/acmd/other.rs +++ b/fighters/rosetta/src/acmd/other.rs @@ -1,186 +1,107 @@ - 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_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(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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_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_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn rosetta_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) { - FT_MOTION_RATE(fighter, 0.866); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.866); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 18.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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("rosetta") - .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", rosetta_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_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); } diff --git a/fighters/rosetta/src/acmd/smashes.rs b/fighters/rosetta/src/acmd/smashes.rs index e1ee17c3de..1355858910 100644 --- a/fighters/rosetta/src/acmd/smashes.rs +++ b/fighters/rosetta/src/acmd/smashes.rs @@ -1,118 +1,112 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 5.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 5.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn rosetta_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 32, 107, 0, 40, 3.5, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 32, 107, 0, 40, 3.5, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 32, 110, 0, 36, 3.5, 0.0, 3.5, -19.0, Some(0.0), Some(3.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 32, 110, 0, 36, 3.5, 0.0, 3.5, -19.0, Some(0.0), Some(3.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attacks4hi", rosetta_attack_s4_hi_game) - .acmd("game_attacks4", rosetta_attack_s4_s_game) - .acmd("game_attacks4lw", rosetta_attack_s4_lw_game) - .acmd("game_attackhi4", rosetta_attack_hi4_game) - .acmd("game_attacklw4", rosetta_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/rosetta/src/acmd/specials.rs b/fighters/rosetta/src/acmd/specials.rs index 8358ba263d..e1edf2807d 100644 --- a/fighters/rosetta/src/acmd/specials.rs +++ b/fighters/rosetta/src/acmd/specials.rs @@ -1,58 +1,54 @@ - use super::*; -unsafe extern "C" fn rosetta_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.battle_object, vars::rosetta::instance::IS_TICO_UNAVAILABLE) && VarModule::get_int(fighter.battle_object, vars::rosetta::instance::COOLDOWN) == 0 { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.battle_object, vars::rosetta::instance::IS_TICO_UNAVAILABLE) && VarModule::get_int(agent.battle_object, vars::rosetta::instance::COOLDOWN) == 0 { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_awaken"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } else { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("expression_speciallw", rosetta_special_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("expression_speciallw", expression_speciallw); } diff --git a/fighters/rosetta/src/acmd/throws.rs b/fighters/rosetta/src/acmd/throws.rs index 037731152b..d3dd90c803 100644 --- a/fighters/rosetta/src/acmd/throws.rs +++ b/fighters/rosetta/src/acmd/throws.rs @@ -1,91 +1,87 @@ - use super::*; -unsafe extern "C" fn rosetta_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.05); + FT_MOTION_RATE(agent, 1.05); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rosetta_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.04); + FT_MOTION_RATE(agent, 1.04); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rosetta_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.05); + FT_MOTION_RATE(agent, 1.05); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_catch", rosetta_catch_game) - .acmd("game_catchdash", rosetta_catch_dash_game) - .acmd("game_catchturn", rosetta_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/rosetta/src/acmd/tilts.rs b/fighters/rosetta/src/acmd/tilts.rs index 5a973c1f2f..dadc4521bc 100644 --- a/fighters/rosetta/src/acmd/tilts.rs +++ b/fighters/rosetta/src/acmd/tilts.rs @@ -1,71 +1,65 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.5, 361, 70, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.5, 361, 70, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 6.5, 361, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.5, 361, 70, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 361, 70, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 6.5, 361, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 88, 65, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 88, 65, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 88, 65, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 88, 65, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 88, 66, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 88, 66, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 88, 66, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 88, 66, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn rosetta_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 5.5, 30, 98, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.5, 30, 98, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.5, 30, 98, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 5.5, 30, 98, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 5.5, 30, 98, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.5, 30, 98, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.5, 30, 98, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 5.5, 30, 98, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attacks3", rosetta_attack_s3_s_game) - .acmd("game_attackhi3", rosetta_attack_hi3_game) - .acmd("game_attacklw3", rosetta_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/rosetta/src/lib.rs b/fighters/rosetta/src/lib.rs index 7bb0378152..8e9412018f 100644 --- a/fighters/rosetta/src/lib.rs +++ b/fighters/rosetta/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod tico; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("rosetta"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + tico::install(); } diff --git a/fighters/rosetta/src/opff.rs b/fighters/rosetta/src/opff.rs index 36da2400b4..20c5653b04 100644 --- a/fighters/rosetta/src/opff.rs +++ b/fighters/rosetta/src/opff.rs @@ -157,68 +157,7 @@ pub unsafe fn rosetta_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -unsafe extern "C" fn tico_frame(weapon: &mut L2CFighterBase) { - unsafe { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let rosetta = utils::util::get_battle_object_from_id(owner_id); - let rosetta_boma = &mut *(*rosetta).module_accessor; - if StatusModule::is_changing(weapon.module_accessor) || weapon.is_status(*WEAPON_ROSETTA_TICO_STATUS_KIND_REBIRTH) { - VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - if weapon.is_status_one_of(&[ - *WEAPON_ROSETTA_TICO_STATUS_KIND_DEAD, - *WEAPON_ROSETTA_TICO_STATUS_KIND_STANDBY, - *WEAPON_ROSETTA_TICO_STATUS_KIND_NONE, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_AIR, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FALL, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_U]) { - VarModule::on_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - else if rosetta_boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) { - if rosetta_boma.motion_frame() == 1.0 { - VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - if rosetta_boma.motion_frame() == 25.0 { - VarModule::set_int(rosetta, vars::rosetta::instance::TICO_X, PostureModule::pos_x(weapon.module_accessor) as i32); - VarModule::set_int(rosetta, vars::rosetta::instance::TICO_Y, PostureModule::pos_y(weapon.module_accessor) as i32); - } - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) > 0 { - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 1 { // set startup effects - EFFECT(weapon, Hash40::new("rosetta_escape"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 2 { // prepare for teleport - HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_XLU), 0); - VisibilityModule::set_whole(weapon.module_accessor, false); - JostleModule::set_status(weapon.module_accessor, false); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 3 { // perform swap - EFFECT(weapon, Hash40::new("rosetta_escape_end"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - let new_x = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_X) as f32; - let new_y = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_Y) as f32; - let pos = Vector3f { x: new_x, y: new_y, z: 0.0 }; - PostureModule::set_pos(weapon.module_accessor, &pos); - PostureModule::init_pos(weapon.module_accessor, &pos, true, true); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 4 { // revert to normal state - JostleModule::set_status(weapon.module_accessor, true); - VisibilityModule::set_whole(weapon.module_accessor, true); - VarModule::set_int(rosetta, vars::rosetta::instance::COOLDOWN, 300); //300 Frame (5 second) cooldown - VarModule::set_int(rosetta, vars::rosetta::status::LUMA_STATE, 0); - HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_NORMAL), 0); - } - } - } -} -pub fn install() { - smashline::Agent::new("rosetta") - .on_line(Main, rosetta_frame_wrapper) - .install(); - smashline::Agent::new("rosetta_tico") - .on_line(Main, tico_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, rosetta_frame_wrapper); } diff --git a/fighters/rosetta/src/status.rs b/fighters/rosetta/src/status.rs deleted file mode 100644 index c8d3c95737..0000000000 --- a/fighters/rosetta/src/status.rs +++ /dev/null @@ -1,28 +0,0 @@ -use super::*; - -mod special_hi; - -/// Prevents down b being reused -unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::get_int(fighter.battle_object, vars::rosetta::instance::COOLDOWN) > 0 { - false.into() - } else { - true.into() - } -} - -extern "C" fn rosetta_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ROSETTA { - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - } - } -} - -pub fn install() { - smashline::Agent::new("rosetta") - .on_start(rosetta_init) - .install(); - special_hi::install(); -} diff --git a/fighters/rosetta/src/status/mod.rs b/fighters/rosetta/src/status/mod.rs new file mode 100644 index 0000000000..e350772d91 --- /dev/null +++ b/fighters/rosetta/src/status/mod.rs @@ -0,0 +1,25 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; + +/// Prevents down b being reused +unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::get_int(fighter.battle_object, vars::rosetta::instance::COOLDOWN) > 0 { + false.into() + } else { + true.into() + } +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi::install(agent); +} diff --git a/fighters/rosetta/src/status/special_hi.rs b/fighters/rosetta/src/status/special_hi.rs index 5d499bcd69..8d6df5d348 100644 --- a/fighters/rosetta/src/status/special_hi.rs +++ b/fighters/rosetta/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END @@ -66,17 +65,7 @@ pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("rosetta") - .status( - Pre, - *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, - special_hi_end_pre, - ) - .status( - Main, - *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, - special_hi_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); } diff --git a/fighters/rosetta/src/tico/acmd.rs b/fighters/rosetta/src/tico/acmd.rs new file mode 100644 index 0000000000..4ee36f17b3 --- /dev/null +++ b/fighters/rosetta/src/tico/acmd.rs @@ -0,0 +1,59 @@ +use super::*; + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairlw", game_attackairlw); +} diff --git a/fighters/rosetta/src/tico/mod.rs b/fighters/rosetta/src/tico/mod.rs new file mode 100644 index 0000000000..7fe7f58a98 --- /dev/null +++ b/fighters/rosetta/src/tico/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("rosetta_tico"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/rosetta/src/tico/opff.rs b/fighters/rosetta/src/tico/opff.rs new file mode 100644 index 0000000000..cb1a81766c --- /dev/null +++ b/fighters/rosetta/src/tico/opff.rs @@ -0,0 +1,65 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +unsafe extern "C" fn tico_frame(weapon: &mut L2CFighterBase) { + unsafe { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let rosetta = utils::util::get_battle_object_from_id(owner_id); + let rosetta_boma = &mut *(*rosetta).module_accessor; + if StatusModule::is_changing(weapon.module_accessor) || weapon.is_status(*WEAPON_ROSETTA_TICO_STATUS_KIND_REBIRTH) { + VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + if weapon.is_status_one_of(&[ + *WEAPON_ROSETTA_TICO_STATUS_KIND_DEAD, + *WEAPON_ROSETTA_TICO_STATUS_KIND_STANDBY, + *WEAPON_ROSETTA_TICO_STATUS_KIND_NONE, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_AIR, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FALL, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_U]) { + VarModule::on_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + else if rosetta_boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) { + if rosetta_boma.motion_frame() == 1.0 { + VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + if rosetta_boma.motion_frame() == 25.0 { + VarModule::set_int(rosetta, vars::rosetta::instance::TICO_X, PostureModule::pos_x(weapon.module_accessor) as i32); + VarModule::set_int(rosetta, vars::rosetta::instance::TICO_Y, PostureModule::pos_y(weapon.module_accessor) as i32); + } + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) > 0 { + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 1 { // set startup effects + EFFECT(weapon, Hash40::new("rosetta_escape"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 2 { // prepare for teleport + HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_XLU), 0); + VisibilityModule::set_whole(weapon.module_accessor, false); + JostleModule::set_status(weapon.module_accessor, false); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 3 { // perform swap + EFFECT(weapon, Hash40::new("rosetta_escape_end"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + let new_x = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_X) as f32; + let new_y = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_Y) as f32; + let pos = Vector3f { x: new_x, y: new_y, z: 0.0 }; + PostureModule::set_pos(weapon.module_accessor, &pos); + PostureModule::init_pos(weapon.module_accessor, &pos, true, true); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 4 { // revert to normal state + JostleModule::set_status(weapon.module_accessor, true); + VisibilityModule::set_whole(weapon.module_accessor, true); + VarModule::set_int(rosetta, vars::rosetta::instance::COOLDOWN, 300); //300 Frame (5 second) cooldown + VarModule::set_int(rosetta, vars::rosetta::status::LUMA_STATE, 0); + HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_NORMAL), 0); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tico_frame); +} diff --git a/fighters/roy/src/acmd/aerials.rs b/fighters/roy/src/acmd/aerials.rs index 557e1d357a..3349fdbb82 100644 --- a/fighters/roy/src/acmd/aerials.rs +++ b/fighters/roy/src/acmd/aerials.rs @@ -1,25 +1,24 @@ - use super::*; -unsafe extern "C" fn roy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 30, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 30, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 30, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 30, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); // Ground-only hitboxes - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); @@ -30,335 +29,330 @@ unsafe extern "C" fn roy_attack_air_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 7, 3.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 10.0, 361, 90, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 10.0, 361, 90, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn roy_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn roy_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_attackair_n01")); } } -unsafe extern "C" fn roy_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 7.0/(13.75-1.0)); + FT_MOTION_RATE(agent, 7.0/(13.75-1.0)); } frame(lua_state, 13.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(17.0-13.75)); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 11.0, 50, 80, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 45, 65, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(17.0-13.75)); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 11.0, 50, 80, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 45, 65, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn roy_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 50, 111, 0, 25, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 50, 111, 0, 25, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("claviclel"), 14.0, 50, 111, 0, 25, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 11.0, 40, 70, 0, 20, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 50, 111, 0, 25, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 50, 111, 0, 25, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("claviclel"), 14.0, 50, 111, 0, 25, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 11.0, 40, 70, 0, 20, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 4.0, 4.5, 15.0, 0.0, Some(-4.5), Some(15.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 3.5, 5.0, 14.0, -4.0, Some(-5.0), Some(14.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 4.0, 4.5, 15.0, 0.0, Some(-4.5), Some(15.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 3.5, 5.0, 14.0, -4.0, Some(-5.0), Some(14.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } - } -unsafe extern "C" fn roy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); } } -unsafe extern "C" fn roy_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 77, 55, 0, 45, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 77, 55, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("colonells"), 10.0, 77, 55, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 80, 55, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 77, 55, 0, 45, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 77, 55, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("colonells"), 10.0, 77, 55, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 80, 55, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 42.0, 33.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 12.0, 42.0, 33.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn roy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only spike hitboxes - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 15.0, 290, 60, 0, 18, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 15.0, 290, 60, 0, 18, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 15.0, 290, 60, 0, 18, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 15.0, 290, 60, 0, 18, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Ground-only spike hitboxes - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 15.0, 281, 71, 0, 40, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 15.0, 281, 71, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 15.0, 281, 71, 0, 40, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 15.0, 281, 71, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Midspot/sourspot - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 90, 60, 0, 50, 4.4, 1.0, -3.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 37, 60, 0, 37, 3.5, 1.0, -3.0, 8.75, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 90, 60, 0, 50, 4.4, 1.0, -3.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 37, 60, 0, 37, 3.5, 1.0, -3.0, 8.75, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } //frame(lua_state, 57.0); //if is_excute(fighter) { // StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); //} - } -unsafe extern "C" fn roy_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.5, 12.0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.5, 12.0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1.05, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1.05, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_light"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_light"), false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn roy_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_air")); - PLAY_SE(fighter, Hash40::new("se_roy_attackair_h01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_air")); + PLAY_SE(agent, Hash40::new("se_roy_attackair_h01")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_attackair_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_attackair_l01")); } - } -unsafe extern "C" fn roy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attackairn", roy_attack_air_n_game) - .acmd("effect_attackairn", roy_attack_air_n_effect) - .acmd("sound_attackairn", roy_attack_air_n_sound) - .acmd("expression_attackairn", roy_attack_air_n_expression) - .acmd("game_attackairf", roy_attack_air_f_game) - .acmd("expression_attackairf", roy_attack_air_f_expression) - .acmd("game_attackairb", roy_attack_air_b_game) - .acmd("effect_attackairb", roy_attack_air_b_effect) - .acmd("expression_attackairb", roy_attack_air_b_expression) - .acmd("game_attackairhi", roy_attack_air_hi_game) - .acmd("game_attackairlw", roy_attack_air_lw_game) - .acmd("effect_attackairlw", roy_attack_air_lw_effect) - .acmd("sound_attackairlw", roy_attack_air_lw_sound) - .acmd("expression_attackairlw", roy_attack_air_lw_expression) - .install(); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/roy/src/acmd/ground.rs b/fighters/roy/src/acmd/ground.rs index 48331508f1..c5259c59c8 100644 --- a/fighters/roy/src/acmd/ground.rs +++ b/fighters/roy/src/acmd/ground.rs @@ -1,43 +1,39 @@ - use super::*; -unsafe extern "C" fn roy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 69, 40, 0, 55, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 69, 40, 0, 55, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 40, 60, 0, 32, 3.5, 0.0, 0.0, 9.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 69, 40, 0, 55, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 69, 40, 0, 55, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 40, 60, 0, 32, 3.5, 0.0, 0.0, 9.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn roy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 13.0, 110, 50, 0, 70, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 361, 55, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 13.0, 110, 50, 0, 70, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 361, 55, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attack11", roy_attack_11_game) - .acmd("game_attackdash", roy_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/roy/src/acmd/mod.rs b/fighters/roy/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/roy/src/acmd/mod.rs +++ b/fighters/roy/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/roy/src/acmd/other.rs b/fighters/roy/src/acmd/other.rs index 5a68595507..4e6725fee7 100644 --- a/fighters/roy/src/acmd/other.rs +++ b/fighters/roy/src/acmd/other.rs @@ -1,280 +1,173 @@ - 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_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_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(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_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_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_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn roy_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn roy_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_roy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_roy_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_roy_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_roy_step_right_l")); } } -unsafe extern "C" fn roy_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) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn roy_appeallwr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI)){ - VarModule::on_flag(fighter.battle_object, vars::roy::instance::TRAIL_EFFECT); + VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } - } -unsafe extern "C" fn roy_appeallwl_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - - if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI)){ - VarModule::on_flag(fighter.battle_object, vars::roy::instance::TRAIL_EFFECT); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) { + VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } - } -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 roy_jumpback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_jump01")); } } -unsafe extern "C" fn roy_jumpfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); - } -} +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); -unsafe extern "C" fn roy_jumpbackmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); - } -} + agent.acmd("game_landingairlw", game_landingairlw); -unsafe extern "C" fn roy_jumpfrontmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); - } -} + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -pub fn install() { - smashline::Agent::new("roy") - .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("game_landingairlw", roy_landing_air_lw_game) - .acmd("game_dash", roy_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", roy_turn_dash_game) - .acmd("game_appeallwr", roy_appeallwr_game) - .acmd("game_appeallwl", roy_appeallwl_game) - .acmd("game_escapeair", escape_air_game) - .acmd("sound_jumpback", roy_jumpback_sound) - .acmd("sound_jumpfront", roy_jumpfront_sound) - .acmd("sound_jumpbackmini", roy_jumpbackmini_sound) - .acmd("sound_jumpfrontmini", roy_jumpfrontmini_sound) - .install(); + agent.acmd("sound_jumpback", sound_jump); + agent.acmd("sound_jumpfront", sound_jump); + agent.acmd("sound_jumpbackmini", sound_jump); + agent.acmd("sound_jumpfrontmini", sound_jump); } diff --git a/fighters/roy/src/acmd/smashes.rs b/fighters/roy/src/acmd/smashes.rs index 2ee0b63378..e5db0dc65d 100644 --- a/fighters/roy/src/acmd/smashes.rs +++ b/fighters/roy/src/acmd/smashes.rs @@ -1,263 +1,258 @@ - use super::*; -unsafe extern "C" fn roy_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.2-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.2-10.0)); } frame(lua_state, 13.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 20.0, 361, 76, 0, 65, 4.3, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 20.0, 361, 76, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 20.0, 361, 76, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 73, 0, 30, 3.5, 0.0, 0.0, 8.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 20.0, 361, 76, 0, 65, 4.3, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 20.0, 361, 76, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 20.0, 361, 76, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 73, 0, 30, 3.5, 0.0, 0.0, 8.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn roy_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4, 16, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4, 16, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); //EFFECT_FOLLOW_RND(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 0.9, 1, 1, 1, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6); } - } -unsafe extern "C" fn roy_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn roy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 90, 96, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 90, 96, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn roy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 18.0, 75, 86, 0, 42, 4.3, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 75, 86, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 18.0, 75, 86, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 18.0, 75, 86, 0, 42, 4.3, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 75, 86, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 18.0, 75, 86, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 14.0, 75, 81, 0, 42, 3.9, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 75, 81, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 14.0, 75, 81, 0, 42, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 14.0, 75, 81, 0, 42, 3.9, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 75, 81, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 14.0, 75, 81, 0, 42, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn roy_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), -0.0, -0.0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), -0.0, -0.0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); } frame(lua_state, 7.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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, true); } } -unsafe extern "C" fn roy_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_smash_l")); - PLAY_SE(fighter, Hash40::new("se_roy_smash_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_l")); + PLAY_SE(agent, Hash40::new("se_roy_smash_l01")); } wait(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_l01")); } } -unsafe extern "C" fn roy_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashll"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashll"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 16); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 16); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attacks4", roy_attack_s4_s_game) - .acmd("effect_attacks4", roy_attack_s4_s_effect) - .acmd("expression_attacks4", roy_attack_s4_s_expression) - .acmd("game_attackhi4", roy_attack_hi4_game) - .acmd("game_attacklw4", roy_attack_lw4_game) - .acmd("effect_attacklw4", roy_attack_lw4_effect) - .acmd("sound_attacklw4", roy_attack_lw4_sound) - .acmd("expression_attacklw4", roy_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/roy/src/acmd/specials.rs b/fighters/roy/src/acmd/specials.rs deleted file mode 100644 index 2459cf580d..0000000000 --- a/fighters/roy/src/acmd/specials.rs +++ /dev/null @@ -1,1352 +0,0 @@ - -use super::*; - -unsafe extern "C" fn roy_special_n_end_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, 0.625); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn roy_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn roy_special_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); - } -} - -unsafe extern "C" fn roy_special_n_end_expression(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); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn roy_special_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn roy_special_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn roy_special_air_n_end_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, 0.625); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn roy_special_air_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn roy_special_air_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); - } -} - -unsafe extern "C" fn roy_special_air_n_end_expression(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); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn roy_special_air_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn roy_special_air_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -//SIDE B STARTS HERE ----------------------------------------------------------------------------------------------------------------------------------------------- - -unsafe extern "C" fn game_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn effect_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack10")); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s01")); - } -} - -unsafe extern "C" fn expression_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack01")); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s02h")); - } -} - -unsafe extern "C" fn expression_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - AttackModule::clear_all(boma); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn effect_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack02")); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s02l")); - } -} - -unsafe extern "C" fn expression_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack07")); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03h")); - } -} - -unsafe extern "C" fn expression_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack04")); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03s")); - } -} - -unsafe extern "C" fn expression_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack03")); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03l")); - } -} - -unsafe extern "C" fn expression_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack05")); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s04h")); - - } -} - -unsafe extern "C" fn expression_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state,15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); - } -} - -unsafe extern "C" fn game_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack06")); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_s01")); - - } -} - -unsafe extern "C" fn expression_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - } -} - -unsafe extern "C" fn game_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 39.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - EFFECT(fighter, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} - -unsafe extern "C" fn sound_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_smash_h")); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_h01")); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_h02")); - } -} - -unsafe extern "C" fn game_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - PostureModule::reverse_lr(boma); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - } -} - -unsafe extern "C" fn sound_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack08")); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_swing_ll")); - - } -} - -unsafe extern "C" fn expression_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - } -} - -//SIDE B ENDS HERE ---------------------------------------------------------------------------------------------------------------------------------------------------- - -unsafe extern "C" fn roy_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::select_cliff_hangdata(boma, 1); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.65); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 33.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } -} - -unsafe extern "C" fn roy_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::select_cliff_hangdata(boma, 1); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.65); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 15.0/(40.0-30.0)); - frame(lua_state, 33.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE_RANGE(fighter, 21.0, 68.0, 39.0); - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); - } - -} - -unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 4.0); - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - if WorkModule::is_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, smash::phx::Hash40::new("se_roy_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, smash::phx::Hash40::new("se_roy_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, smash::phx::Hash40::new("se_roy_criticalhit")); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_specialnend", roy_special_n_end_game) - .acmd("effect_specialnend", roy_special_n_end_effect) - .acmd("sound_specialnend", roy_special_n_end_sound) - .acmd("expression_specialnend", roy_special_n_end_expression) - .acmd("game_specialnend2", roy_special_n_end2_game) - .acmd("game_specialnend3", roy_special_n_end3_game) - .acmd("game_specialairnend", roy_special_air_n_end_game) - .acmd("effect_specialairnend", roy_special_air_n_end_effect) - .acmd("sound_specialairnend", roy_special_air_n_end_sound) - .acmd( - "expression_specialairnend", - roy_special_air_n_end_expression, - ) - .acmd("game_specialairnend2", roy_special_air_n_end2_game) - .acmd("game_specialairnend3", roy_special_air_n_end3_game) - - .acmd("game_specials1", game_specials1) - .acmd("effect_specials1", effect_specials1) - .acmd("sound_specials1", sound_specials1) - .acmd("expression_specials1", expression_specials1) - .acmd("game_specialairs1", game_specials1) - .acmd("effect_specialairs1", effect_specials1) - .acmd("sound_specialairs1", sound_specials1) - .acmd("expression_specialairs1", expression_specials1) - .acmd("game_specials2hi", game_specials2hi) - .acmd("effect_specials2hi", effect_specials2hi) - .acmd("sound_specials2hi", sound_specials2hi) - .acmd("expression_specials2hi", expression_specials2hi) - .acmd("game_specialairs2hi", game_specials2hi) - .acmd("effect_specialairs2hi", effect_specials2hi) - .acmd("sound_specialairs2hi", sound_specials2hi) - .acmd("expression_specialairs2hi", expression_specials2hi) - .acmd("game_specials2lw", game_specials2lw) - .acmd("effect_specials2lw", effect_specials2lw) - .acmd("sound_specials2lw", sound_specials2lw) - .acmd("expression_specials2lw", expression_specials2lw) - .acmd("game_specialairs2lw", game_specials2lw) - .acmd("effect_specialairs2lw", effect_specials2lw) - .acmd("sound_specialairs2lw", sound_specials2lw) - .acmd("expression_specialairs2lw", expression_specials2lw) - - .acmd("game_specials3hi", game_specials3hi) - .acmd("effect_specials3hi", effect_specials3hi) - .acmd("sound_specials3hi", sound_specials3hi) - .acmd("expression_specials3hi", expression_specials3hi) - .acmd("game_specialairs3hi", game_specials3hi) - .acmd("effect_specialairs3hi", effect_specials3hi) - .acmd("sound_specialairs3hi", sound_specials3hi) - .acmd("expression_specialairs3hi", expression_specials3hi) - .acmd("game_specials3s", game_specials3s) - .acmd("effect_specials3s", effect_specials3s) - .acmd("sound_specials3s", sound_specials3s) - .acmd("expression_specials3s", expression_specials3s) - .acmd("game_specialairs3s", game_specials3s) - .acmd("effect_specialairs3s", effect_specials3s) - .acmd("sound_specialairs3s", sound_specials3s) - .acmd("expression_specialairs3s", expression_specials3s) - .acmd("game_specials3lw", game_specials3lw) - .acmd("effect_specials3lw", effect_specials3lw) - .acmd("sound_specials3lw", sound_specials3lw) - .acmd("expression_specials3lw", expression_specials3lw) - .acmd("game_specialairs3lw", game_specials3lw) - .acmd("effect_specialairs3lw", effect_specials3lw) - .acmd("sound_specialairs3lw", sound_specials3lw) - .acmd("expression_specialairs3lw", expression_specials3lw) - - .acmd("game_specials4hi", game_specials4hi) - .acmd("effect_specials4hi", effect_specials4hi) - .acmd("sound_specials4hi", sound_specials4hi) - .acmd("expression_specials4hi", expression_specials4hi) - .acmd("game_specialairs4hi", game_specials4hi) - .acmd("effect_specialairs4hi", effect_specials4hi) - .acmd("sound_specialairs4hi", sound_specials4hi) - .acmd("expression_specialairs4hi", expression_specials4hi) - .acmd("game_specials4s", game_specials4s) - .acmd("effect_specials4s", effect_specials4s) - .acmd("sound_specials4s", sound_specials4s) - .acmd("expression_specials4s", expression_specials4s) - .acmd("game_specialairs4s", game_specials4s) - .acmd("effect_specialairs4s", effect_specials4s) - .acmd("sound_specialairs4s", sound_specials4s) - .acmd("expression_specialairs4s", expression_specials4s) - .acmd("game_specials4lw", game_specials4lw) - .acmd("effect_specials4lw", effect_specials4lw) - .acmd("sound_specials4lw", sound_specials4lw) - .acmd("game_specialairs4lw", game_specials4lw) - .acmd("effect_specialairs4lw", effect_specials4lw) - .acmd("sound_specialairs4lw", sound_specials4lw) - .acmd("game_specials4back", game_specials4back) - .acmd("effect_specials4back", effect_specials4back) - .acmd("sound_specials4back", sound_specials4back) - .acmd("expression_specials4back", expression_specials4back) - .acmd("game_specialairs4back", game_specials4back) - .acmd("effect_specialairs4back", effect_specials4back) - .acmd("sound_specialairs4back", sound_specials4back) - .acmd("expression_specialairs4back", expression_specials4back) - - .acmd("game_specialhi", roy_special_hi_game) - .acmd("game_specialairhi", roy_special_air_hi_game) - - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwhit", game_speciallwhit) - .acmd("game_specialairlwhit", game_speciallwhit) - .install(); -} diff --git a/fighters/roy/src/acmd/specials/mod.rs b/fighters/roy/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..59958f04a6 --- /dev/null +++ b/fighters/roy/src/acmd/specials/mod.rs @@ -0,0 +1,488 @@ +use super::*; + +mod special_s1; +mod special_s2; +mod special_s3; +mod special_s4; + +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); + } + frame(lua_state, 9.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +unsafe extern "C" fn expression_specialnend(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); + //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + } + frame(lua_state, 9.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); + } + frame(lua_state, 9.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +unsafe extern "C" fn expression_specialairnend(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); + //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + } + frame(lua_state, 9.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, 1); + } + frame(lua_state, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 33.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, 1); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 15.0/(40.0-30.0)); + frame(lua_state, 33.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); + } +} + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + if WorkModule::is_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { + AttackModule::set_optional_hit_sound(boma, 0, smash::phx::Hash40::new("se_roy_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 1, smash::phx::Hash40::new("se_roy_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 2, smash::phx::Hash40::new("se_roy_criticalhit")); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("effect_specialnend", effect_specialnend); + agent.acmd("sound_specialnend", sound_specialnend); + agent.acmd("expression_specialnend", expression_specialnend); + agent.acmd("game_specialnend2", game_specialnend2); + agent.acmd("game_specialnend3", game_specialnend3); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("sound_specialairnend", sound_specialairnend); + agent.acmd("expression_specialairnend",expression_specialairnend); + agent.acmd("game_specialairnend2", game_specialairnend2); + agent.acmd("game_specialairnend3", game_specialairnend3); + + special_s1::install(agent); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/roy/src/acmd/specials/special_s1.rs b/fighters/roy/src/acmd/specials/special_s1.rs new file mode 100644 index 0000000000..cca1d6242a --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s1.rs @@ -0,0 +1,89 @@ +use super::*; + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack10")); + } + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s01")); + } +} + +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("sound_specials1", sound_specials1); + agent.acmd("expression_specials1", expression_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("sound_specialairs1", sound_specials1); + agent.acmd("expression_specialairs1", expression_specials1); +} diff --git a/fighters/roy/src/acmd/specials/special_s2.rs b/fighters/roy/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..11a4cbefc8 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s2.rs @@ -0,0 +1,177 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack01")); + } + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02h")); + } +} + +unsafe extern "C" fn expression_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 12.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + AttackModule::clear_all(boma); + } + frame(lua_state, 34.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack02")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02l")); + } +} + +unsafe extern "C" fn expression_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 14.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("expression_specials2hi", expression_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + agent.acmd("expression_specialairs2hi", expression_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("expression_specials2lw", expression_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); + agent.acmd("expression_specialairs2lw", expression_specials2lw); +} diff --git a/fighters/roy/src/acmd/specials/special_s3.rs b/fighters/roy/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..437633c222 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s3.rs @@ -0,0 +1,275 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 42.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack07")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03h")); + } +} + +unsafe extern "C" fn expression_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 37.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack04")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03s")); + } +} + +unsafe extern "C" fn expression_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 11.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 16.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack03")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03l")); + } +} + +unsafe extern "C" fn expression_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("expression_specials3hi", expression_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + agent.acmd("expression_specialairs3hi", expression_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("expression_specials3s", expression_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + agent.acmd("expression_specialairs3s", expression_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("expression_specials3lw", expression_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); + agent.acmd("expression_specialairs3lw", expression_specials3lw); +} diff --git a/fighters/roy/src/acmd/specials/special_s4.rs b/fighters/roy/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..5a7b7b2699 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s4.rs @@ -0,0 +1,328 @@ +use super::*; + +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack05")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s04h")); + } +} + +unsafe extern "C" fn expression_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state,15.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } + frame(lua_state, 33.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + } +} + +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 20.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack06")); + } + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_s01")); + + } +} + +unsafe extern "C" fn expression_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 20.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + } +} + +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 39.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + } + frame(lua_state, 37.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); + EFFECT(agent, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn sound_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_h")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h01")); + } + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h02")); + } +} + +unsafe extern "C" fn game_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + PostureModule::reverse_lr(boma); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 32.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack08")); + } + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_swing_ll")); + } +} + +unsafe extern "C" fn expression_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("sound_specials4hi", sound_specials4hi); + agent.acmd("expression_specials4hi", expression_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("sound_specialairs4hi", sound_specials4hi); + agent.acmd("expression_specialairs4hi", expression_specials4hi); + + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("sound_specials4s", sound_specials4s); + agent.acmd("expression_specials4s", expression_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("sound_specialairs4s", sound_specials4s); + agent.acmd("expression_specialairs4s", expression_specials4s); + + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("sound_specials4lw", sound_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + agent.acmd("sound_specialairs4lw", sound_specials4lw); + + agent.acmd("game_specials4back", game_specials4back); + agent.acmd("effect_specials4back", effect_specials4back); + agent.acmd("sound_specials4back", sound_specials4back); + agent.acmd("expression_specials4back", expression_specials4back); + agent.acmd("game_specialairs4back", game_specials4back); + agent.acmd("effect_specialairs4back", effect_specials4back); + agent.acmd("sound_specialairs4back", sound_specials4back); + agent.acmd("expression_specialairs4back", expression_specials4back); +} diff --git a/fighters/roy/src/acmd/throws.rs b/fighters/roy/src/acmd/throws.rs index 5ba05d8a13..6f653cd91e 100644 --- a/fighters/roy/src/acmd/throws.rs +++ b/fighters/roy/src/acmd/throws.rs @@ -1,154 +1,148 @@ use super::*; -unsafe extern "C" fn roy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 roy_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 roy_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 21, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 21, 9); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:1.0, y: -3.0, z: 14.75 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 135, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 135, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 5); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 97, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 97, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 22); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 22); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 85, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 85, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_catch", roy_catch_game) - .acmd("game_catchdash", roy_catch_dash_game) - .acmd("game_catchturn", roy_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/roy/src/acmd/tilts.rs b/fighters/roy/src/acmd/tilts.rs index 8887ff04c5..c343f25c19 100644 --- a/fighters/roy/src/acmd/tilts.rs +++ b/fighters/roy/src/acmd/tilts.rs @@ -1,168 +1,162 @@ - use super::*; -unsafe extern "C" fn roy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 13.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 13.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 11.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 11.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 110, 107, 0, 35, 3.5, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 110, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 11.0, 110, 107, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 100, 73, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 110, 107, 0, 35, 3.5, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 110, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 11.0, 110, 107, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 100, 73, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 85, 107, 0, 35, 3.25, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 85, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 11.0, 85, 107, 0, 35, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 90, 73, 0, 35, 3.0, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 85, 107, 0, 35, 3.25, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 85, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 11.0, 85, 107, 0, 35, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 90, 73, 0, 35, 3.0, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn roy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 10); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 10); } - } -unsafe extern "C" fn roy_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 80, 40, 0, 90, 2.25, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 80, 40, 0, 90, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 80, 40, 0, 90, 4.25, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 6.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 80, 40, 0, 90, 2.25, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 80, 40, 0, 90, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 80, 40, 0, 90, 4.25, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 6.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attacks3", roy_attack_s3_s_game) - .acmd("expression_attacks3", roy_attack_s3_s_expression) - .acmd("game_attacks3hi", roy_attack_s3_hi_game) - .acmd("game_attacks3lw", roy_attack_s3_lw_game) - .acmd("game_attackhi3", roy_attack_hi3_game) - .acmd("effect_attackhi3", roy_attack_hi3_effect) - .acmd("expression_attackhi3", roy_attack_hi3_expression) - .acmd("game_attacklw3", roy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/roy/src/lib.rs b/fighters/roy/src/lib.rs index 3e1f266077..fa24d112b4 100644 --- a/fighters/roy/src/lib.rs +++ b/fighters/roy/src/lib.rs @@ -4,7 +4,6 @@ pub mod acmd; -//pub mod status; pub mod opff; pub mod status; @@ -38,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("roy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/roy/src/opff.rs b/fighters/roy/src/opff.rs index eb6e156cd2..edf908dfeb 100644 --- a/fighters/roy/src/opff.rs +++ b/fighters/roy/src/opff.rs @@ -15,7 +15,6 @@ pub unsafe fn double_edge_dance_vertical_momentum(boma: &mut BattleObjectModuleA } } - pub unsafe fn double_edge_dance_during_hitlag(fighter: &mut L2CFighterCommon) { if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S3]) { return; @@ -136,8 +135,7 @@ pub unsafe fn roy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("roy") - .on_line(Main, roy_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, roy_frame_wrapper); } diff --git a/fighters/roy/src/status/mod.rs b/fighters/roy/src/status/mod.rs new file mode 100644 index 0000000000..c0cec6331e --- /dev/null +++ b/fighters/roy/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); +} diff --git a/fighters/roy/src/status.rs b/fighters/roy/src/status/special_s.rs similarity index 96% rename from fighters/roy/src/status.rs rename to fighters/roy/src/status/special_s.rs index b0f2e86ab3..1c7f6141f2 100644 --- a/fighters/roy/src/status.rs +++ b/fighters/roy/src/status/special_s.rs @@ -1,15 +1,8 @@ use super::*; -use globals::*; -// status script import -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); @@ -84,6 +77,8 @@ pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } +// FIGHTER_ROY_STATUS_KIND_SPECIAL_S4 + pub unsafe extern "C" fn special_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); let mot = if VarModule::is_flag(fighter.battle_object, vars::roy::status::SIDE_B_REVERSE) { @@ -172,9 +167,15 @@ unsafe extern "C" fn special_s_mot_helper(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("roy") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main) - .install(); +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + + agent.status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main); } diff --git a/fighters/ryu/src/acmd/aerials.rs b/fighters/ryu/src/acmd/aerials.rs index 2a67d67ee2..352b899267 100644 --- a/fighters/ryu/src/acmd/aerials.rs +++ b/fighters/ryu/src/acmd/aerials.rs @@ -1,267 +1,266 @@ - use super::*; -unsafe extern "C" fn ryu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + MeterModule::watch_damage(agent.battle_object, false); + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 17.0 / (36.0 - 15.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0 / (36.0 - 15.0)); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } -unsafe extern "C" fn ryu_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ryu_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (9.0-6.0)/5.0); } frame(lua_state, 9.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn ryu_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn ryu_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 366, 100, 20, 0, 5.0, 0.0, 15.0, 5.1, Some(0.0), Some(16.5), Some(5.1), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 366, 100, 20, 0, 5.0, 0.0, 15.0, 5.1, Some(0.0), Some(16.5), Some(5.1), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 172, 0, 0, 6.0, 0.0, 17.0, 4.0, Some(0.0), Some(18.5), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 172, 0, 0, 6.0, 0.0, 17.0, 4.0, Some(0.0), Some(18.5), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 33.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attackairn", ryu_attack_air_n_game) - .acmd("game_attackairf", ryu_attack_air_f_game) - .acmd("expression_attackairf", ryu_attack_air_f_expression) - .acmd("game_attackairb", ryu_attack_air_b_game) - .acmd("effect_attackairb", ryu_attack_air_b_effect) - .acmd("game_attackairhi", ryu_attack_air_hi_game) - .acmd("game_attackairlw", ryu_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ryu/src/acmd/finals.rs b/fighters/ryu/src/acmd/finals.rs index 1e8ad26beb..3310b27a98 100644 --- a/fighters/ryu/src/acmd/finals.rs +++ b/fighters/ryu/src/acmd/finals.rs @@ -1,13 +1,15 @@ use super::*; unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { CHECK_VALID_FINAL_START_CAMERA(agent, 0, 7, 20, 0, 0, 0); SLOW_OPPONENT(agent, 80.0, 50.0); } - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - frame(agent.lua_state_agent, 10.0); + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { + frame(lua_state, 10.0); if is_excute(agent) { FT_SET_FINAL_FEAR_FACE(agent, 40); REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final.nuanmb"), true); @@ -18,130 +20,130 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { CAM_ZOOM_IN_arg5(agent, 3.0, 0.0, 1.8, 0.0, 0.0); FT_START_CUTIN(agent); } - frame(agent.lua_state_agent, 28.0); + frame(lua_state, 28.0); if is_excute(agent) { CAM_ZOOM_OUT(agent); } } - frame(agent.lua_state_agent, 30.0); + frame(lua_state, 30.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 60, 90, 0, 50, 8.0, 0.0, 5.0, 8.0, Some(0.0), Some(9.5), Some(8.0), 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); + AttackModule::set_no_dead_all(boma, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 50.0); + frame(lua_state, 50.0); if is_excute(agent) { - SlowModule::set_whole(agent.module_accessor, 2, 0); - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); + SlowModule::set_whole(boma, 2, 0); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); } ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 5.0, 10.0, Some(0.0), Some(9.5), Some(10.0), 2.6, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL01, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); - SlowModule::clear_whole(agent.module_accessor); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); + SlowModule::clear_whole(boma); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 367, 100, 120, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *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_RYU_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } - wait(agent.lua_state_agent, 10.0); + wait(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 80, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { - SlowModule::set_whole(agent.module_accessor, 2, 0); + SlowModule::set_whole(boma, 2, 0); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 12.0, 10.0, None, None, None, 2.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL02, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); + AttackModule::set_no_dead_all(boma, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); CAM_ZOOM_OUT(agent); CAM_ZOOM_IN_arg5(agent, 3.0, 0.0, 1.9, 0.0, 0.0); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_2, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_2, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); CAM_ZOOM_OUT(agent); CAM_ZOOM_IN_arg5(agent, 5.0, 0.0, 2.1, 0.0, 0.0); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); ATTACK(agent, 0, 0, Hash40::new("top"), 7.1, 80, 126, 0, 82, 10.0, 0.0, 20.0, 8.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL03, *ATTACK_REGION_PUNCH); - AttackModule::set_force_reaction(agent.module_accessor, 0, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_3, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_3, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - SlowModule::clear_whole(agent.module_accessor); + AttackModule::clear_all(boma); + SlowModule::clear_whole(boma); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { CAM_ZOOM_OUT(agent); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } } unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, 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_FIRE, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 75, 0, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, 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_NONE, *ATTACK_REGION_NONE); // ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 80, 0, 35.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, true, 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_NONE, *ATTACK_REGION_NONE); } - frame(agent.lua_state_agent, 90.0); + frame(lua_state, 90.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 6.0); + wait(lua_state, 6.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ryu_shinkuhadoken") - .acmd("game_move", game_move) - .install(); - smashline::Agent::new("ryu") - .acmd("game_final", game_final) - .acmd("game_finalair", game_final) - .acmd("game_finalhit", game_finalhit) - .acmd("game_finalairhit", game_finalhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); + agent.acmd("game_finalair", game_final); + + agent.acmd("game_finalhit", game_finalhit); + agent.acmd("game_finalairhit", game_finalhit); } diff --git a/fighters/ryu/src/acmd/ground.rs b/fighters/ryu/src/acmd/ground.rs index ca5875bf33..93bee28eba 100644 --- a/fighters/ryu/src/acmd/ground.rs +++ b/fighters/ryu/src/acmd/ground.rs @@ -1,357 +1,353 @@ - use super::*; -unsafe extern "C" fn ryu_attack_11_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 5, 0, Hash40::new("top"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 6.0, 6.5, Some(0.0), Some(6.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 6.0, 6.5, Some(0.0), Some(6.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // ground - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // air - ATTACK(fighter, 3, 0, Hash40::new("arml"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 8.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 8.0, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_11_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 12.2, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 12.2, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn ryu_attack_11_w_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_punch_m")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ryu_rnd_attack_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_punch_m")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ryu_rnd_attack_m")); } } -unsafe extern "C" fn ryu_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr") , 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr") , 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 10.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 10.0, 10.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12.0, 4.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12.0, 4.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn ryu_attack_12_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_s")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_s")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack02")); } } -unsafe extern "C" fn ryu_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 4.0, 0.0, 12.0, 7.5, Some(0.0), Some(12.0), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 3.0, 0.0, 7.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 4.0, 0.0, 12.0, 7.5, Some(0.0), Some(12.0), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 3.0, 0.0, 7.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 23.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 23.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 26.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 12.5, 0, 10, 0, 170, 0.82, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 12.5, 0, 10, 0, 170, 0.82, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.75, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.75, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ryu_attack_13_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack08")); } } -unsafe extern "C" fn game_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 80, 15, 0, 38, 3.5, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 80, 15, 0, 38, 3.5, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 80, 15, 0, 38, 3.5, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 80, 15, 0, 38, 3.5, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11nears(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn game_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); // HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), -2, 12, 3, 30, -20, -170, 1.1, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.35); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), -2, 12, 3, 30, -20, -170, 1.1, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.35); } frame(lua_state, 9.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sound_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ryu_rnd_attack_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ryu_rnd_attack_l")); } } -unsafe extern "C" fn expression_attack12s(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_attack12s(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attack11w", ryu_attack_11_w_game) - .acmd("effect_attack11w", ryu_attack_11_w_effect) - .acmd("sound_attack11w", ryu_attack_11_w_sound) - - .acmd("game_attack12", ryu_attack_12_game) - .acmd("effect_attack12", ryu_attack_12_effect) - .acmd("sound_attack12", ryu_attack_12_sound) +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11w", game_attack11w); + agent.acmd("effect_attack11w", effect_attack11w); + agent.acmd("sound_attack11w", sound_attack11w); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("sound_attack12", sound_attack12); - .acmd("game_attack13", ryu_attack_13_game) - .acmd("effect_attack13", ryu_attack_13_effect) - .acmd("sound_attack13", ryu_attack_13_sound) + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); - .acmd("game_attack11s", game_attack11s) - .acmd("game_attack11nears", game_attack11s) - .acmd("effect_attack11s", effect_attack11s) - .acmd("effect_attack11nears", effect_attack11s) - - .acmd("game_attack12s", game_attack12s) - .acmd("effect_attack12s", effect_attack12s) - .acmd("sound_attack12s", sound_attack12s) - .acmd("expression_attack12s", expression_attack12s) + agent.acmd("game_attack11s", game_attack11s); + agent.acmd("game_attack11nears", game_attack11s); + agent.acmd("effect_attack11s", effect_attack11nears); + agent.acmd("effect_attack11nears", effect_attack11nears); + agent.acmd("game_attack12s", game_attack12s); + agent.acmd("effect_attack12s", effect_attack12s); + agent.acmd("sound_attack12s", sound_attack12s); + agent.acmd("expression_attack12s", expression_attack12s); - .acmd("game_attackdash", game_attackdash) - .install(); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ryu/src/acmd/mod.rs b/fighters/ryu/src/acmd/mod.rs index 7bf1c091a8..3975bab577 100644 --- a/fighters/ryu/src/acmd/mod.rs +++ b/fighters/ryu/src/acmd/mod.rs @@ -1,20 +1,21 @@ use super::*; -mod aerials; -mod finals; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; +mod finals; -pub fn install() { - aerials::install(); - finals::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); + finals::install(agent); +} \ No newline at end of file diff --git a/fighters/ryu/src/acmd/other.rs b/fighters/ryu/src/acmd/other.rs index cc09f4a8e0..6204e2f4b9 100644 --- a/fighters/ryu/src/acmd/other.rs +++ b/fighters/ryu/src/acmd/other.rs @@ -1,195 +1,118 @@ 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_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(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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_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_ryu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ryu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn ryu_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) { - fighter.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.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) { - fighter.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); + if is_excute(agent) { + agent.on_flag(*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_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.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_ryu_guard")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { + PLAY_SE(agent, Hash40::new("se_ryu_guard")); } } } -pub fn install() { - smashline::Agent::new("ryu") - .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", ryu_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_guarddamage", sound_guarddamage) - .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_guarddamage", sound_guarddamage); } diff --git a/fighters/ryu/src/acmd/smashes.rs b/fighters/ryu/src/acmd/smashes.rs index 4344798a82..e02bea8f03 100644 --- a/fighters/ryu/src/acmd/smashes.rs +++ b/fighters/ryu/src/acmd/smashes.rs @@ -1,219 +1,217 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 10.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.0, 0.0, 9.5, 8.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.3, 0.0, 9.5, 4.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.6, 0.0, 12.0, 2.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.0, 0.0, 9.5, 8.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.3, 0.0, 9.5, 4.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.6, 0.0, 12.0, 2.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.5, 0.0, 9.5, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.8, 0.0, 9.5, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 4.1, 0.0, 12.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.5, 0.0, 9.5, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.8, 0.0, 9.5, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 4.1, 0.0, 12.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 27.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_attack_line"), Hash40::new("ryu_attack_line"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.25, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_attack_line"), Hash40::new("ryu_attack_line"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.25, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.75, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); - } -} - -unsafe extern "C" fn effect_attacks4charge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); - } - for _ in 0..34 { - wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); - } + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.75, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn sound_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ryu_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_ryu_smash_s01")); } wait(lua_state, 38.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ryu_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ryu_step_left_m")); } } -unsafe extern "C" fn expression_attacks4(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_attacks4(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); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - AREA_WIND_2ND_arg10(fighter, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); + AREA_WIND_2ND_arg10(agent, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + } + for _ in 0..34 { + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); + } + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.4, 83, 95, 0, 30, 5.3, 0.0, 9.0, 8.5, None, None, None, 1.22, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.4, 83, 95, 0, 30, 5.3, 0.0, 9.0, 8.5, None, None, None, 1.22, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.5, 83, 86, 0, 32, 4.3, -2.0, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.5, 83, 86, 0, 32, 4.3, -2.0, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 83, 86, 0, 32, 4.8, 0.0, 21.5, 5.0, Some(0.0), Some(17.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 83, 86, 0, 32, 4.8, 0.0, 21.5, 5.0, Some(0.0), Some(17.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("effect_attacks4charge", effect_attacks4charge) - .acmd("sound_attacks4", sound_attacks4) - .acmd("expression_attacks4", expression_attacks4) +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("effect_attacks4charge", effect_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/ryu/src/acmd/specials/mod.rs b/fighters/ryu/src/acmd/specials/mod.rs index 863b5c50da..3a190875e2 100644 --- a/fighters/ryu/src/acmd/specials/mod.rs +++ b/fighters/ryu/src/acmd/specials/mod.rs @@ -1,14 +1,15 @@ use super::*; + mod special_command; mod special_hi; mod special_lw; mod special_n; mod special_s; -pub fn install() { - special_command::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + special_command::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/ryu/src/acmd/specials/special_command.rs b/fighters/ryu/src/acmd/specials/special_command.rs index 0437c35ee4..9a9cf2e0b7 100644 --- a/fighters/ryu/src/acmd/specials/special_command.rs +++ b/fighters/ryu/src/acmd/specials/special_command.rs @@ -1,8 +1,9 @@ - use super::*; unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); let strength = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); let add_startup = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 6.0 @@ -19,9 +20,9 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); } } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); let speed = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 2.0 } else if strength == *FIGHTER_RYU_STRENGTH_W { @@ -33,15 +34,15 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { }; if is_excute(agent) { sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, speed); - JostleModule::set_team(agent.module_accessor, 1); + JostleModule::set_team(boma, 1); // nothing hitboxes here for interpolation ATTACK(agent, 0, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, -1.5, -1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, -6.2, -1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); ATTACK(agent, 2, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, 4.3, -1.7, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + WorkModule::on_flag(boma, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); MeterModule::watch_damage(agent.battle_object, true); if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::watch_damage(agent.battle_object, false); @@ -57,7 +58,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.3, 361, 98, 0, 26, 3.9, 4.3, -1.7, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); let recovery = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 33.0 } else if strength == *FIGHTER_RYU_STRENGTH_W { @@ -70,34 +71,35 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 20.0, 46.0, recovery); if is_excute(agent) { sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0); - JostleModule::set_team(agent.module_accessor, 0); + JostleModule::set_team(boma, 0); MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 33.0); + frame(lua_state, 33.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + WorkModule::off_flag(boma, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); } - frame(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); @@ -111,22 +113,22 @@ unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.5, 14, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 21.0); + frame(lua_state, 21.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 29.0); + frame(lua_state, 29.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { EFFECT_OFF_KIND(agent, Hash40::new("ryu_savingattack_aura"), true, true); @@ -135,51 +137,52 @@ unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_common_smash_start")); } - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ryu_smash_s01")); PLAY_SE(agent, Hash40::new("vc_ryu_smash_s01")); } - wait(agent.lua_state_agent, 38.0); + wait(lua_state, 38.0); if is_excute(agent) { PLAY_STEP(agent, Hash40::new("se_ryu_step_left_m")); } } unsafe extern "C" fn expression_attackcommand4(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); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); AREA_WIND_2ND_arg10(agent, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 28.0); + frame(lua_state, 28.0); if is_excute(agent) { - AreaModule::erase_wind(agent.module_accessor, 0); + AreaModule::erase_wind(boma, 0); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attackcommand4", game_attackcommand4) - .acmd("effect_attackcommand4", effect_attackcommand4) - .acmd("sound_attackcommand4", sound_attackcommand4) - .acmd("expression_attackcommand4", expression_attackcommand4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackcommand4", game_attackcommand4); + agent.acmd("effect_attackcommand4", effect_attackcommand4); + agent.acmd("sound_attackcommand4", sound_attackcommand4); + agent.acmd("expression_attackcommand4", expression_attackcommand4); } diff --git a/fighters/ryu/src/acmd/specials/special_hi.rs b/fighters/ryu/src/acmd/specials/special_hi.rs index 619d0dbb4e..46161dcfc2 100644 --- a/fighters/ryu/src/acmd/specials/special_hi.rs +++ b/fighters/ryu/src/acmd/specials/special_hi.rs @@ -1,323 +1,319 @@ - use super::*; -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 80, 49, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 80, 49, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 60, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 60, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 80, 107, 0, 84, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 107, 0, 84, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 80, 107, 0, 84, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 107, 0, 84, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialairhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if MotionModule::motion_kind(boma) == hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } } frame(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 58, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *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_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 58, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 69, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 69, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } else { - if MotionModule::motion_kind(fighter.module_accessor) != hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if MotionModule::motion_kind(boma) != hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag( *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 82, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 82, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag( *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 82, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 82, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn effect_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), -6.5, 5, 0, 5, 0, -25, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), -6.5, 5, 0, 5, 0, -25, 1, false); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), -1); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("top"), 10, 8, 3, -100, 160, 0, 1.4, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ryu_syoryuken_arc"), -1); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("top"), 10, 8, 3, -100, 160, 0, 1.4, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ryu_syoryuken_arc"), true, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } - -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialairhicommand", game_specialairhi) - .acmd("game_specialairhiend", game_specialairhiend) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialhicommand", game_specialhi) - .acmd("game_specialhifall", game_specialhifall) - .acmd("effect_specialhi", effect_specialhi) - .acmd("effect_specialairhi", effect_specialhi) - .acmd("effect_specialhicommand", effect_specialhi) - .acmd("effect_specialairhicommand", effect_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhicommand", game_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhicommand", game_specialhi); + agent.acmd("game_specialhifall", game_specialhifall); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("effect_specialhicommand", effect_specialhi); + agent.acmd("effect_specialairhicommand", effect_specialhi); } diff --git a/fighters/ryu/src/acmd/specials/special_lw.rs b/fighters/ryu/src/acmd/specials/special_lw.rs index 5600cc1aae..7b56b82563 100644 --- a/fighters/ryu/src/acmd/specials/special_lw.rs +++ b/fighters/ryu/src/acmd/specials/special_lw.rs @@ -1,75 +1,81 @@ - use super::*; -unsafe extern "C" fn game_speciallwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(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.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 4 + MeterModule::level(agent.battle_object) >= 4 ); - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } } -unsafe extern "C" fn game_speciallwinstall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 18.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 18.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ryu_appeal_l01")); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_ryu_appeal03")); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { - let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); + let sfx_handle = SoundModule::play_se(boma, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 0.5, 0); } } unsafe extern "C" fn expression_speciallwinstall(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); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); AREA_WIND_2ND_arg10(agent, 0, 1, 70, 8, 0.8, 0, 6, 32, 12, 80); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { - AreaModule::erase_wind(agent.module_accessor, 0); + AreaModule::erase_wind(boma, 0); } } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 11.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); let lv = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_INT_SAVING_LV); MeterModule::watch_damage(agent.battle_object, true); if is_excute(agent) { @@ -80,34 +86,36 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { } else if lv == *FIGHTER_RYU_SAVING_LV_2 { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } else { ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } - AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); - AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); + AttackModule::set_attack_level(boma, 0, lv as u8); + AttackModule::set_attack_level(boma, 1, lv as u8); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_REVERSE_MATERIAL_ANIM); } } unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { REVERSE_LR(agent); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); let lv = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_INT_SAVING_LV); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_DISABLE_SUPER_ARMOR); @@ -118,39 +126,37 @@ unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { } else if lv == *FIGHTER_RYU_SAVING_LV_2 { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } else { ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } - AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); - AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); + AttackModule::set_attack_level(boma, 0, lv as u8); + AttackModule::set_attack_level(boma, 1, lv as u8); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_REVERSE_MATERIAL_ANIM); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_speciallwstart", game_speciallwstart) - .acmd("game_specialairlwstart", game_speciallwstart) - .acmd("game_speciallwinstall", game_speciallwinstall) - .acmd("effect_speciallwinstall", effect_speciallwinstall) - .acmd("sound_speciallwinstall", sound_speciallwinstall) - .acmd("expression_speciallwinstall", expression_speciallwinstall) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwturn", game_speciallwturn) - .acmd("game_specialairlwturn", game_speciallwturn) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); + agent.acmd("game_speciallwinstall", game_speciallwinstall); + agent.acmd("effect_speciallwinstall", effect_speciallwinstall); + agent.acmd("sound_speciallwinstall", sound_speciallwinstall); + agent.acmd("expression_speciallwinstall", expression_speciallwinstall); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwturn", game_speciallwturn); + agent.acmd("game_specialairlwturn", game_speciallwturn); } diff --git a/fighters/ryu/src/acmd/specials/special_n.rs b/fighters/ryu/src/acmd/specials/special_n.rs index b34e177d42..27aaa65351 100644 --- a/fighters/ryu/src/acmd/specials/special_n.rs +++ b/fighters/ryu/src/acmd/specials/special_n.rs @@ -1,346 +1,144 @@ - use super::*; -unsafe extern "C" fn game_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); frame(lua_state, 10.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if boma.is_button_on(Buttons::Guard | Buttons::GuardHold) - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) && !ArticleModule::is_exist(boma, *FIGHTER_RYU_GENERATE_ARTICLE_HADOKEN) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED); } else { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 2.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 2.0 * MeterModule::damage_gain_mul(agent.battle_object)); } } } frame(lua_state, 14.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 31.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 31.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 4.0); - if !fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if !agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("ryu_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("ryu_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } for _ in 0..6 { wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } else{ frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - } -} - -// RYU_HADOUKEN - -unsafe extern "C" fn game_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - Hash40::new("collision_attr_elec") - } else { - Hash40::new("collision_attr_normal") - }; - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); - VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); - } else { - VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); - } - } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } -} - -unsafe extern "C" fn effect_movemws(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if fighter.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); - } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - // LAST_EFFECT_SET_COLOR(fighter, 2.0, 2.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -0.5, 0, 0, 0, 1.25, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 1.5, false); - } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } - } -} - -unsafe extern "C" fn game_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) - } - - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - } - - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - wait(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); - } - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); - } -} - -unsafe extern "C" fn effect_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - } -} - -unsafe extern "C" fn game_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn effect_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialn", game_specialn) - .acmd("game_specialairn", game_specialn) - .acmd("effect_specialn", effect_specialn) - .acmd("effect_specialairn", effect_specialn) - .install(); - smashline::Agent::new("ryu_hadoken") - .acmd("game_movew", game_movewms) - .acmd("game_movem", game_movewms) - .acmd("game_moves", game_movewms) - .acmd("effect_movew", effect_movemws) - .acmd("effect_movem", effect_movemws) - .acmd("effect_moves", effect_movemws) - .acmd("game_movespw", game_movespwms) - .acmd("game_movespm", game_movespwms) - .acmd("game_movesps", game_movespwms) - .acmd("effect_movespw", effect_movespwms) - .acmd("effect_movespm", effect_movespwms) - .acmd("effect_movesps", effect_movespwms) - .acmd("game_movespw_last", game_movespwms_last) - .acmd("game_movespm_last", game_movespwms_last) - .acmd("game_movesps_last", game_movespwms_last) - .acmd("effect_movespw_last", effect_movespwms_last) - .acmd("effect_movespm_last", effect_movespwms_last) - .acmd("effect_movesps_last", effect_movespwms_last) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); } diff --git a/fighters/ryu/src/acmd/specials/special_s.rs b/fighters/ryu/src/acmd/specials/special_s.rs index 5cb46eac79..167b44a33c 100644 --- a/fighters/ryu/src/acmd/specials/special_s.rs +++ b/fighters/ryu/src/acmd/specials/special_s.rs @@ -1,91 +1,90 @@ - use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 3.5, 8.5, 8.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 3.0, 9.0, 3.0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); } } frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 0.5); - fighter.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); + FT_MOTION_RATE(agent, 0.5); + agent.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - MeterModule::watch_damage(fighter.battle_object, true); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); AttackModule::set_size(boma, 1, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - MeterModule::watch_damage(fighter.battle_object, true); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); @@ -93,206 +92,204 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 6.0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - FT_MOTION_RATE_RANGE(fighter, 6.0, 31.0, 12.0); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + FT_MOTION_RATE_RANGE(agent, 6.0, 31.0, 12.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 1.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND){ - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND){ + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -unsafe extern "C" fn ryu_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ - LANDING_EFFECT_FLIP(fighter, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ + LANDING_EFFECT_FLIP(agent, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } } } -unsafe extern "C" fn ryu_special_air_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn ryu_special_air_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 1.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("game_specialsend", game_specialsend) - .acmd("game_specialairsend", game_specialsend) - .acmd("effect_specials", ryu_special_s_effect) - .acmd("effect_specialsend", ryu_special_s_end_effect) - .acmd("effect_specialairsend", ryu_special_air_s_end_effect) - .acmd("effect_specialairs", ryu_special_air_s_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialairsend); + agent.acmd("effect_specialairs", effect_specialairs); } diff --git a/fighters/ryu/src/acmd/throws.rs b/fighters/ryu/src/acmd/throws.rs index 93374973ba..94e0f15a65 100644 --- a/fighters/ryu/src/acmd/throws.rs +++ b/fighters/ryu/src/acmd/throws.rs @@ -1,33 +1,31 @@ - use super::*; -unsafe extern "C" fn ryu_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 ryu_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -47,7 +45,7 @@ unsafe extern "C" fn ryu_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -67,128 +65,130 @@ unsafe extern "C" fn ryu_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 7); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 8.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 8.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 39, 64, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 39, 64, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 15, 4); + if is_excute(agent) { + agent.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); + CHECK_FINISH_CAMERA(agent, 15, 4); } frame(lua_state, 23.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::add(fighter.battle_object, 11.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::add(agent.battle_object, 11.0 * MeterModule::damage_gain_mul(agent.battle_object)); } wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 6.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 6.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 75, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 75, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 20); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 27.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 2.6, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.7, 5.3, 0.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 2.6, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.7, 5.3, 0.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_catch", ryu_catch_game) - .acmd("game_catchdash", ryu_catch_dash_game) - .acmd("game_catchturn", ryu_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/ryu/src/acmd/tilts.rs b/fighters/ryu/src/acmd/tilts.rs index 3a906df071..b8d54661ec 100644 --- a/fighters/ryu/src/acmd/tilts.rs +++ b/fighters/ryu/src/acmd/tilts.rs @@ -1,37 +1,36 @@ - use super::*; -unsafe extern "C" fn game_attacks3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); +unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 2.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.8, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.8, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.8, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.8, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } @@ -78,294 +77,290 @@ unsafe extern "C" fn expression_attacks3w(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 270, 100, 15, 0, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 3.0, 270, 100, 15, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 270, 100, 15, 0, 4.2, 0.0, 11.0, 10.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 270, 100, 15, 0, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 3.0, 270, 100, 15, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 270, 100, 15, 0, 4.2, 0.0, 11.0, 10.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.0, 46, 90, 0, 60, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 6.0, 46, 90, 0, 60, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 46, 90, 0, 60, 4.2, 0.0, 7.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.0, 46, 90, 0, 60, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 6.0, 46, 90, 0, 60, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 46, 90, 0, 60, 4.2, 0.0, 7.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 3.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 21.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); // HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // GROUND - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); // AIR - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 9.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc2"), Hash40::new("ryu_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc2"), Hash40::new("ryu_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn sound_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack06")); } } -unsafe extern "C" fn expression_attackhi3s(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_attackhi3s(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attacklw3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); +unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // GROUND ONLY // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground - ATTACK(fighter, 0, 0, Hash40::new("legl"), 1.6, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.6, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.6, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); // AIR ONLY // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage - ATTACK(fighter, 3, 0, Hash40::new("legl"), 1.6, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *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_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attacks3w", game_attacks3w) - .acmd("game_attacknearw", game_attacks3w) - .acmd("effect_attacks3w", effect_attacks3w) - .acmd("sound_attacks3w", sound_attacks3w) - .acmd("expression_attacks3w", expression_attacks3w) - - .acmd("game_attacks3s", game_attacks3s) - .acmd("game_attackhi3w", game_attackhi3w) - - .acmd("game_attackhi3s", game_attackhi3s) - .acmd("effect_attackhi3s", effect_attackhi3s) - .acmd("sound_attackhi3s", sound_attackhi3s) - .acmd("expression_attackhi3s", expression_attackhi3s) - - .acmd("game_attacklw3w", game_attacklw3w) - .acmd("game_attacklw3s", game_attacklw3s) +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3w", game_attacks3w); + agent.acmd("game_attacknearw", game_attacks3w); + agent.acmd("effect_attacks3w", effect_attacks3w); + agent.acmd("sound_attacks3w", sound_attacks3w); + agent.acmd("expression_attacks3w", expression_attacks3w); + agent.acmd("game_attacks3s", game_attacks3s); - .install(); + agent.acmd("game_attackhi3w", game_attackhi3w); + agent.acmd("game_attackhi3s", game_attackhi3s); + agent.acmd("effect_attackhi3s", effect_attackhi3s); + agent.acmd("sound_attackhi3s", sound_attackhi3s); + agent.acmd("expression_attackhi3s", expression_attackhi3s); + + agent.acmd("game_attacklw3w", game_attacklw3w); + agent.acmd("game_attacklw3s", game_attacklw3s); } diff --git a/fighters/ryu/src/hadoken/acmd.rs b/fighters/ryu/src/hadoken/acmd.rs new file mode 100644 index 0000000000..c0ea6b5814 --- /dev/null +++ b/fighters/ryu/src/hadoken/acmd.rs @@ -0,0 +1,225 @@ +use super::*; + +unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::enable_safe_pos(boma); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); + VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); + } else { + VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); + } + } + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + else{ + GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } + wait(lua_state, 6.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } +} + +unsafe extern "C" fn effect_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); + } + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } + } +} + +unsafe extern "C" fn sound_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) + } + + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + wait(lua_state, 9.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, 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_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, 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_ENERGY); + } + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); + } +} + +unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } + } +} + +unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + } +} + +unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + } + } +} + +unsafe extern "C" fn sound_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movew", game_movewms); + agent.acmd("game_movem", game_movewms); + agent.acmd("game_moves", game_movewms); + agent.acmd("effect_movew", effect_movewms); + agent.acmd("effect_movem", effect_movewms); + agent.acmd("effect_moves", effect_movewms); + agent.acmd("sound_movew", sound_movewms); + agent.acmd("sound_movem", sound_movewms); + agent.acmd("sound_moves", sound_movewms); + agent.acmd("game_movespw", game_movespwms); + agent.acmd("game_movespm", game_movespwms); + agent.acmd("game_movesps", game_movespwms); + agent.acmd("game_movespw_last", game_movespwms_last); + agent.acmd("game_movespm_last", game_movespwms_last); + agent.acmd("game_movesps_last", game_movespwms_last); + agent.acmd("effect_movespw", effect_movespwms); + agent.acmd("effect_movespm", effect_movespwms); + agent.acmd("effect_movesps", effect_movespwms); + agent.acmd("effect_movespw_last", effect_movespwms_last); + agent.acmd("effect_movespm_last", effect_movespwms_last); + agent.acmd("effect_movesps_last", effect_movespwms_last); + agent.acmd("sound_movespw", sound_movespwms); + agent.acmd("sound_movespm", sound_movespwms); + agent.acmd("sound_movesps", sound_movespwms); +} \ No newline at end of file diff --git a/fighters/ryu/src/hadoken/mod.rs b/fighters/ryu/src/hadoken/mod.rs new file mode 100644 index 0000000000..a23c598292 --- /dev/null +++ b/fighters/ryu/src/hadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ryu_hadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ryu/src/lib.rs b/fighters/ryu/src/lib.rs index 8e2ddcc726..24c9496848 100644 --- a/fighters/ryu/src/lib.rs +++ b/fighters/ryu/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod hadoken; +mod shinkuhadoken; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ryu"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + hadoken::install(); + shinkuhadoken::install(); } diff --git a/fighters/ryu/src/opff.rs b/fighters/ryu/src/opff.rs index 0a9fe75583..ae145743d5 100644 --- a/fighters/ryu/src/opff.rs +++ b/fighters/ryu/src/opff.rs @@ -64,11 +64,9 @@ extern "Rust" { fn shotos_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); } -pub fn install() { - smashline::Agent::new("ryu") - .on_line(Main, ryu_frame_wrapper) - .on_line(Main, ryu_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ryu_frame_wrapper); + agent.on_line(Main, ryu_meter); } unsafe extern "C" fn ryu_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { diff --git a/fighters/ryu/src/shinkuhadoken/acmd.rs b/fighters/ryu/src/shinkuhadoken/acmd.rs new file mode 100644 index 0000000000..25caea13bb --- /dev/null +++ b/fighters/ryu/src/shinkuhadoken/acmd.rs @@ -0,0 +1,25 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, 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_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 75, 0, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, 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_NONE, *ATTACK_REGION_NONE); + // ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 80, 0, 35.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, true, 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_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 90.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + wait(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} \ No newline at end of file diff --git a/fighters/ryu/src/shinkuhadoken/mod.rs b/fighters/ryu/src/shinkuhadoken/mod.rs new file mode 100644 index 0000000000..3d3ab27dc1 --- /dev/null +++ b/fighters/ryu/src/shinkuhadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ryu_shinkuhadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ryu/src/status.rs b/fighters/ryu/src/status.rs deleted file mode 100644 index f1a646eb26..0000000000 --- a/fighters/ryu/src/status.rs +++ /dev/null @@ -1,674 +0,0 @@ -use super::*; -use globals::*; - -mod finals; -mod special_cmd4; -mod special_lw; -mod special_s; - -utils::import_noreturn!(common::shoto_status::{ - fgc_end_dashback, - ryu_idkwhatthisis2 -}); - -extern "Rust" { - // from common::shoto_status - fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; - fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; - fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -extern "C" { - fn status_pre_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; -} -extern "C" { - fn status_end_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -pub fn install() { - smashline::Agent::new("ryu") - .on_start(ryu_init) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - // .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); - finals::install(); - special_cmd4::install(); - special_lw::install(); - special_s::install(); -} - -extern "C" fn ryu_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_RYU { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ryu_check_special_command as *const () as _)); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); - } - } -} - -// Prevents sideB from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - - // resets IS_USE_EX_SPECIAL - if !fighter.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_SPECIAL_HI, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, - // *FIGHTER_STATUS_KIND_SPECIAL_N, - // *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, - // *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND, - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - // *FIGHTER_RYU_STATUS_KIND_ATTACK_COMMAND1, - // *FIGHTER_RYU_STATUS_KIND_ATTACK_COMMAND2, - // statuses::ryu::ATTACK_COMMAND_4 - ]) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_FADC); - // VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); - } - - // Re-enables the ability to use sideB when connecting to ground or cliff - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); - } - - // ORIGINAL - fighter.off_flag(*FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLAG_AUTO_TURN_END_STATUS); - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr == 0.0 - || PostureModule::lr(fighter.module_accessor) == lr - || StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { - return 0.into(); - } - - unsafe fn update_lr(fighter: &mut L2CFighterCommon, lr: f32) { - PostureModule::set_lr(fighter.module_accessor, lr); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - - if [ - *FIGHTER_STATUS_KIND_WALK, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_LANDING_LIGHT, - *FIGHTER_STATUS_KIND_GUARD_ON, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, - *FIGHTER_STATUS_KIND_ATTACK_LW4_START, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_ITEM_SWING, - *FIGHTER_STATUS_KIND_SPECIAL_N, - *FIGHTER_STATUS_KIND_FINAL, - *FIGHTER_RYU_STATUS_KIND_WALK_BACK, - ].contains(&fighter.global_table[globals::STATUS_KIND].get_i32()) - { - update_lr(fighter, lr); - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_WAIT { - if ![ - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - *FIGHTER_STATUS_KIND_RUN_BRAKE, - *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_GUARD_OFF, - *FIGHTER_STATUS_KIND_GUARD_DAMAGE, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE_F, - *FIGHTER_STATUS_KIND_ESCAPE_B, - *FIGHTER_STATUS_KIND_ATTACK_DASH, - *FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_CATCH_DASH, - *FIGHTER_STATUS_KIND_CATCH_TURN, - *FIGHTER_STATUS_KIND_CATCH_CUT, - *FIGHTER_STATUS_KIND_THROW, - *FIGHTER_STATUS_KIND_CAPTURE_CUT, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DOWN_STAND, - *FIGHTER_STATUS_KIND_DOWN_STAND_FB, - *FIGHTER_STATUS_KIND_PASSIVE, - *FIGHTER_STATUS_KIND_PASSIVE_FB, - *FIGHTER_STATUS_KIND_FURAFURA_END, - *FIGHTER_STATUS_KIND_DAMAGE_SONG_END, - *FIGHTER_STATUS_KIND_CLIFF_CLIMB, - *FIGHTER_STATUS_KIND_CLIFF_ATTACK, - *FIGHTER_STATUS_KIND_CLIFF_ESCAPE, - *FIGHTER_STATUS_KIND_SLIP_STAND, - *FIGHTER_STATUS_KIND_SLIP_STAND_ATTACK, - *FIGHTER_STATUS_KIND_SLIP_STAND_F, - *FIGHTER_STATUS_KIND_SLIP_STAND_B, - *FIGHTER_STATUS_KIND_ITEM_LIGHT_PICKUP, - *FIGHTER_STATUS_KIND_ITEM_THROW, - *FIGHTER_STATUS_KIND_ITEM_THROW_DASH, - *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, - *FIGHTER_STATUS_KIND_ITEM_SWING, - *FIGHTER_STATUS_KIND_ITEM_SWING_S3, - *FIGHTER_STATUS_KIND_ITEM_SWING_S4, - *FIGHTER_STATUS_KIND_ITEM_SWING_DASH, - *FIGHTER_STATUS_KIND_APPEAL, - *FIGHTER_STATUS_KIND_SPECIAL_N - ].contains(&fighter.global_table[globals::STATUS_KIND_INTERRUPT].get_i32()) - { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_JUMP_SQUAT { - if fighter.global_table[globals::STATUS_KIND_INTERRUPT] != FIGHTER_STATUS_KIND_TURN_RUN { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ATTACK { - if fighter.global_table[globals::STATUS_KIND] != FIGHTER_STATUS_KIND_ATTACK || ComboModule::count(fighter.module_accessor) == 0 { - update_lr(fighter, lr); - } - return 0.into(); - } - - if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ITEM_THROW - && fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND - { - let cat3 = fighter.global_table[globals::CMD_CAT3].get_i32(); - if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_4 != 0 && cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_FB4 == 0 { - update_lr(fighter, lr); - } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_HI != 0 { - update_lr(fighter, lr); - } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_LW != 0 { - update_lr(fighter, lr); - } - } - - 0.into() -} - -/// determines the command inputs -/// I have divided these inputs into command normals (A) and command specials (B) -/// NOTE: order is important! early order has higher priority -pub unsafe extern "C" fn ryu_check_special_command(fighter: &mut L2CFighterCommon) -> L2CValue { - - let cat1 = fighter.global_table[CMD_CAT1].get_i32(); - let cat4 = fighter.global_table[CMD_CAT4].get_i32(); - let is_special = fighter.is_cat_flag(Cat1::SpecialAny); - let is_normal = fighter.is_cat_flag( - Cat1::AttackN | - Cat1::AttackHi3 | - Cat1::AttackS3 | - Cat1::AttackLw3 | - Cat1::AttackHi4 | - Cat1::AttackS4 | - Cat1::AttackLw4 - ); - - // shoryu - if is_special - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND != 0 - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND) - && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_HI_CALLBACK].clone()).get_bool() { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND.into(), true.into()); - return true.into(); - } - - // shaku - if is_special - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N2_COMMAND != 0 - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND) - && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_N_CALLBACK].clone()).get_bool() { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND.into(), true.into()); - return true.into(); - } - - // hado - if is_special - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N_COMMAND != 0 - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND) - && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_N_CALLBACK].clone()).get_bool() { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND.into(), true.into()); - return true.into(); - } - - // the supers - if is_special - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SUPER_SPECIAL_COMMAND != 0 - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - AttackModule::clear_all(fighter.module_accessor); - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL); - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_IS_DISCRETION_FINAL_USED); - fighter.change_status(FIGHTER_STATUS_KIND_FINAL.into(), true.into()); - } else if MeterModule::level(fighter.battle_object) >= MeterModule::meter_cap(fighter.battle_object) { - AttackModule::clear_all(fighter.module_accessor); - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL); - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_IS_DISCRETION_FINAL_USED); - fighter.change_status(FIGHTER_RYU_STATUS_KIND_FINAL2.into(), true.into()); - } - return true.into(); - } - - // tatsu - if is_special - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_S_COMMAND != 0 - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_S_COMMAND) - && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_S_CALLBACK].clone()).get_bool() - && FighterSpecializer_Ryu::check_special_air_s_command(fighter.module_accessor) { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND.into(), true.into()); - return true.into(); - } - - // donkey kick - if is_normal - && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N2_COMMAND != 0 - && fighter.is_situation(*SITUATION_KIND_GROUND) - && !fighter.is_in_hitlag() - && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND) { - fighter.change_status(statuses::ryu::ATTACK_COMMAND_4.into(), true.into()); - return true.into(); - } - - false.into() -} - -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() -} - -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_RYU_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // - -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, - ) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_near_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK11, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk(fighter); - } - fighter.global_table[SUB_STATUS3] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk4(fighter, false.into()); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_main_loop as *const () as _)) -} - -unsafe extern "C" fn ryu_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - } - if ComboModule::count(fighter.module_accessor) == 1 { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); - let attack_start_cancel_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_start_cancel_frame"), - ); - if current_frame < attack_start_cancel_frame { - if ryu_kara_cancel(fighter).get_bool() { - return 1.into(); - } - } - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter - .sub_wait_ground_check_common(false.into()) - .get_bool() - { - return 1.into(); - } - } - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("attack_11_w"), - hash40("attack_11_s"), - hash40("attack_11_near_s"), - ] - .contains(&mot) - { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, - ) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, - ) { - if ControlModule::check_button_off( - fighter.module_accessor, - *CONTROL_PAD_BUTTON_ATTACK, - ) { - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let attack_hi3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_hi3_stick_y"), - ); - let cont; - if !(stick_y < attack_hi3_stick_y) { - cont = false; - } else { - let attack_lw3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_lw3_stick_y"), - ); - if !(attack_lw3_stick_y < stick_y) { - cont = false; - } else { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let attack_s3_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_s3_stick_x"), - ); - cont = stick_x < attack_s3_stick_x; - } - } - if cont { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, - ) { - let button_on_frame = WorkModule::get_int( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, - ); - let attack_11_s_button_on_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_11_s_button_on_frame"), - ); - if attack_11_s_button_on_frame <= button_on_frame as f32 { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - // if 0 < fighter.get_int(*FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { - // if !StopModule::is_stop(fighter.module_accessor) { - // if fighter.sub_check_button_jump().get_bool() { - - // } - // } - // } - if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { - if !MotionModule::is_end(fighter.module_accessor) { - common::shoto_status::ryu_idkwhatthisis2(fighter); - } else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } else { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() - * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("walk_stick_x"), - ); - let squat_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("squat_stick_y"), - ); - - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, - ) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_LANDING // - -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) -} \ No newline at end of file diff --git a/fighters/ryu/src/status/attack.rs b/fighters/ryu/src/status/attack.rs new file mode 100644 index 0000000000..f79993231f --- /dev/null +++ b/fighters/ryu/src/status/attack.rs @@ -0,0 +1,196 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, + ) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_near_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK11, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk(fighter); + } + fighter.global_table[SUB_STATUS3] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk4(fighter, false.into()); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn ryu_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + } + if ComboModule::count(fighter.module_accessor) == 1 { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); + let attack_start_cancel_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_start_cancel_frame"), + ); + if current_frame < attack_start_cancel_frame { + if ryu_kara_cancel(fighter).get_bool() { + return 1.into(); + } + } + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter + .sub_wait_ground_check_common(false.into()) + .get_bool() + { + return 1.into(); + } + } + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("attack_11_w"), + hash40("attack_11_s"), + hash40("attack_11_near_s"), + ] + .contains(&mot) + { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, + ) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, + ) { + if ControlModule::check_button_off( + fighter.module_accessor, + *CONTROL_PAD_BUTTON_ATTACK, + ) { + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let attack_hi3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_hi3_stick_y"), + ); + let cont; + if !(stick_y < attack_hi3_stick_y) { + cont = false; + } else { + let attack_lw3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_lw3_stick_y"), + ); + if !(attack_lw3_stick_y < stick_y) { + cont = false; + } else { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let attack_s3_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_s3_stick_x"), + ); + cont = stick_x < attack_s3_stick_x; + } + } + if cont { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, + ) { + let button_on_frame = WorkModule::get_int( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, + ); + let attack_11_s_button_on_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_11_s_button_on_frame"), + ); + if attack_11_s_button_on_frame <= button_on_frame as f32 { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + // if 0 < fighter.get_int(*FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { + // if !StopModule::is_stop(fighter.module_accessor) { + // if fighter.sub_check_button_jump().get_bool() { + + // } + // } + // } + if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { + if !MotionModule::is_end(fighter.module_accessor) { + common::shoto_status::ryu_idkwhatthisis2(fighter); + } else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } else { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/dash.rs b/fighters/ryu/src/status/dash.rs new file mode 100644 index 0000000000..ba9a8a570d --- /dev/null +++ b/fighters/ryu/src/status/dash.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +// FIGHTER_RYU_STATUS_KIND_DASH_BACK + +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_end); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/finals.rs b/fighters/ryu/src/status/finals.rs index a419fd810a..8a54a4f330 100644 --- a/fighters/ryu/src/status/finals.rs +++ b/fighters/ryu/src/status/finals.rs @@ -1,10 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_STATUS_KIND_FINAL // +// FIGHTER_STATUS_KIND_FINAL -pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -35,17 +33,16 @@ pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -// FIGHTER_RYU_STATUS_KIND_FINAL2 // +// FIGHTER_RYU_STATUS_KIND_FINAL2 -pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Pre, fighter, *FIGHTER_RYU_STATUS_KIND_FINAL2)(fighter); let meter_amount = MeterModule::meter(fighter.battle_object); MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); } diff --git a/fighters/ryu/src/status/guard.rs b/fighters/ryu/src/status/guard.rs new file mode 100644 index 0000000000..1450917679 --- /dev/null +++ b/fighters/ryu/src/status/guard.rs @@ -0,0 +1,85 @@ +use super::*; + +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_main_loop) +} + +unsafe extern "C" fn guard_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_main); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/landing.rs b/fighters/ryu/src/status/landing.rs new file mode 100644 index 0000000000..89fa073464 --- /dev/null +++ b/fighters/ryu/src/status/landing.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_LANDING + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/mod.rs b/fighters/ryu/src/status/mod.rs new file mode 100644 index 0000000000..e00cb71c93 --- /dev/null +++ b/fighters/ryu/src/status/mod.rs @@ -0,0 +1,308 @@ +use super::*; +use globals::*; +// status script import + +mod attack; +mod dash; +mod wait; +mod guard; +mod landing; + +mod finals; +mod special_cmd4; +mod special_lw; +mod special_s; + +utils::import_noreturn!(common::shoto_status::{ + fgc_end_dashback, + ryu_idkwhatthisis2 +}); + +extern "Rust" { + // from common::shoto_status + fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; + fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; + fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; + fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; + fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; + fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; + fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +extern "C" { + fn status_pre_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; +} +extern "C" { + fn status_end_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// Prevents sideB from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + // resets IS_USE_EX_SPECIAL + if !fighter.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_SPECIAL_HI, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, + // *FIGHTER_STATUS_KIND_SPECIAL_N, + // *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, + // *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND, + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, + // *FIGHTER_RYU_STATUS_KIND_ATTACK_COMMAND1, + // *FIGHTER_RYU_STATUS_KIND_ATTACK_COMMAND2, + // statuses::ryu::ATTACK_COMMAND_4 + ]) { + VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_FADC); + // VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + } + + // Re-enables the ability to use sideB when connecting to ground or cliff + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); + } + + // ORIGINAL + fighter.off_flag(*FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLAG_AUTO_TURN_END_STATUS); + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr == 0.0 + || PostureModule::lr(fighter.module_accessor) == lr + || StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { + return 0.into(); + } + + unsafe fn update_lr(fighter: &mut L2CFighterCommon, lr: f32) { + PostureModule::set_lr(fighter.module_accessor, lr); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } + + if [ + *FIGHTER_STATUS_KIND_WALK, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_LANDING_LIGHT, + *FIGHTER_STATUS_KIND_GUARD_ON, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_LW3, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, + *FIGHTER_STATUS_KIND_ATTACK_LW4_START, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_ITEM_SWING, + *FIGHTER_STATUS_KIND_SPECIAL_N, + *FIGHTER_STATUS_KIND_FINAL, + *FIGHTER_RYU_STATUS_KIND_WALK_BACK, + ].contains(&fighter.global_table[globals::STATUS_KIND].get_i32()) + { + update_lr(fighter, lr); + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_WAIT { + if ![ + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + *FIGHTER_STATUS_KIND_RUN_BRAKE, + *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_GUARD_OFF, + *FIGHTER_STATUS_KIND_GUARD_DAMAGE, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE_F, + *FIGHTER_STATUS_KIND_ESCAPE_B, + *FIGHTER_STATUS_KIND_ATTACK_DASH, + *FIGHTER_STATUS_KIND_ATTACK_S3, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4, + *FIGHTER_STATUS_KIND_ATTACK_LW4, + *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_CATCH_DASH, + *FIGHTER_STATUS_KIND_CATCH_TURN, + *FIGHTER_STATUS_KIND_CATCH_CUT, + *FIGHTER_STATUS_KIND_THROW, + *FIGHTER_STATUS_KIND_CAPTURE_CUT, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DOWN_STAND, + *FIGHTER_STATUS_KIND_DOWN_STAND_FB, + *FIGHTER_STATUS_KIND_PASSIVE, + *FIGHTER_STATUS_KIND_PASSIVE_FB, + *FIGHTER_STATUS_KIND_FURAFURA_END, + *FIGHTER_STATUS_KIND_DAMAGE_SONG_END, + *FIGHTER_STATUS_KIND_CLIFF_CLIMB, + *FIGHTER_STATUS_KIND_CLIFF_ATTACK, + *FIGHTER_STATUS_KIND_CLIFF_ESCAPE, + *FIGHTER_STATUS_KIND_SLIP_STAND, + *FIGHTER_STATUS_KIND_SLIP_STAND_ATTACK, + *FIGHTER_STATUS_KIND_SLIP_STAND_F, + *FIGHTER_STATUS_KIND_SLIP_STAND_B, + *FIGHTER_STATUS_KIND_ITEM_LIGHT_PICKUP, + *FIGHTER_STATUS_KIND_ITEM_THROW, + *FIGHTER_STATUS_KIND_ITEM_THROW_DASH, + *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, + *FIGHTER_STATUS_KIND_ITEM_SWING, + *FIGHTER_STATUS_KIND_ITEM_SWING_S3, + *FIGHTER_STATUS_KIND_ITEM_SWING_S4, + *FIGHTER_STATUS_KIND_ITEM_SWING_DASH, + *FIGHTER_STATUS_KIND_APPEAL, + *FIGHTER_STATUS_KIND_SPECIAL_N + ].contains(&fighter.global_table[globals::STATUS_KIND_INTERRUPT].get_i32()) + { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_JUMP_SQUAT { + if fighter.global_table[globals::STATUS_KIND_INTERRUPT] != FIGHTER_STATUS_KIND_TURN_RUN { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ATTACK { + if fighter.global_table[globals::STATUS_KIND] != FIGHTER_STATUS_KIND_ATTACK || ComboModule::count(fighter.module_accessor) == 0 { + update_lr(fighter, lr); + } + return 0.into(); + } + + if fighter.global_table[globals::STATUS_KIND] == FIGHTER_STATUS_KIND_ITEM_THROW + && fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND + { + let cat3 = fighter.global_table[globals::CMD_CAT3].get_i32(); + if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_4 != 0 && cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_FB4 == 0 { + update_lr(fighter, lr); + } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_HI != 0 { + update_lr(fighter, lr); + } else if cat3 & *FIGHTER_PAD_CMD_CAT3_FLAG_ITEM_LIGHT_THROW_LW != 0 { + update_lr(fighter, lr); + } + } + + 0.into() +} + +/// determines the command inputs +/// I have divided these inputs into command normals (A) and command specials (B) +/// NOTE: order is important! early order has higher priority +pub unsafe extern "C" fn ryu_check_special_command(fighter: &mut L2CFighterCommon) -> L2CValue { + + let cat1 = fighter.global_table[CMD_CAT1].get_i32(); + let cat4 = fighter.global_table[CMD_CAT4].get_i32(); + let is_special = fighter.is_cat_flag(Cat1::SpecialAny); + let is_normal = fighter.is_cat_flag( + Cat1::AttackN | + Cat1::AttackHi3 | + Cat1::AttackS3 | + Cat1::AttackLw3 | + Cat1::AttackHi4 | + Cat1::AttackS4 | + Cat1::AttackLw4 + ); + + // shoryu + if is_special + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND != 0 + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND) + && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_HI_CALLBACK].clone()).get_bool() { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND.into(), true.into()); + return true.into(); + } + + // shaku + if is_special + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N2_COMMAND != 0 + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND) + && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_N_CALLBACK].clone()).get_bool() { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND.into(), true.into()); + return true.into(); + } + + // hado + if is_special + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N_COMMAND != 0 + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND) + && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_N_CALLBACK].clone()).get_bool() { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND.into(), true.into()); + return true.into(); + } + + // the supers + if is_special + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SUPER_SPECIAL_COMMAND != 0 + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND) { + if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + AttackModule::clear_all(fighter.module_accessor); + fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL); + fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_IS_DISCRETION_FINAL_USED); + fighter.change_status(FIGHTER_STATUS_KIND_FINAL.into(), true.into()); + } else if MeterModule::level(fighter.battle_object) >= MeterModule::meter_cap(fighter.battle_object) { + AttackModule::clear_all(fighter.module_accessor); + fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL); + fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_IS_DISCRETION_FINAL_USED); + fighter.change_status(FIGHTER_RYU_STATUS_KIND_FINAL2.into(), true.into()); + } + return true.into(); + } + + // tatsu + if is_special + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_S_COMMAND != 0 + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_S_COMMAND) + && fighter.sub_transition_term_id_cont_disguise(fighter.global_table[USE_SPECIAL_S_CALLBACK].clone()).get_bool() + && FighterSpecializer_Ryu::check_special_air_s_command(fighter.module_accessor) { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND.into(), true.into()); + return true.into(); + } + + // donkey kick + if is_normal + && cat4 & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_N2_COMMAND != 0 + && fighter.is_situation(*SITUATION_KIND_GROUND) + && !fighter.is_in_hitlag() + && WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND) { + fighter.change_status(statuses::ryu::ATTACK_COMMAND_4.into(), true.into()); + return true.into(); + } + + false.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ryu_check_special_command as *const () as _)); + VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack::install(agent); + dash::install(agent); + wait::install(agent); + guard::install(agent); + landing::install(agent); + + finals::install(agent); + special_cmd4::install(agent); + special_lw::install(agent); + special_s::install(agent); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/special_cmd4.rs b/fighters/ryu/src/status/special_cmd4.rs index 9972656e41..ecf6c40bc3 100644 --- a/fighters/ryu/src/status/special_cmd4.rs +++ b/fighters/ryu/src/status/special_cmd4.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn ryu_attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// statuses::ryu::ATTACK_COMMAND_4 + +pub unsafe extern "C" fn attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -30,7 +30,7 @@ pub unsafe extern "C" fn ryu_attack_command_4_pre(fighter: &mut L2CFighterCommon 0.into() } -pub unsafe extern "C" fn ryu_attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_command4"), 0.0, 1.0, false, 0.0, false, false); WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_KIND_ATTACK_COMMAND2, *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND); // fighter.clear_lua_stack(); @@ -40,10 +40,10 @@ pub unsafe extern "C" fn ryu_attack_command_4_main(fighter: &mut L2CFighterCommo // app::sv_kinetic_energy::set_chara_dir(fighter.lua_state_agent); fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_RELEASE_BUTTON); fighter.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); - fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_command_4_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_command_4_main_loop as *const () as _)) } -pub unsafe extern "C" fn ryu_attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 1.into(); @@ -79,9 +79,7 @@ pub unsafe extern "C" fn ryu_attack_command_4_main_loop(fighter: &mut L2CFighter 0.into() } -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_pre) - .status(Main, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ryu::ATTACK_COMMAND_4, attack_command_4_pre); + agent.status(Main, statuses::ryu::ATTACK_COMMAND_4, attack_command_4_main); } diff --git a/fighters/ryu/src/status/special_lw.rs b/fighters/ryu/src/status/special_lw.rs index 743535ba65..20627c9913 100644 --- a/fighters/ryu/src/status/special_lw.rs +++ b/fighters/ryu/src/status/special_lw.rs @@ -1,14 +1,6 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, statuses::ryu::INSTALL, special_lw_install_pre) - .status(Main, statuses::ryu::INSTALL, special_lw_install_main) - .status(End, statuses::ryu::INSTALL, special_lw_install_end) - .install(); -} +// statuses::ryu::INSTALL unsafe extern "C" fn special_lw_install_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -77,7 +69,7 @@ unsafe extern "C" fn special_lw_install_main_loop(fighter: &mut L2CFighterCommon } if fighter.is_situation(*SITUATION_KIND_AIR) { // TODO: replace these with actual params - let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut FighterKineticEnergyGravity; + let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; smash::app::lua_bind::FighterKineticEnergyGravity::set_accel(fighter_gravity, -0.03); smash::app::lua_bind::FighterKineticEnergyGravity::set_stable_speed(fighter_gravity, -1.6); } @@ -118,4 +110,10 @@ unsafe extern "C" fn special_lw_install_set_kinetic(fighter: &mut L2CFighterComm ); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ryu::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ryu::INSTALL, special_lw_install_main); + agent.status(End, statuses::ryu::INSTALL, special_lw_install_end); } \ No newline at end of file diff --git a/fighters/ryu/src/status/special_s.rs b/fighters/ryu/src/status/special_s.rs index 3b11dcdde2..d1d0209918 100644 --- a/fighters/ryu/src/status/special_s.rs +++ b/fighters/ryu/src/status/special_s.rs @@ -1,46 +1,34 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP -pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_loop_init(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP)(fighter) } -pub fn install() { - smashline::Agent::new("ryu") - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - init_special_s_command, - ) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - init_special_s_loop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_init); } diff --git a/fighters/ryu/src/status/wait.rs b/fighters/ryu/src/status/wait.rs new file mode 100644 index 0000000000..8a041c2997 --- /dev/null +++ b/fighters/ryu/src/status/wait.rs @@ -0,0 +1,60 @@ +use super::*; + +// FIGHTER_STATUS_KIND_WAIT + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() + * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("walk_stick_x"), + ); + let squat_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("squat_stick_y"), + ); + + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, + ) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + //agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file diff --git a/fighters/samus/src/acmd/aerials.rs b/fighters/samus/src/acmd/aerials.rs index 85607b2ce3..78c9a7b192 100644 --- a/fighters/samus/src/acmd/aerials.rs +++ b/fighters/samus/src/acmd/aerials.rs @@ -1,323 +1,317 @@ - use super::*; -unsafe extern "C" fn attack_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.599); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.599); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 361, 100, 0, 10, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 100, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 10, 3.5, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 361, 100, 0, 10, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 100, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 10, 3.5, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(42.0-34.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(42.0-34.0)); AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5.0, -4.4, -8, -5, 9, 1.15, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5.0, -4.4, -8, -5, 9, 1.15, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.4, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.4, true, 1.0); } - } -unsafe extern "C" fn attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_swing_l")); - PLAY_SE(fighter, Hash40::new("se_samus_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_swing_l")); + PLAY_SE(agent, Hash40::new("se_samus_swing_m")); } - } -unsafe extern "C" fn attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn attack_air_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 365, 100, 35, 0, 6.5, 10.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 18, 100, 30, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 18, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 365, 100, 35, 0, 6.5, 10.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 18, 100, 30, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 18, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..3 { wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 1.8, 365, 100, 45, 0, 6.5, 10.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 1.8, 18, 100, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 1.8, 18, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 1.8, 365, 100, 45, 0, 6.5, 10.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 1.8, 18, 100, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 1.8, 18, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 7.0, 10.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 4.5, 3.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 7.0, 10.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 4.5, 3.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 361, 150, 0, 40, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samus_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 12.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 12.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.0, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.0, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("armr"), 15.5, -0.341, -0.169, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn attack_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 10.0, 361, 100, 0, 30, 5.0, 4.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 40, 100, 0, 32, 4.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 10.0, 361, 100, 0, 30, 5.0, 4.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 40, 100, 0, 32, 4.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(23.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(23.0-13.0)); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(36.0-23.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(36.0-23.0)); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7, -19, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7, -19, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn attack_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 367, 33, 0, 48, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 84, 33, 0, 48, 6.5, -1.0, 1.0, 2.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 367, 33, 0, 48, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 84, 33, 0, 48, 6.5, -1.0, 1.0, 2.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 2.0, 367, 33, 0, 49, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 84, 33, 0, 49, 6.5, -1.0, 1.0, 2.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); + ATTACK(agent, 0, 0, Hash40::new("toer"), 2.0, 367, 33, 0, 49, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 84, 33, 0, 49, 6.5, -1.0, 1.0, 2.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 4.0, 80, 196, 0, 40, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 80, 196, 0, 40, 6.5, -1.0, 1.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("toer"), 4.0, 80, 196, 0, 40, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 80, 196, 0, 40, 6.5, -1.0, 1.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { //FT_MOTION_RATE(fighter, 0.750); - FT_MOTION_RATE(fighter, 12.0/(17.0-1.0)); + FT_MOTION_RATE(agent, 12.0/(17.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 270, 85, 0, 25, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 270, 85, 0, 25, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 270, 85, 0, 25, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 270, 85, 0, 25, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 270, 47, 0, 25, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 16.0, 270, 47, 0, 25, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 270, 47, 0, 25, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 16.0, 270, 47, 0, 25, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samus_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samus_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samus_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } -unsafe extern "C" fn samus_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/20.0); +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/20.0); } - } -pub fn install() { - smashline::Agent::new("samus") - .acmd("game_attackairn", attack_air_n) - .acmd("effect_attackairn", attack_air_n_effect) - .acmd("sound_attackairn", attack_air_n_sound) - .acmd("expression_attackairn", attack_air_n_expression) - .acmd("game_attackairf", attack_air_f) - .acmd("effect_attackairf", samus_attack_air_f_effect) - .acmd("game_attackairb", attack_air_b) - .acmd("effect_attackairb", effect_air_b) - .acmd("game_attackairhi", attack_air_hi) - .acmd("game_attackairlw", attack_air_lw) - .acmd("effect_attackairlw", samus_attack_air_lw_effect) - .acmd("game_aircatchlanding", samus_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samus/src/acmd/ground.rs b/fighters/samus/src/acmd/ground.rs index d88c8b6e69..ec6d882edd 100644 --- a/fighters/samus/src/acmd/ground.rs +++ b/fighters/samus/src/acmd/ground.rs @@ -1,168 +1,163 @@ - use super::*; -unsafe extern "C" fn attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 13.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + } +} + +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, 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(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9.5, 2, 0, 0, 0, 0.95, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); + } +} + +unsafe extern "C" fn expression_attack12(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); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } frame(lua_state, 6.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } +} + +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); + frame(lua_state, 6.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED); if (ControlModule::get_stick_y(boma) < -0.5) { - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_READY) { - VarModule::off_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_READY); - VarModule::on_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_READY) { + VarModule::off_flag(agent.battle_object, vars::samus::instance::SHINESPARK_READY); + VarModule::on_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED); MotionModule::set_rate(boma, 0.25); } } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { MotionModule::set_rate(boma, 0.5); let addSpeed1 = Vector3f { x: 1.6, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 110, 0, 70, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 110, 0, 70, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } - } + } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 5.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 115, 0, 75, 5.3, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(4.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 13.0, 361, 115, 0, 75, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 361, 115, 0, 75, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 5.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 115, 0, 75, 5.3, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(4.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 13.0, 361, 115, 0, 75, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 361, 115, 0, 75, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 55, 80, 0, 76, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 120, 0, 80, 4.0, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(5.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 361, 120, 0, 80, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 361, 120, 0, 80, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 55, 80, 0, 76, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 120, 0, 80, 4.0, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(5.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 361, 120, 0, 80, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 361, 120, 0, 80, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(34.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 21.0/(34.0-17.0)); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { let subSpeed1 = Vector3f { x: -1.6, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &subSpeed1); MotionModule::set_rate(boma, 0.25); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { MotionModule::set_rate(boma, 1.0); } } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_attackdash")); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - PLAY_SE(fighter, Hash40::new("se_samus_catch")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_attackdash")); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + PLAY_SE(agent, Hash40::new("se_samus_catch")); + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); } } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_step_right_m")); } - -} - -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); - } - } -unsafe extern "C" fn samus_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, 9.5, 2, 0, 0, 0, 0.95, true); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); - } -} - -unsafe extern "C" fn samus_attack_12_expression(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); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("expression_attack12", expression_attack12); -pub fn install() { - smashline::Agent::new("samus") - .acmd("game_attackdash", attack_dash) - .acmd("sound_attackdash", attack_dash_sound) - .acmd("game_attack11", attack_11) - .acmd("effect_attack11", samus_attack_11_effect) - .acmd("expression_attack12", samus_attack_12_expression) - .install(); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/samus/src/acmd/mod.rs b/fighters/samus/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/samus/src/acmd/mod.rs +++ b/fighters/samus/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/samus/src/acmd/other.rs b/fighters/samus/src/acmd/other.rs index 778d814eb3..e21008276e 100644 --- a/fighters/samus/src/acmd/other.rs +++ b/fighters/samus/src/acmd/other.rs @@ -1,131 +1,67 @@ - use super::*; -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_samus_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_samus_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_samus_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_samus_step_right_m")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_samus_step_left_m")) + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_samus_step_left_m")) } } -unsafe extern "C" fn samus_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, 11.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 samus_supermissile_ready_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"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - -} - -unsafe extern "C" fn samus_supermissile_straight_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"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn samus_cshot_shoot_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"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 40, 64, 0, 45, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } - -} - -unsafe extern "C" fn samus_cshot_shoot_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n02")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n03")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n04")); - } - else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n05")); - } - } - } -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("samus_supermissile") - .acmd("game_ready", samus_supermissile_ready_game) - .acmd("game_straight", samus_supermissile_straight_game) - .install(); - smashline::Agent::new("samus_cshot") - .acmd("game_shoot", samus_cshot_shoot_game) - .acmd("sound_shoot", samus_cshot_shoot_sound) - .install(); - smashline::Agent::new("samus") - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", samus_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_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samus/src/acmd/smashes.rs b/fighters/samus/src/acmd/smashes.rs index 47799144b0..a48b7c7c25 100644 --- a/fighters/samus/src/acmd/smashes.rs +++ b/fighters/samus/src/acmd/smashes.rs @@ -1,88 +1,84 @@ - use super::*; -unsafe extern "C" fn attack_s4_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_s4_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_s4_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 368, 70, 100, 0, 4.0, 0.0, 3.5, 8.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 368, 70, 100, 0, 4.0, 0.0, 3.5, -5.5, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 368, 70, 100, 0, 4.0, 0.0, 3.5, 8.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 368, 70, 100, 0, 4.0, 0.0, 3.5, -5.5, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); let hit1 = Vector2f { x: 0.0, y: 19.0 }; @@ -90,96 +86,95 @@ unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(25.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(25.0-15.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 90, 115, 0, 50, 8.0, 0.0, 28.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 90, 115, 0, 50, 8.0, 0.0, 28.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub unsafe extern "C" fn attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +pub unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 0, -90, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 0, -90, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 7.5, -0.341439992, -0.169369996, 0, 0, 0, 1.25, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 7.5, -0.341439992, -0.169369996, 0, 0, 0, 1.25, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 25.0); - if is_excute(fighter){ - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("samus_atk_bomb"), Hash40::new("top"), 0.0, 28.0, 1.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent){ + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("samus_atk_bomb"), Hash40::new("top"), 0.0, 28.0, 1.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } -pub unsafe extern "C" fn attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +pub unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter){ - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("se_samus_swing_l")); + if is_excute(agent){ + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("se_samus_swing_l")); } frame(lua_state, 28.0); - if is_excute(fighter){ - PLAY_SE(fighter, Hash40::new("se_samus_smash_h02")); + if is_excute(agent){ + PLAY_SE(agent, Hash40::new("se_samus_smash_h02")); } } -unsafe extern "C" fn attack_lw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 120, 87, 0, 50, 4.2, 8.0, -0.5, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 120, 87, 0, 50, 4.2, 8.0, -0.5, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 120, 87, 0, 50, 4.6, 8.0, -0.5, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 120, 87, 0, 50, 4.6, 8.0, -0.5, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("samus") - .acmd("game_attacks4hi", attack_s4_hi) - .acmd("game_attacks4", attack_s4_s) - .acmd("game_attacks4lw", attack_s4_lw) - .acmd("game_attackhi4", attack_hi4) - .acmd("effect_attackhi4", attack_hi4_effect) - .acmd("sound_attackhi4", attack_hi4_sound) - .acmd("game_attacklw4", attack_lw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/samus/src/acmd/specials.rs b/fighters/samus/src/acmd/specials.rs index 6df53891c4..a1b4919d6b 100644 --- a/fighters/samus/src/acmd/specials.rs +++ b/fighters/samus/src/acmd/specials.rs @@ -1,108 +1,103 @@ - use super::*; -unsafe extern "C" fn special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_ACC_X); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUS_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUS_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn special_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUS_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 70, 250, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUS_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 70, 250, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUS_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -pub fn install() { - smashline::Agent::new("samus") - .acmd("game_specialhi", special_hi) - .acmd("game_specialairhi", special_air_hi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/samus/src/acmd/throws.rs b/fighters/samus/src/acmd/throws.rs index b5fed80640..2aac452182 100644 --- a/fighters/samus/src/acmd/throws.rs +++ b/fighters/samus/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn samus_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -32,7 +31,7 @@ unsafe extern "C" fn samus_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -63,7 +62,7 @@ unsafe extern "C" fn samus_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -94,31 +93,29 @@ unsafe extern "C" fn samus_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 50, 100, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 50, 100, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 25, 15); + CHECK_FINISH_CAMERA(agent, 25, 15); } frame(lua_state, 12.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("samus") - //.acmd("game_catch", samus_catch_game) - //.acmd("game_catchdash", samus_catch_dash_game) - //.acmd("game_catchturn", samus_catch_turn_game) - .acmd("game_throwb", game_throwb) - .install(); +pub fn install(agent: &mut Agent) { + //agent.acmd("game_catch", game_catch); + //agent.acmd("game_catchdash", game_catchdash); + //agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/samus/src/acmd/tilts.rs b/fighters/samus/src/acmd/tilts.rs index 2586c66a9c..bcd39da36f 100644 --- a/fighters/samus/src/acmd/tilts.rs +++ b/fighters/samus/src/acmd/tilts.rs @@ -1,219 +1,213 @@ - use super::*; -unsafe extern "C" fn attack_s3_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.67); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.67); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -3, 13.5, 14.5, 32, 6, -192, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 14, 2, 5, 165, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn attack_s3_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.67); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.67); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 14, 2, 5, 165, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -3, 13.5, 14.5, 32, 6, -192, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn attack_s3_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.67); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.67); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 11, -15, 0, 195, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 11, -15, 0, 195, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn attack_hi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 270, 100, 0, 40, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 270, 100, 0, 40, 5.8, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 107, 0, 40, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 13.0, 361, 107, 0, 40, 5.8, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 270, 100, 0, 40, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 270, 100, 0, 40, 5.8, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 107, 0, 40, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 13.0, 361, 107, 0, 40, 5.8, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 11, -5, 1.7, -39, -92, 1.65, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 11, -5, 1.7, -39, -92, 1.65, true); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn attack_lw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 100, 77, 0, 80, 8.7, 0.0, 2.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 100, 77, 0, 80, 8.7, 0.0, 2.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("samus") - .acmd("game_attacks3hi", attack_s3_hi) - .acmd("effect_attacks3hi", effect_attacks3hi) - .acmd("game_attacks3", attack_s3_s) - .acmd("effect_attacks3", effect_attacks3s) - .acmd("game_attacks3lw", attack_s3_lw) - .acmd("effect_attacks3lw", effect_attacks3lw) - .acmd("game_attackhi3", attack_hi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", attack_lw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samus/src/cshot/acmd.rs b/fighters/samus/src/cshot/acmd.rs new file mode 100644 index 0000000000..826eea6635 --- /dev/null +++ b/fighters/samus/src/cshot/acmd.rs @@ -0,0 +1,36 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 40, 64, 0, 45, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } +} + +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n02")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n03")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} diff --git a/fighters/samus/src/cshot/mod.rs b/fighters/samus/src/cshot/mod.rs new file mode 100644 index 0000000000..4959015065 --- /dev/null +++ b/fighters/samus/src/cshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samus_cshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samus/src/lib.rs b/fighters/samus/src/lib.rs index 7bcc1676ad..57a0dad032 100644 --- a/fighters/samus/src/lib.rs +++ b/fighters/samus/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod cshot; +mod supermissile; use smash::{ lib::{ @@ -37,8 +42,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("samus"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + cshot::install(); + supermissile::install(); } diff --git a/fighters/samus/src/opff.rs b/fighters/samus/src/opff.rs index daa65ab176..1786683063 100644 --- a/fighters/samus/src/opff.rs +++ b/fighters/samus/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - pub unsafe fn missile_land_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32) { if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_SAMUS_STATUS_KIND_SPECIAL_S1G, @@ -138,8 +137,7 @@ pub unsafe fn samus_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("samus") - .on_line(Main, samus_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, samus_frame_wrapper); } diff --git a/fighters/samus/src/supermissile/acmd.rs b/fighters/samus/src/supermissile/acmd.rs new file mode 100644 index 0000000000..7acd29f91b --- /dev/null +++ b/fighters/samus/src/supermissile/acmd.rs @@ -0,0 +1,23 @@ +use super::*; + +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + agent.acmd("game_straight", game_straight); +} diff --git a/fighters/samus/src/supermissile/mod.rs b/fighters/samus/src/supermissile/mod.rs new file mode 100644 index 0000000000..43ff7f15e0 --- /dev/null +++ b/fighters/samus/src/supermissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samus_supermissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/acmd/aerials.rs b/fighters/samusd/src/acmd/aerials.rs index 45e0a329f4..afdf643852 100644 --- a/fighters/samusd/src/acmd/aerials.rs +++ b/fighters/samusd/src/acmd/aerials.rs @@ -1,517 +1,466 @@ use super::*; -unsafe extern "C" fn samusd_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.4, 48, 78, 0, 52, 10.5, 0.0, 9.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.4, 48, 78, 0, 52, 10.5, 0.0, 9.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BODY); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samusd_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - BURN_COLOR(fighter, 0.699999988, 0.200000003, 1.0, 0.699999988); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 0.23, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR(agent, 0.699999988, 0.200000003, 1.0, 0.699999988); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 0.23, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.699999988, 0.200000003, 1.0, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.699999988, 0.200000003, 1.0, 0); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 3.5, -6.1, 0, 0, 0, 0.17, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 3.5, -6.1, 0, 0, 0, 0.17, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.699999988, 1.0, 0.5); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + FLASH(agent, 1, 0.699999988, 1.0, 0.5); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 1, 0.699999988, 1.0, 0); - COL_NORMAL(fighter); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 8.4, 0.2, 0, 0, 0, 0.32, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + FLASH_FRM(agent, 1, 1, 0.699999988, 1.0, 0); + COL_NORMAL(agent); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 8.4, 0.2, 0, 0, 0, 0.32, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 0.699999988, 0.200000003, 1.0, 0.699999988); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + BURN_COLOR(agent, 0.699999988, 0.200000003, 1.0, 0.699999988); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + LAST_EFFECT_SET_RATE(agent, 1); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.699999988, 0.200000003, 1.0, 0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.2, 5.6, 0, 0, 0, 0.2, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.699999988, 0.200000003, 1.0, 0); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.2, 5.6, 0, 0, 0, 0.2, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.699999988, 1.0, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 16.3, -6.1, 0, 0, 0, 0.15, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + FLASH(agent, 1, 0.699999988, 1.0, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 16.3, -6.1, 0, 0, 0, 0.15, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 1, 0.699999988, 1.0, 0); - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + FLASH_FRM(agent, 1, 1, 0.699999988, 1.0, 0); + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_OFF_KIND(fighter, Hash40::new("samusd_win3_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_OFF_KIND(agent, Hash40::new("samusd_win3_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } - } -unsafe extern "C" fn samusd_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..2 { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 5.0); } - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } - } -unsafe extern "C" fn samusd_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 34.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn samusd_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 15.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 11.0, 15.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0);//34 faf - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0);//34 faf + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn samusd_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_m")); } - } -unsafe extern "C" fn samusd_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 38, 90, 0, 44, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 38, 90, 0, 44, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 38, 90, 0, 44, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 38, 90, 0, 44, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 38, 90, 0, 44, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 38, 90, 0, 44, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 32.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 32.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samusd_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8, -15, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8, -15, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn samusd_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.66); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.66); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 6.0/(18.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 75, 101, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 75, 101, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 75, 101, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 6.0/(18.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 75, 101, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 75, 101, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 75, 101, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samusd_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } 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); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -unsafe extern "C" fn samusd_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_s")); } } -unsafe extern "C" fn samusd_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(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) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.562); + FT_MOTION_RATE(agent, 0.562); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn samusd_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } 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); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.1); } - } -unsafe extern "C" fn samusd_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 4.0, 45, 30, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 45, 30, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("throw"), 4.0, 45, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, 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_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("throw"), 4.0, 45, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, 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_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/27.0); +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/27.0); } - } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attackairn", samusd_attack_air_n_game) - .acmd("effect_attackairn", samusd_attack_air_n_effect) - .acmd("sound_attackairn", samusd_attack_air_n_sound) - .acmd("expression_attackairn", samusd_attack_air_n_expression) - .acmd("game_attackairf", samusd_attack_air_f_game) - .acmd("effect_attackairf", samusd_attack_air_f_effect) - .acmd("sound_attackairf", samusd_attack_air_f_sound) - .acmd("expression_attackairf", samusd_attack_air_f_expression) - .acmd("game_attackairb", samusd_attack_air_b_game) - .acmd("effect_attackairb", samusd_attack_air_b_effect) - .acmd("game_attackairhi", samusd_attack_air_hi_game) - .acmd("effect_attackairhi", samusd_attack_air_hi_effect) - .acmd("sound_attackairhi", samusd_attack_air_hi_sound) - .acmd("expression_attackairhi", samusd_attack_air_hi_expression) - .acmd("game_attackairlw", samusd_attack_air_lw_game) - .acmd("effect_attackairlw", samusd_attack_air_lw_effect) - .acmd("game_aircatch", samusd_air_catch_game) - .acmd("game_aircatchlanding", samusd_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samusd/src/acmd/ground.rs b/fighters/samusd/src/acmd/ground.rs index 617194d17f..defd2c9756 100644 --- a/fighters/samusd/src/acmd/ground.rs +++ b/fighters/samusd/src/acmd/ground.rs @@ -1,159 +1,114 @@ use super::*; -unsafe extern "C" fn samusd_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 60, 38, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 60, 38, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -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(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn samusd_attack_12_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); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } 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); - 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 12, 3, -17, -22, -81, 1.25, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -unsafe extern "C" fn samusd_attack_12_expression(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_attack12(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); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 58, 90, 0, 80, 5.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 58, 90, 0, 80, 5.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 58, 90, 0, 80, 5.0, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 58, 90, 0, 80, 5.0, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 37.0, 20.0);//40 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 37.0, 20.0);//40 + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn samusd_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.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, 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); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_dash_attack"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -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) - .acmd("game_attackdash", samusd_attack_dash_game) - .acmd("effect_attackdash", samusd_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/samusd/src/acmd/mod.rs b/fighters/samusd/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/samusd/src/acmd/mod.rs +++ b/fighters/samusd/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/samusd/src/acmd/other.rs b/fighters/samusd/src/acmd/other.rs index a1205baf78..1e29d29547 100644 --- a/fighters/samusd/src/acmd/other.rs +++ b/fighters/samusd/src/acmd/other.rs @@ -1,428 +1,73 @@ use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_samusd_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_samusd_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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, 16.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 samusd_cshot_shoot_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"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 40, 72, 0, 50, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } - -} - -unsafe extern "C" fn samusd_cshot_shoot_sound (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n02")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n03")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n04")); - } - else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n05")); - } - } - -} - -unsafe extern "C" fn samusd_homing_missile_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"), 7.0, 0, 25, 0, 26, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 60, 47, 0, 28, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn samusd_homing_missile_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 2.0, 0.5, 0.5); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("samusd_missile_homing"), false, true); - } -} - -unsafe extern "C" fn samusd_super_missile_ready_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"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn samusd_super_missile_straight_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"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } -} - -// #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] -// unsafe fn samusd_super_missile_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"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); -// ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0x50000000 /* default value */); -// } -// wait(lua_state, 1.0); -// if is_excute(fighter) { -// ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0x50000000 /* default value */); -// notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); -// } -// } - -unsafe extern "C" fn samusd_bomb_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 45, 0, 22, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 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_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn samusd_bomb_burst_attack_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"), 5.0, 90, 90, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 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_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD(fighter, 0, 0.5, 0.02, 1000, 1, 0, 0, 16); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - wait(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } } -unsafe extern "C" fn samusd_bomb_burst_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_hit_purple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("samusd_entry"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 77.0/12.0); - } -} - -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); - } -} - -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); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -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) - .acmd("sound_shoot", samusd_cshot_shoot_sound) - .install(); - smashline::Agent::new("samusd_missile") - .acmd("game_homing", samusd_homing_missile_game) - .acmd("effect_homing", samusd_homing_missile_effect) - .install(); - smashline::Agent::new("samusd_bomb") - .acmd("game_fall", samusd_bomb_fall_game) - .acmd("game_burstattack", samusd_bomb_burst_attack_game) - .acmd("effect_burstattack", samusd_bomb_burst_attack_effect) - .install(); - smashline::Agent::new("samusd_supermissile") - .acmd("game_ready", samusd_super_missile_ready_game) - .acmd("game_straight", samusd_super_missile_straight_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samusd/src/acmd/smashes.rs b/fighters/samusd/src/acmd/smashes.rs index 76991e4b80..29f2bebe87 100644 --- a/fighters/samusd/src/acmd/smashes.rs +++ b/fighters/samusd/src/acmd/smashes.rs @@ -1,102 +1,99 @@ use super::*; -unsafe extern "C" fn samusd_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn samusd_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn samusd_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn samusd_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 18.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 15.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); + FT_MOTION_RATE_RANGE(agent, 11.0, 18.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 15.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 30.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); + FT_MOTION_RATE_RANGE(agent, 18.0, 30.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_BOMB); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -126,140 +123,137 @@ unsafe extern "C" fn samusd_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 70, 93, 0, 42, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(10.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 70, 93, 0, 42, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(10.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.333); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.333); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn samusd_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.65, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.65, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.75, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.65, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.65, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.75, true); } - } -unsafe extern "C" fn samusd_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_l")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_special_n04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_special_n04")); } - } -unsafe extern "C" fn samusd_attack_lw4_expression(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_attacklw4(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); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_beamm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 20); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 20); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attacks4hi", samusd_attack_s4_hi_game) - .acmd("game_attacks4", samusd_attack_s4_game) - .acmd("game_attacks4lw", samusd_attack_s4_lw_game) - .acmd("game_attackhi4", samusd_attack_hi4_game) - .acmd("effect_attackhi4", samusd_attack_hi4_effect) - .acmd("game_attacklw4", samusd_attack_lw4_game) - .acmd("effect_attacklw4", samusd_attack_lw4_effect) - .acmd("sound_attacklw4", samusd_attack_lw4_sound) - .acmd("expression_attacklw4", samusd_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/samusd/src/acmd/specials.rs b/fighters/samusd/src/acmd/specials.rs index 2ae1cf22eb..c23594c3aa 100644 --- a/fighters/samusd/src/acmd/specials.rs +++ b/fighters/samusd/src/acmd/specials.rs @@ -1,195 +1,189 @@ use super::*; -// #[acmd_script( agent = "samusd", script = "game_specials" , category = ACMD_GAME , low_priority)] -// unsafe fn game_specials(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_specials(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 21.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 3.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 3.0); // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_WEAPON); // } // frame(lua_state, 22.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 1.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 1.0); // } // } -// #[acmd_script( agent = "samusd", script = "game_specialairs" , category = ACMD_GAME , low_priority)] -// unsafe fn game_specialairs(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_specialairs(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 21.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_WEAPON); // } // frame(lua_state, 30.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 2.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 2.0); // } // frame(lua_state, 35.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 1.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 1.0); // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_AIR_CONTROL); // } // } -unsafe extern "C" fn samusd_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_ACC_X); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 189, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 189, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn samusd_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 170, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 170, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn samusd_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(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) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_WEAPON); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_sphere") as i64); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_CHK_CROUCH); } - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } -unsafe extern "C" fn samusd_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_WEAPON); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_sphere") as i64); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } - } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_specialhi", samusd_special_hi_game) - .acmd("game_specialairhi", samusd_special_air_hi_game) - .acmd("game_speciallw", samusd_special_lw_game) - .acmd("game_specialairlw", samusd_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/samusd/src/acmd/throws.rs b/fighters/samusd/src/acmd/throws.rs index bf309447e8..b6695d200d 100644 --- a/fighters/samusd/src/acmd/throws.rs +++ b/fighters/samusd/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn samusd_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -31,7 +31,7 @@ unsafe extern "C" fn samusd_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -62,7 +62,7 @@ unsafe extern "C" fn samusd_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -93,79 +93,79 @@ unsafe extern "C" fn samusd_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 42, 90, 0, 44, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 42, 90, 0, 44, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 28, 16); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 28, 16); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn samusd_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 108, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 108, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 100, 0, 10, 6.5, 0.0, 23.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 100, 0, 10, 6.5, 0.0, 23.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 32); + CHECK_FINISH_CAMERA(agent, 1, 32); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 0.85); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.85); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_INSTANCE_WORK_ID_FLAG_ARTICLE_MOTION_RATE_SYNC); } } -pub fn install() { - smashline::Agent::new("samusd") - //.acmd("game_catch", samusd_catch_game) - //.acmd("game_catchdash", samusd_catch_dash_game) - //.acmd("game_catchturn", samusd_catch_turn_game) - .acmd("game_throwf", samusd_throw_f_game) - .acmd("game_throwhi", samusd_throw_hi_game) - .acmd("game_throwlw", samusd_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + //agent.acmd("game_catch", game_catch); + //agent.acmd("game_catchdash", game_catchdash); + //agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/samusd/src/acmd/tilts.rs b/fighters/samusd/src/acmd/tilts.rs index dbca837f37..2c239a4cc2 100644 --- a/fighters/samusd/src/acmd/tilts.rs +++ b/fighters/samusd/src/acmd/tilts.rs @@ -1,106 +1,93 @@ use super::*; -unsafe extern "C" fn samusd_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn samusd_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 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); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn samusd_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn samusd_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 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 @@ -112,239 +99,203 @@ unsafe extern "C" fn samusd_attack_s3_effect(fighter: &mut L2CAgentBase) { 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); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 1.0); } } -unsafe extern "C" fn samusd_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn samusd_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 6, -15, 0, 195, 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); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 6, -15, 0, 195, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } } -unsafe extern "C" fn samusd_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); //ground only pop up hitbox, f7 frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.5, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.5, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } //the rest of the first kick, f8-10 frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 22.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 18.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 22.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 18.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 16.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 16.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } //second kick (early strong hit), f12-16 //the extra frames are to adjust for z axis alginment issues on the animation frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - //ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + //ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } //second kick (late weak hit), f17-18 frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 5.0, 9.0, 0.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 4.5, 5.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 3.5, 0.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 5.0, 9.0, 0.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 4.5, 5.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 3.5, 0.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_s")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_l")); } - } -unsafe extern "C" fn samusd_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 17, 0, 10, 30, 90, 1.3, 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 17, 0, 10, 30, 90, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 17, 0, 25, 100, 100, 1.3, 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); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 17, 0, 25, 100, 100, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) } } -unsafe extern "C" fn samusd_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 80, 65, 0, 70, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 80, 65, 0, 70, 7.2, 0.0, 1.6, 14.4, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 80, 65, 0, 70, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 80, 65, 0, 70, 7.2, 0.0, 1.6, 14.4, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 36.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 36.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attacks3hi", samusd_attack_s3_hi_game) - .acmd("effect_attacks3hi", samusd_attack_s3_hi_effect) - .acmd("game_attacks3", samusd_attack_s3_game) - .acmd("effect_attacks3", samusd_attack_s3_effect) - .acmd("game_attacks3lw", samusd_attack_s3_lw_game) - .acmd("effect_attacks3lw", samusd_attack_s3_lw_effect) - .acmd("game_attackhi3", samusd_attack_hi3_game) - .acmd("sound_attackhi3", samusd_attack_hi3_sound) - .acmd("effect_attackhi3", samusd_attack_hi3_effect) - .acmd("expression_attackhi3", samusd_attack_hi3_expression) - .acmd("game_attacklw3", samusd_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samusd/src/bomb/acmd.rs b/fighters/samusd/src/bomb/acmd.rs new file mode 100644 index 0000000000..d2672519c3 --- /dev/null +++ b/fighters/samusd/src/bomb/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 45, 0, 22, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 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_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_burstattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 90, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 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_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AREA_WIND_2ND_RAD(agent, 0, 0.5, 0.02, 1000, 1, 0, 0, 16); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + wait(lua_state, 11.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_burstattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_hit_purple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("samusd_entry"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 77.0/12.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); + + agent.acmd("game_burstattack", game_burstattack); + agent.acmd("effect_burstattack", effect_burstattack); +} diff --git a/fighters/samusd/src/bomb/mod.rs b/fighters/samusd/src/bomb/mod.rs new file mode 100644 index 0000000000..a87453c647 --- /dev/null +++ b/fighters/samusd/src/bomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_bomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/cshot/acmd.rs b/fighters/samusd/src/cshot/acmd.rs new file mode 100644 index 0000000000..4baaa2a47d --- /dev/null +++ b/fighters/samusd/src/cshot/acmd.rs @@ -0,0 +1,36 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 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_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 40, 72, 0, 50, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } +} + +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n02")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n03")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n05")); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} diff --git a/fighters/samusd/src/cshot/mod.rs b/fighters/samusd/src/cshot/mod.rs new file mode 100644 index 0000000000..0722129296 --- /dev/null +++ b/fighters/samusd/src/cshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_cshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/lib.rs b/fighters/samusd/src/lib.rs index 1ad1fd8b2b..ec0e0ba9d9 100644 --- a/fighters/samusd/src/lib.rs +++ b/fighters/samusd/src/lib.rs @@ -3,8 +3,16 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +mod bomb; +mod cshot; +mod missile; +mod supermissile; use smash::{ lib::{ @@ -36,9 +44,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("samusd"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bomb::install(); + cshot::install(); + missile::install(); + supermissile::install(); } diff --git a/fighters/samusd/src/missile/acmd.rs b/fighters/samusd/src/missile/acmd.rs new file mode 100644 index 0000000000..aaac54bc8c --- /dev/null +++ b/fighters/samusd/src/missile/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_homing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 0, 25, 0, 26, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 40.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 47, 0, 28, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn effect_homing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.5, 0.5); + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("samusd_missile_homing"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_homing", game_homing); + agent.acmd("effect_homing", effect_homing); +} diff --git a/fighters/samusd/src/missile/mod.rs b/fighters/samusd/src/missile/mod.rs new file mode 100644 index 0000000000..e5c579352a --- /dev/null +++ b/fighters/samusd/src/missile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_missile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/opff.rs b/fighters/samusd/src/opff.rs index 66d257ed26..c4b3877eff 100644 --- a/fighters/samusd/src/opff.rs +++ b/fighters/samusd/src/opff.rs @@ -132,8 +132,6 @@ pub unsafe fn samusd_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { // } // } -pub fn install() { - smashline::Agent::new("samusd") - .on_line(Main, samusd_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, samusd_frame_wrapper); } diff --git a/fighters/samusd/src/status/attack_air.rs b/fighters/samusd/src/status/attack_air.rs index 32dcfe1b04..af87f63993 100644 --- a/fighters/samusd/src/status/attack_air.rs +++ b/fighters/samusd/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "attack_air_float_pre"] @@ -8,6 +7,8 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::samusd::FLOAT.into()) } @@ -16,9 +17,7 @@ unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue attack_air_float_main(fighter, statuses::samusd::FLOAT.into()) } -pub fn install() { - smashline::Agent::new("samusd") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/samusd/src/status/float.rs b/fighters/samusd/src/status/float.rs index 633037e1a9..6d72139de0 100644 --- a/fighters/samusd/src/status/float.rs +++ b/fighters/samusd/src/status/float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "float_pre_common"] @@ -10,6 +9,8 @@ extern "Rust" { fn float_end_common(fighter: &mut L2CFighterCommon) -> L2CValue; } +// statuses::samusd::FLOAT + unsafe extern "C" fn float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { float_pre_common(fighter) } @@ -38,10 +39,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("samusd") - .status(Pre, statuses::samusd::FLOAT, float_pre) - .status(Main, statuses::samusd::FLOAT, float_main) - .status(End, statuses::samusd::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::samusd::FLOAT, float_pre); + agent.status(Main, statuses::samusd::FLOAT, float_main); + agent.status(End, statuses::samusd::FLOAT, float_end); } diff --git a/fighters/samusd/src/status.rs b/fighters/samusd/src/status/mod.rs similarity index 87% rename from fighters/samusd/src/status.rs rename to fighters/samusd/src/status/mod.rs index 295647d2d6..06139dde21 100644 --- a/fighters/samusd/src/status.rs +++ b/fighters/samusd/src/status/mod.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attack_air; mod float; @@ -26,12 +28,9 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::samusd::FLOAT); } -pub fn install() { - attack_air::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); - float::install(); - - Agent::new("samusd") - .on_start(on_start) - .install(); -} \ No newline at end of file + attack_air::install(agent); + float::install(agent); +} diff --git a/fighters/samusd/src/supermissile/acmd.rs b/fighters/samusd/src/supermissile/acmd.rs new file mode 100644 index 0000000000..418f002fb8 --- /dev/null +++ b/fighters/samusd/src/supermissile/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } +} + +// unsafe fn game_sburst(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 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_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); +// ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0x50000000 /* default value */); +// } +// wait(lua_state, 1.0); +// if is_excute(agent) { +// ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0x50000000 /* default value */); +// notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +// } +// } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + + agent.acmd("game_straight", game_straight); +} diff --git a/fighters/samusd/src/supermissile/mod.rs b/fighters/samusd/src/supermissile/mod.rs new file mode 100644 index 0000000000..762dcbe6f2 --- /dev/null +++ b/fighters/samusd/src/supermissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_supermissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sheik/src/acmd/aerials.rs b/fighters/sheik/src/acmd/aerials.rs index 90e5827dac..356f22b468 100644 --- a/fighters/sheik/src/acmd/aerials.rs +++ b/fighters/sheik/src/acmd/aerials.rs @@ -1,133 +1,130 @@ use super::*; -unsafe extern "C" fn sheik_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 3.5, 4.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 100, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 3.5, 4.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 100, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 3.5, 3.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 361, 105, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 361, 105, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 3.5, 3.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 361, 105, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 361, 105, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(7.7-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(7.7-5.0)); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 5.5, 50, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.5, 50, 100, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 5.5, 50, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.5, 50, 100, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.7); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.7)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.7)); } frame(lua_state, 8.4); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(9.0-8.4)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(9.0-8.4)); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.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 sheik_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sheik_attack_cut"), Hash40::new("top"), -1.5, 6.3, 9.7, 180, 200, 67, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sheik_attack_cut"), Hash40::new("top"), -1.5, 6.3, 9.7, 180, 200, 67, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } } -unsafe extern "C" fn sheik_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 35, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 35, 2.75, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 361, 100, 0, 35, 4.5, 3.8, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 35, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 35, 2.75, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 361, 100, 0, 35, 4.5, 3.8, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 95, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 95, 0, 25, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 361, 95, 0, 25, 3.2, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 361, 95, 0, 25, 3.7, 3.0, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 95, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 95, 0, 25, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 361, 95, 0, 25, 3.2, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 361, 95, 0, 25, 3.7, 3.0, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 1.5, 367, 80, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 1.5, 367, 80, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legl"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legl"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -145,105 +142,111 @@ unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sheik_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 80, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 80, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 275, 100, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 275, 100, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 280, 76, 0, 10, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 280, 76, 0, 10, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 80, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 85, 0, 35, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 80, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 85, 0, 35, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 2, false); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.735); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.735); AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.1, true, 0.95); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.1, true, 0.95); } - } -unsafe extern "C" fn sheik_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_sheik_landing02")); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent){ + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent){ + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sheik_landing_air_lw_expression(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_TOP); - } +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); +} + +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_sheik_landing02")); } } -unsafe extern "C" fn sheik_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter){ - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_landingairlw(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_TOP); } - - frame(lua_state, 13.0); - if is_excute(fighter){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 21.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attackairn", sheik_attack_air_n_game) - .acmd("game_attackairf", sheik_attack_air_f_game) - .acmd("effect_attackairf", sheik_attack_air_f_effect) - .acmd("game_attackairb", sheik_attack_air_b_game) - .acmd("game_attackairhi", sheik_attack_air_hi_game) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", sheik_attack_air_lw_game) - .acmd("effect_attackairlw", sheik_attack_air_lw_effect) - .acmd("sound_landingairlw", sheik_landing_air_lw_sound) - .acmd("expression_landingairlw", sheik_landing_air_lw_expression) - .acmd("expression_attackairlw", sheik_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/sheik/src/acmd/ground.rs b/fighters/sheik/src/acmd/ground.rs index 927ae8e745..3b9a0ac7ec 100644 --- a/fighters/sheik/src/acmd/ground.rs +++ b/fighters/sheik/src/acmd/ground.rs @@ -1,123 +1,117 @@ - use super::*; -unsafe extern "C" fn sheik_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 70, 80, 0, 10, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 70, 80, 0, 10, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sheik_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - 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); - EFFECT_FOLLOW(fighter, Hash40::new("sheik_attack_cut"), Hash40::new("top"), 2, 10.0, 5.0, 0, -20, -18, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sheik_attack_cut"), Hash40::new("top"), 2, 10.0, 5.0, 0, -20, -18, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sheik_attack_cut"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sheik_attack_cut"), -1); } } -unsafe extern "C" fn sheik_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 70, 50, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 70, 50, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(7.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(7.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sheik_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - 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); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -1.0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -1.0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line_b"), true, true); } } -unsafe extern "C" fn sheik_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.0, -3.8, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, -1.1, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, 2.3, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.0, -3.8, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, -1.1, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, 2.3, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 60, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 60, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 361, 100, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 361, 100, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attack11", sheik_attack_11_game) - .acmd("effect_attack11", sheik_attack_11_effect) - .acmd("game_attack12", sheik_attack_12_game) - .acmd("effect_attack12", sheik_attack_12_effect) - .acmd("game_attack100end", sheik_attack_100_end_game) - .acmd("game_attackdash", sheik_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/sheik/src/acmd/mod.rs b/fighters/sheik/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/sheik/src/acmd/mod.rs +++ b/fighters/sheik/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/sheik/src/acmd/other.rs b/fighters/sheik/src/acmd/other.rs index e9eeef0455..872100c2b1 100644 --- a/fighters/sheik/src/acmd/other.rs +++ b/fighters/sheik/src/acmd/other.rs @@ -1,222 +1,123 @@ - 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_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(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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_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_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sheik_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.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 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_sheik_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_sheik_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sheik_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sheik_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sheik_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sheik_step_left_m")); } } -unsafe extern "C" fn 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, 9.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 sheik_needle_move_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"), 2.0, 65, 80, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *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_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - -} - -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("sheik_needle") - .acmd("game_move", sheik_needle_move_game) - .install(); - smashline::Agent::new("sheik") - .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("game_landingairlw", sheik_landing_air_lw_game) - .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) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/sheik/src/acmd/smashes.rs b/fighters/sheik/src/acmd/smashes.rs index 4b2744bc76..3123d9b795 100644 --- a/fighters/sheik/src/acmd/smashes.rs +++ b/fighters/sheik/src/acmd/smashes.rs @@ -1,181 +1,178 @@ use super::*; -unsafe extern "C" fn sheik_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 26, 100, 62, 0, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 45, 100, 47, 0, 3.5, -0.7, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 5.0, 80, 100, 45, 0, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 26, 100, 62, 0, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 45, 100, 47, 0, 3.5, -0.7, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 5.0, 80, 100, 45, 0, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.8, -1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 55, 110, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.6, 5.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.8, -1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 55, 110, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.6, 5.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 10.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 8.0, 10.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 90, 95, 0, 52, 4.5, 2.9, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 90, 95, 0, 52, 4.5, 2.9, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn sheik_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 21, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 21, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 24, 2, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 24, 2, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sheik_smash_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sheik_smash_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_smash_flash"), true, true); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_smash_flash"), true, true); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } } -unsafe extern "C" fn sheik_attack_hi4_expression(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_attackhi4(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); } frame(lua_state, 7.0); sv_animcmd::execute(lua_state, 7.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn sheik_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 45, 86, 0, 41, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 45, 86, 0, 41, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 45, 86, 0, 41, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 45, 86, 0, 41, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 18.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 18.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 45, 86, 0, 41, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 45, 86, 0, 41, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 45, 86, 0, 41, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 45, 86, 0, 41, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attacks4", sheik_attack_s4_s_game) - .acmd("game_attackhi4", sheik_attack_hi4_game) - .acmd("effect_attackhi4", sheik_attack_hi4_effect) - .acmd("expression_attackairhi", sheik_attack_hi4_expression) - .acmd("game_attacklw4", sheik_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } \ No newline at end of file diff --git a/fighters/sheik/src/acmd/specials.rs b/fighters/sheik/src/acmd/specials.rs index ce9fbba53d..9369e7449a 100644 --- a/fighters/sheik/src/acmd/specials.rs +++ b/fighters/sheik/src/acmd/specials.rs @@ -1,74 +1,39 @@ - use super::*; -unsafe extern "C" fn sheik_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SHEIK_STATUS_SPECIAL_S_FLAG_THROW); - } - -} - -unsafe extern "C" fn sheik_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHEIK_STATUS_SPECIAL_S_FLAG_THROW); } - } -unsafe extern "C" fn sheik_special_hi_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"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - //ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *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_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FT_SHEIK_STATUS_SPECIAL_HI_FLAG_FALL); } - -} - -unsafe extern "C" fn sheik_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), -5.5, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_start"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 7, 2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } } unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { @@ -92,79 +57,55 @@ unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sheik_special_air_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 5, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_start_air"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.77, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn fusin_game_explosion(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhistart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 27.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 60, 0, 80, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 5, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } - wait(lua_state, 3.0); + frame(lua_state, 36.0); if is_excute(agent) { - AttackModule::clear_all(boma); + EFFECT(agent, Hash40::new("sheik_fushin_start_air"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.77, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } - wait(lua_state, 1.0); + frame(lua_state, 55.0); if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + EFFECT(agent, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn sheik_special_lw_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 361, 92, 0, 26, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 361, 92, 0, 26, 3.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 361, 92, 0, 26, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 361, 92, 0, 26, 3.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_keep_rumble(boma, 0, true); AttackModule::set_attack_keep_rumble(boma, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.75); + FT_MOTION_RATE(agent, 1.75); } - } -pub fn install() { - smashline::Agent::new("sheik_fusin") - .acmd("game_explosion", fusin_game_explosion) - .install(); - smashline::Agent::new("sheik") - .acmd("game_specials", sheik_special_s_game) - .acmd("game_specialairs", sheik_special_air_s_game) - .acmd("game_specialhi", sheik_special_hi_game) - .acmd("game_specialairhi", sheik_special_air_hi_game) - .acmd("effect_specialhistart", sheik_special_hi_start_effect) - .acmd("effect_specialhistart", effect_specialhistart) - .acmd( - "effect_specialairhistart", - sheik_special_air_hi_start_effect, - ) - .acmd("game_speciallwattack", sheik_special_lw_attack_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("effect_specialairhistart", effect_specialairhistart); + + agent.acmd("game_speciallwattack", game_speciallwattack); } diff --git a/fighters/sheik/src/acmd/throws.rs b/fighters/sheik/src/acmd/throws.rs index 8f2d1bb3e6..220e967739 100644 --- a/fighters/sheik/src/acmd/throws.rs +++ b/fighters/sheik/src/acmd/throws.rs @@ -1,78 +1,73 @@ - use super::*; -unsafe extern "C" fn sheik_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 sheik_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 sheik_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_catch", sheik_catch_game) - .acmd("game_catchdash", sheik_catch_dash_game) - .acmd("game_catchturn", sheik_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/sheik/src/acmd/tilts.rs b/fighters/sheik/src/acmd/tilts.rs index cc1c2c3bb7..0d00ca9225 100644 --- a/fighters/sheik/src/acmd/tilts.rs +++ b/fighters/sheik/src/acmd/tilts.rs @@ -1,141 +1,133 @@ - use super::*; -unsafe extern "C" fn sheik_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 72, 100, 0, 58, 4.0, -0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 75, 100, 0, 58, 3.5, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 80, 100, 0, 58, 4.0, 4.3, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 72, 100, 0, 58, 4.0, -0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 75, 100, 0, 58, 3.5, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 80, 100, 0, 58, 4.0, 4.3, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 3.0); } - } -unsafe extern "C" fn sheik_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.5, 0, 10, 50, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.5, 0, 10, 50, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn sheik_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 0, 80, 30, 0, 3.5, 4.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 330, 80, 28, 0, 4.5, 2.5, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 75, 80, 40, 0, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 0, 80, 30, 0, 3.5, 4.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 330, 80, 28, 0, 4.5, 2.5, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 75, 80, 40, 0, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 4.5, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.5, 100, 80, 0, 60, 5.0, 5.0, -0.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 4.5, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.5, 100, 80, 0, 60, 5.0, 5.0, -0.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn sheik_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.5, -2, -90, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.5, -2, -90, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11.0, 7.0, 0, -45, -90, 1, true); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 1.0, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11.0, 7.0, 0, -45, -90, 1, true); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 1.0, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 17, 0, -1, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 17, 0, -1, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_d"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_d"), false, false); } } -unsafe extern "C" fn sheik_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 70, 70, 0, 65, 3.7, 0.0, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 70, 0, 65, 3.7, 3.5, -0.6, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 90, 58, 0, 65, 4.3, 5.0, -0.2, -1.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 70, 70, 0, 65, 3.7, 0.0, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 70, 0, 65, 3.7, 3.5, -0.6, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 90, 58, 0, 65, 4.3, 5.0, -0.2, -1.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.5, 4, 6.0, 0, 15, 20, 0.925, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.5, 4, 6.0, 0, 15, 20, 0.925, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attacks3", sheik_attack_s3_s_game) - .acmd("effect_attacks3", sheik_attack_s3_s_effect) - .acmd("game_attackhi3", sheik_attack_hi3_game) - .acmd("effect_attackhi3", sheik_attack_hi3_effect) - .acmd("game_attacklw3", sheik_attack_lw3_game) - .acmd("effect_attacklw3", sheik_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/sheik/src/fusin/acmd.rs b/fighters/sheik/src/fusin/acmd.rs new file mode 100644 index 0000000000..02163e8fb0 --- /dev/null +++ b/fighters/sheik/src/fusin/acmd.rs @@ -0,0 +1,21 @@ +use super::*; + +unsafe extern "C" fn game_explosion(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 60, 0, 80, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explosion", game_explosion); +} diff --git a/fighters/sheik/src/fusin/mod.rs b/fighters/sheik/src/fusin/mod.rs new file mode 100644 index 0000000000..72fd3f916a --- /dev/null +++ b/fighters/sheik/src/fusin/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sheik_fusin"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sheik/src/lib.rs b/fighters/sheik/src/lib.rs index f69fbfee0e..d2e3f25266 100644 --- a/fighters/sheik/src/lib.rs +++ b/fighters/sheik/src/lib.rs @@ -5,6 +5,12 @@ pub mod acmd; pub mod opff; +//pub mod status; + +// articles + +mod fusin; +mod needle; use smash::{ lib::{ @@ -36,8 +42,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("sheik"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + fusin::install(); + needle::install(); } diff --git a/fighters/sheik/src/needle/acmd.rs b/fighters/sheik/src/needle/acmd.rs new file mode 100644 index 0000000000..46338e4d6d --- /dev/null +++ b/fighters/sheik/src/needle/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 65, 80, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *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_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/sheik/src/needle/mod.rs b/fighters/sheik/src/needle/mod.rs new file mode 100644 index 0000000000..8b5f1e982f --- /dev/null +++ b/fighters/sheik/src/needle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sheik_needle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sheik/src/opff.rs b/fighters/sheik/src/opff.rs index 8165557866..41ecee5cf0 100644 --- a/fighters/sheik/src/opff.rs +++ b/fighters/sheik/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bouncing_fish_return_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN && boma.status_frame() > 14 { if situation_kind == *SITUATION_KIND_AIR { @@ -109,8 +108,7 @@ pub unsafe fn sheik_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("sheik") - .on_line(Main, sheik_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, sheik_frame_wrapper); } diff --git a/fighters/shizue/src/acmd/aerials.rs b/fighters/shizue/src/acmd/aerials.rs index 51a1791f60..17435bfaff 100644 --- a/fighters/shizue/src/acmd/aerials.rs +++ b/fighters/shizue/src/acmd/aerials.rs @@ -1,211 +1,208 @@ - use super::*; -unsafe extern "C" fn shizue_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_INSTANCE_WORK_ID_FLAG_POMPON_LEFT); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, false, 0); WorkModule::on_flag(boma, *FIGHTER_SHIZUE_INSTANCE_WORK_ID_FLAG_POMPON_RIGHT); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, smash::phx::Hash40::new("attack"), false, 0.0); - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.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); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn shizue_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 9.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 19.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 16.0, 19.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 30.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 30.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn shizue_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 6.5, 6.5, 3, 0, -20, 90, 0.65, false); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 10.0, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 6.5, 6.5, 3, 0, -20, 90, 0.65, false); + LAST_EFFECT_SET_COLOR(agent, 0.4, 10.0, 0.4); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("shizue_grass"), Hash40::new("top"), 1, 0.4, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("shizue_grass"), Hash40::new("top"), 1, 0.4, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } } -unsafe extern "C" fn shizue_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_shizue_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_shizue_attackhard_l01")); } } -unsafe extern "C" fn shizue_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn shizue_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_SLINGSHOT, true, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn shizue_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 3.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 3.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn shizue_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.769); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 270, 80, 0, 25, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 270, 80, 0, 25, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 270, 50, 0, 10, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 270, 50, 0, 10, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 30, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 30, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 4.5, 0.0, -4.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 4.5, 0.0, -4.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attackairn", shizue_attack_air_n_game) - .acmd("game_attackairf", shizue_attack_air_f_game) - .acmd("effect_attackairf", shizue_attack_air_f_effect) - .acmd("sound_attackairf", shizue_attack_air_f_sound) - .acmd("expression_attackairf", shizue_attack_air_f_expression) - .acmd("game_attackairb", shizue_attack_air_b_game) - .acmd("game_attackairhi", shizue_attack_air_hi_game) - .acmd("game_attackairlw", shizue_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/shizue/src/acmd/ground.rs b/fighters/shizue/src/acmd/ground.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/shizue/src/acmd/ground.rs +++ b/fighters/shizue/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/shizue/src/acmd/mod.rs b/fighters/shizue/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/shizue/src/acmd/mod.rs +++ b/fighters/shizue/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/acmd/other.rs b/fighters/shizue/src/acmd/other.rs index ccbe0eaa61..567a9eabaf 100644 --- a/fighters/shizue/src/acmd/other.rs +++ b/fighters/shizue/src/acmd/other.rs @@ -1,117 +1,75 @@ - use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_shizue_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_shizue_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); - } -} - -unsafe extern "C" fn shizue_fishingrod_start_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, 13.0/(21.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn shootb_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"), 11.0, 361, 85, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *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_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(fighter.module_accessor); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 78, 0, 14, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 72, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.5, 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_PUNCH, *ATTACK_REGION_OBJECT); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("shizue_fishingrod") - .acmd("game_start", shizue_fishingrod_start_game) - .install(); - smashline::Agent::new("shizue_bullet") - .acmd("game_shootb", shootb_game) - .install(); - smashline::Agent::new("shizue") - .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) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/shizue/src/acmd/smashes.rs b/fighters/shizue/src/acmd/smashes.rs index 1195a297dd..27d10804e2 100644 --- a/fighters/shizue/src/acmd/smashes.rs +++ b/fighters/shizue/src/acmd/smashes.rs @@ -1,173 +1,138 @@ - use super::*; -unsafe extern "C" fn shizue_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), false, 13.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - -} - -unsafe extern "C" fn shizue_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 0.0); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); - } - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 5.0); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 5.0, 0.0, 3.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 4.5, 0.0, 3.6, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 5.0, 0.0, 3.6, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 4.5, 0.0, 3.6, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 56.0); - if is_excute(fighter) { - ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } -unsafe extern "C" fn shizue_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_TRAFFICSIGN, true, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_TRAFFICSIGN, Hash40::new("attack"), true, 0.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 5.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 100, 100, 70, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 5.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 100, 100, 70, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 10.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 10.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } wait(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 18.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 18.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 20.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } } -unsafe extern "C" fn shizue_trafficsign_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.458); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 0.0); } - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.85); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); + } + } + frame(lua_state, 5.0); + if is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 5.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("trafficsign"), 14.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 5.0, 0.0, 3.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 4.5, 0.0, 3.6, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("trafficsign"), 12.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 5.0, 0.0, 3.6, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 4.5, 0.0, 3.6, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_WATER, *ATTACK_REGION_WATER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.9); + if is_excute(agent) { AttackModule::clear_all(boma); } + frame(lua_state, 56.0); + if is_excute(agent) { + ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } - -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attacks4", shizue_attack_s4_s_game) - .acmd("game_attacklw4", shizue_attack_lw4_game) - .acmd("game_attackhi4", shizue_attack_hi4_game) - .install(); - smashline::Agent::new("shizue_trafficsign") - .acmd("game_attack", shizue_trafficsign_attack_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/shizue/src/acmd/specials.rs b/fighters/shizue/src/acmd/specials.rs index f0c0762422..2f68f7a9d0 100644 --- a/fighters/shizue/src/acmd/specials.rs +++ b/fighters/shizue/src/acmd/specials.rs @@ -1,445 +1,374 @@ - use super::*; -unsafe extern "C" fn shizue_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_N_FLAG_SEARCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::inc_int(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_N_INT_TAKEOUT_REQUEST); } } -unsafe extern "C" fn shizue_special_n_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } - -} - -unsafe extern "C" fn shizue_special_n_failure_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } } -unsafe extern "C" fn shizue_special_air_n_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); - } + if is_excute(agent) { + EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } - } -unsafe extern "C" fn shizue_special_n_failure_expression(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_specialnfailure(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); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - } -} - -unsafe extern "C" fn shizue_special_air_hi_detach_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::common::instance::UP_SPECIAL_CANCEL); - StatusModule::change_status_request_from_script(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL, true); - if VarModule::is_flag(fighter.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE) { - VarModule::off_flag(fighter.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE); - WorkModule::set_float(fighter.module_accessor, VarModule::get_float(fighter.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); - } - } -} - -unsafe extern "C" fn shizue_special_lw_set_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 0.9); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_LW_FLAG_SET); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } - } -unsafe extern "C" fn shizue_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 11.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_FISHINGROD, false, 0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); JostleModule::set_push_speed_x(boma, 0.8, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x_overlap_rate(boma, 10.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 4.0); JostleModule::set_push_speed_x(boma, 1.6, true); JostleModule::set_push_speed_x_overlap_rate(boma, 20.0); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 13.0, 4.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_S_FLAG_SHOOT); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 16.0, 3.0); JostleModule::set_push_speed_x(boma, 0.01, true); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x(boma, 0.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); } - } -unsafe extern "C" fn shizue_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 13.0/(21.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 13.0/(21.0 - 1.0)); } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_FISHINGROD, false, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 4.0); JostleModule::set_push_speed_x(boma, 12.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 12.0); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 16.0, 4.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_S_FLAG_SHOOT); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); JostleModule::set_push_speed_x(boma, 0.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); } } -unsafe extern "C" fn shizue_special_s_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 0.65); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 0.65); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_special_air_s_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(-1.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 0.65); + FT_MOTION_RATE(agent, 0.65); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_special_s_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn shizue_special_air_s_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(1.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn shizue_special_s_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn shizue_special_air_s_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsthrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, 0.5, 0.0)); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.75, 0.0)); } } -unsafe extern "C" fn shizue_special_s_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //Adjust angle/knockback of throw slightly based on direction held after down throw is determined - let lr = PostureModule::lr(fighter.boma()); - let x_pos= fighter.stick_x(); + let lr = PostureModule::lr(agent.boma()); + let x_pos= agent.stick_x(); let lim = 0.4; if lr == 1.0 { if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } else if lr == -1.0 { if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 1.75); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.75); } } -unsafe extern "C" fn shizue_special_air_s_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //Adjust angle/knockback of throw slightly based on direction held after down throw is determined - let lr = PostureModule::lr(fighter.boma()); - let x_pos= fighter.stick_x(); + let lr = PostureModule::lr(agent.boma()); + let x_pos= agent.stick_x(); let lim = 0.4; if lr == 1.0 { if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } else if lr == -1.0 { if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 1.75); + FT_MOTION_RATE(agent, 1.75); } } -unsafe extern "C" fn shizue_clayrocket_ready_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - wait(lua_state, 20.0); - if is_excute(fighter) { - //Should never automatically activate - //SEARCH(fighter, 0, 0, Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - } - FT_MOTION_RATE(fighter, 0.1); -} - -unsafe extern "C" fn shizue_clayrocket_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.1); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 96, 100, 70, 0, 6.0, 0.0, 0.5, 0.0, Some(0.0), Some(-5.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - FT_MOTION_RATE(fighter, 1.0); - wait(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.9, 89, 10, 0, 70, 6.0, 0.0, 0.5, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn game_specialairhidetach(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::common::instance::UP_SPECIAL_CANCEL); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, true); + if VarModule::is_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE) { + VarModule::off_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE); + WorkModule::set_float(boma, VarModule::get_float(agent.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); + } } } -unsafe extern "C" fn shizue_clayrocket_burst_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwset(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 70, 0, 50, 17.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + JostleModule::set_status(boma, false); + FT_MOTION_RATE(agent, 0.9); } - wait(lua_state, 2.0); + frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_LW_FLAG_SET); + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_specialn", shizue_special_n_game) - .acmd("game_specialairn", shizue_special_n_game) - .acmd("game_specialnfailure", shizue_special_n_failure_game) - .acmd("effect_specialnfailure", shizue_special_n_failure_effect) - .acmd("effect_specialairnfailure", shizue_special_n_failure_effect) - .acmd("game_specialairnfailure", shizue_special_air_n_failure_game) - .acmd( - "expression_specialnfailure", - shizue_special_n_failure_expression, - ) - .acmd( - "expression_specialairnfailure", - shizue_special_n_failure_expression, - ) - .acmd("game_specialairhidetach", shizue_special_air_hi_detach_game) - .acmd("game_speciallwset", shizue_special_lw_set_game) - .acmd("game_specialsstart", shizue_special_s_start_game) - .acmd("game_specialairsstart", shizue_special_air_s_start_game) - .acmd("game_specialsthrowb", shizue_special_s_throw_b_game) - .acmd("game_specialairsthrowb", shizue_special_air_s_throw_b_game) - .acmd("game_specialsthrowf", shizue_special_s_throw_f_game) - .acmd("game_specialairsthrowf", shizue_special_air_s_throw_f_game) - .acmd("game_specialsthrowhi", shizue_special_s_throw_hi_game) - .acmd( - "game_specialairsthrowhi", - shizue_special_air_s_throw_hi_game, - ) - .acmd("game_specialsthrowlw", shizue_special_s_throw_lw_game) - .acmd( - "game_specialairsthrowlw", - shizue_special_air_s_throw_lw_game, - ) - .install(); - smashline::Agent::new("shizue_clayrocket") - .acmd("game_ready", shizue_clayrocket_ready_game) - .acmd("game_fly", shizue_clayrocket_fly_game) - .acmd("game_burst", shizue_clayrocket_burst_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialnfailure", game_specialnfailure); + agent.acmd("game_specialairnfailure", game_specialnfailure); + agent.acmd("effect_specialnfailure", effect_specialnfailure); + agent.acmd("effect_specialairnfailure", effect_specialnfailure); + agent.acmd("expression_specialnfailure", expression_specialnfailure); + agent.acmd("expression_specialairnfailure", expression_specialnfailure); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialsthrowb", game_specialsthrowb); + agent.acmd("game_specialairsthrowb", game_specialairsthrowb); + + agent.acmd("game_specialsthrowf", game_specialsthrowf); + agent.acmd("game_specialairsthrowf", game_specialairsthrowf); + + agent.acmd("game_specialsthrowhi", game_specialsthrowhi); + agent.acmd("game_specialairsthrowhi", game_specialairsthrowhi); + + agent.acmd("game_specialsthrowlw", game_specialsthrowlw); + agent.acmd("game_specialairsthrowlw", game_specialairsthrowlw); + + agent.acmd("game_specialairhidetach", game_specialairhidetach); + + agent.acmd("game_speciallwset", game_speciallwset); } diff --git a/fighters/shizue/src/acmd/throws.rs b/fighters/shizue/src/acmd/throws.rs index 1d4cf02baf..95220a57ec 100644 --- a/fighters/shizue/src/acmd/throws.rs +++ b/fighters/shizue/src/acmd/throws.rs @@ -1,169 +1,168 @@ use super::*; -unsafe extern "C" fn shizue_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(14.0 - 1.0)); + FT_MOTION_RATE(agent, 9.0/(14.0 - 1.0)); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BUTTERFLYNET, app::ArticleOperationTarget(0)); } } -unsafe extern "C" fn shizue_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 10.0/(16.0 - 1.0)); + FT_MOTION_RATE(agent, 10.0/(16.0 - 1.0)); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_DASH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_DASH); } } -unsafe extern "C" fn shizue_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 12.0/(17.0 - 1.0)); + FT_MOTION_RATE(agent, 12.0/(17.0 - 1.0)); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-13.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-13.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_TURN); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_TURN); } } -unsafe extern "C" fn shizue_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 8); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn shizue_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 94, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 94, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } -unsafe extern "C" fn shizue_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 74, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 74, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_catch", shizue_catch_game) - .acmd("game_catchdash", shizue_catch_dash_game) - .acmd("game_catchturn", shizue_catch_turn_game) - .acmd("game_throwf", shizue_throw_f_game) - .acmd("game_throwb", shizue_throw_b_game) - .acmd("game_throwhi", shizue_throw_hi_game) - .acmd("game_throwlw", shizue_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/shizue/src/acmd/tilts.rs b/fighters/shizue/src/acmd/tilts.rs index 63a8a69763..a65c200fa8 100644 --- a/fighters/shizue/src/acmd/tilts.rs +++ b/fighters/shizue/src/acmd/tilts.rs @@ -1,95 +1,92 @@ - use super::*; -unsafe extern "C" fn shizue_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_UMBRELLA, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 4.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 4.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_UMBRELLA, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn shizue_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, true, 0); + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, Hash40::new("attack_hi3"), true, 0.0); + } + FT_MOTION_RATE(agent, 0.833); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); + } + FT_MOTION_RATE(agent, 1); + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + FT_MOTION_RATE(agent, 0.842); + frame(lua_state, 54.0); + if is_excute(agent) { + ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_WEEDS, true, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_WEEDS, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 92, 0, 45, 5.0, 0.0, 3.0, 3.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.5, 275, 52, 0, 77, 3.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 92, 0, 45, 5.0, 0.0, 3.0, 3.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.5, 275, 52, 0, 77, 3.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } - } -unsafe extern "C" fn shizue_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, true, 0); - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, Hash40::new("attack_hi3"), true, 0.0); - } - FT_MOTION_RATE(fighter, 0.833); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_OBJECT); - } - FT_MOTION_RATE(fighter, 1); - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - FT_MOTION_RATE(fighter, 0.842); - frame(lua_state, 54.0); - if is_excute(fighter) { - ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attacks3", shizue_attack_s3_s_game) - .acmd("game_attacklw3", shizue_attack_lw3_game) - .acmd("game_attackhi3", shizue_attack_hi3_game) - .install(); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/shizue/src/bullet/acmd.rs b/fighters/shizue/src/bullet/acmd.rs new file mode 100644 index 0000000000..8236dc53f3 --- /dev/null +++ b/fighters/shizue/src/bullet/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_shootb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *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_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 78, 0, 14, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 72, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.5, 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_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shootb", game_shootb); +} diff --git a/fighters/shizue/src/bullet/mod.rs b/fighters/shizue/src/bullet/mod.rs new file mode 100644 index 0000000000..7b20a2e3fa --- /dev/null +++ b/fighters/shizue/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("shizue_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/acmd.rs b/fighters/shizue/src/clayrocket/acmd.rs new file mode 100644 index 0000000000..e21b77b6ca --- /dev/null +++ b/fighters/shizue/src/clayrocket/acmd.rs @@ -0,0 +1,47 @@ +use super::*; + +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + wait(lua_state, 20.0); + if is_excute(agent) { + //Should never automatically activate + //SEARCH(agent, 0, 0, Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + } + FT_MOTION_RATE(agent, 0.1); +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.1); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 96, 100, 70, 0, 6.0, 0.0, 0.5, 0.0, Some(0.0), Some(-5.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + FT_MOTION_RATE(agent, 1.0); + wait(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 89, 10, 0, 70, 6.0, 0.0, 0.5, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_burst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 70, 0, 50, 17.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + + agent.acmd("game_fly", game_fly); + + agent.acmd("game_burst", game_burst); +} diff --git a/fighters/shizue/src/clayrocket/mod.rs b/fighters/shizue/src/clayrocket/mod.rs new file mode 100644 index 0000000000..43449449d0 --- /dev/null +++ b/fighters/shizue/src/clayrocket/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("shizue_clayrocket"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/opff.rs b/fighters/shizue/src/clayrocket/opff.rs new file mode 100644 index 0000000000..b8625eb0ce --- /dev/null +++ b/fighters/shizue/src/clayrocket/opff.rs @@ -0,0 +1,56 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +//Lloid explode on hit +unsafe extern "C" fn lloid_callback(weapon : &mut L2CFighterBase) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); + let shizue = utils::util::get_battle_object_from_id(owner_id as u32); + let shizue_boma = &mut *(*shizue).module_accessor; + let status = StatusModule::status_kind(weapon.module_accessor); + if [*WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, + *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_DISAPPEAR].contains(&status) { + VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 0); + } + if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY { + if shizue_boma.is_cat_flag(Cat1::SpecialLw) + && !VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) + && !shizue_boma.is_status(*FIGHTER_SHIZUE_STATUS_KIND_SPECIAL_LW_SET) + && !CancelModule::is_enable_cancel(shizue_boma) + && !shizue_boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FALL]) { + VarModule::on_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 10); + EFFECT(&mut weapon.agent_base, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } + if VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) { + if VarModule::get_int(shizue, vars::shizue::instance::LLOID_TIMER) > 0 { + VarModule::dec_int(shizue, vars::shizue::instance::LLOID_TIMER); + } + else { + VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY, true); + } + } + if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY + && (AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) + || AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_SHIELD)) + { + StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lloid_callback); +} diff --git a/fighters/shizue/src/status/clayrocket.rs b/fighters/shizue/src/clayrocket/status.rs similarity index 83% rename from fighters/shizue/src/status/clayrocket.rs rename to fighters/shizue/src/clayrocket/status.rs index 51565078f0..b9902788c8 100644 --- a/fighters/shizue/src/status/clayrocket.rs +++ b/fighters/shizue/src/clayrocket/status.rs @@ -1,15 +1,17 @@ use super::*; use crate::globals::*; -unsafe extern "C" fn clayrocket_ready_main(weapon: &mut L2CWeaponCommon) -> L2CValue { +// WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY + +unsafe extern "C" fn ready_main(weapon: &mut L2CWeaponCommon) -> L2CValue { MotionModule::change_motion(weapon.module_accessor, Hash40::new("ready"), 0.0, 1.0, false, 0.0, false, false); VisibilityModule::set_int64(weapon.module_accessor, hash40("body") as i64, hash40("body_off") as i64); HitModule::set_status(weapon.module_accessor, 0, app::HitStatus(*HIT_STATUS_NORMAL), 0); HitModule::set_status(weapon.module_accessor, 1, app::HitStatus(*HIT_STATUS_OFF), 0); - weapon.fastshift(L2CValue::Ptr(clayrocket_ready_main_loop as *const () as _)) + weapon.fastshift(L2CValue::Ptr(ready_main_loop as *const () as _)) } -unsafe extern "C" fn clayrocket_ready_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { +unsafe extern "C" fn ready_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { let touch_normal = GroundModule::get_touch_normal(weapon.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); let mut ground_angle = (touch_normal.y/touch_normal.x).atan().to_degrees(); ground_angle -= 90.0; @@ -43,12 +45,6 @@ unsafe extern "C" fn clayrocket_ready_main_loop(weapon: &mut L2CWeaponCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("shizue_clayrocket") - .status( - Main, - *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY, - clayrocket_ready_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY, ready_main); } diff --git a/fighters/shizue/src/fishingrod/acmd.rs b/fighters/shizue/src/fishingrod/acmd.rs new file mode 100644 index 0000000000..94e76f3530 --- /dev/null +++ b/fighters/shizue/src/fishingrod/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 13.0/(21.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); +} diff --git a/fighters/shizue/src/fishingrod/mod.rs b/fighters/shizue/src/fishingrod/mod.rs new file mode 100644 index 0000000000..bfb1feb8dc --- /dev/null +++ b/fighters/shizue/src/fishingrod/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("shizue_fishingrod"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/fishingrod/opff.rs b/fighters/shizue/src/fishingrod/opff.rs new file mode 100644 index 0000000000..d6eb8f3411 --- /dev/null +++ b/fighters/shizue/src/fishingrod/opff.rs @@ -0,0 +1,23 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +//Disable grab on fishingrod when pullingback +unsafe extern "C" fn fishingrod_callback(weapon : &mut L2CFighterBase) { + let object_id = (*weapon.battle_object).battle_object_id; + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); + let activate_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let serial_id = WorkModule::get_int(weapon.module_accessor, 0x10000002); + let kind = utility::get_kind(&mut (*weapon.module_accessor)); + if kind == *WEAPON_KIND_SHIZUE_FISHINGROD { + let status = StatusModule::status_kind(weapon.module_accessor); + if status == *WEAPON_SHIZUE_FISHINGROD_STATUS_KIND_REEL { + WeaponSpecializer_ShizueFishingrod::enable_search(weapon.module_accessor, false); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, fishingrod_callback); +} diff --git a/fighters/shizue/src/lib.rs b/fighters/shizue/src/lib.rs index 6a8505fd1d..dd7a2d6a28 100644 --- a/fighters/shizue/src/lib.rs +++ b/fighters/shizue/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bullet; +mod clayrocket; +mod fishingrod; +mod trafficsign; use smash::{ lib::{ @@ -37,20 +44,17 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn shizue_init(fighter: &mut L2CFighterCommon) { - unsafe { - VarModule::off_flag(fighter.object(), vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(fighter.object(), vars::shizue::instance::LLOID_TIMER, 0); - } -} +#[macro_use] extern crate smash_script; pub fn install() { - smashline::Agent::new("shizue") - .on_start(shizue_init) - .install(); + let agent = &mut Agent::new("shizue"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); - acmd::install(); - status::install(); - opff::install(); + bullet::install(); + clayrocket::install(); + fishingrod::install(); + trafficsign::install(); } diff --git a/fighters/shizue/src/opff.rs b/fighters/shizue/src/opff.rs index 1d7301ad3c..052f60a9fc 100644 --- a/fighters/shizue/src/opff.rs +++ b/fighters/shizue/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn fishing_rod_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { @@ -55,59 +54,6 @@ unsafe fn fuel_indicators(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -//Lloid explode on hit -unsafe extern "C" fn lloid_callback(weapon : &mut L2CFighterBase) { - unsafe { - if weapon.kind() != *WEAPON_KIND_SHIZUE_CLAYROCKET { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); - let shizue = utils::util::get_battle_object_from_id(owner_id as u32); - let shizue_boma = &mut *(*shizue).module_accessor; - let status = StatusModule::status_kind(weapon.module_accessor); - if [*WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, - *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_DISAPPEAR].contains(&status) { - VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 0); - } - if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY { - if shizue_boma.is_cat_flag(Cat1::SpecialLw) - && !VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) - && !shizue_boma.is_status(*FIGHTER_SHIZUE_STATUS_KIND_SPECIAL_LW_SET) - && !CancelModule::is_enable_cancel(shizue_boma) - && !shizue_boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FALL]) { - VarModule::on_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 10); - EFFECT(&mut weapon.agent_base, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } - if VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) { - if VarModule::get_int(shizue, vars::shizue::instance::LLOID_TIMER) > 0 { - VarModule::dec_int(shizue, vars::shizue::instance::LLOID_TIMER); - } - else { - VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY, true); - } - } - if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY - && (AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) - || AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_SHIELD)) - { - StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, true); - } - } -} - //Cancel aerials on hit into Balloon Trip unsafe fn balloon_special_cancel(fighter: &mut L2CFighterCommon) { let boma = fighter.boma(); @@ -148,23 +94,6 @@ unsafe fn reel_in(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situa } } } - -//Disable grab on fishingrod when pullingback -unsafe extern "C" fn fishingrod_callback(weapon : &mut L2CFighterBase) { - unsafe { - let object_id = (*weapon.battle_object).battle_object_id; - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); - let activate_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let serial_id = WorkModule::get_int(weapon.module_accessor, 0x10000002); - let kind = utility::get_kind(&mut (*weapon.module_accessor)); - if kind == *WEAPON_KIND_SHIZUE_FISHINGROD { - let status = StatusModule::status_kind(weapon.module_accessor); - if status == *WEAPON_SHIZUE_FISHINGROD_STATUS_KIND_REEL { - WeaponSpecializer_ShizueFishingrod::enable_search(weapon.module_accessor, false); - } - } - } -} //Lloid Trap Fire Jump Cancel unsafe fn lloid_trap_fire_jc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, stick_x: f32, facing: f32, frame: f32) { @@ -290,16 +219,7 @@ pub unsafe fn shizue_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("shizue") - .on_line(Main, shizue_frame_wrapper) - .install(); - - smashline::Agent::new("shizue_fishingrod") - .on_line(Main, fishingrod_callback) - .install(); - smashline::Agent::new("shizue_clayrocket") - .on_line(Main, lloid_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shizue_frame_wrapper); } diff --git a/fighters/shizue/src/status.rs b/fighters/shizue/src/status.rs deleted file mode 100644 index d9ce303ed0..0000000000 --- a/fighters/shizue/src/status.rs +++ /dev/null @@ -1,9 +0,0 @@ -use super::*; - -mod special_hi; -mod clayrocket; - -pub fn install() { - special_hi::install(); - clayrocket::install(); -} diff --git a/fighters/shizue/src/status/mod.rs b/fighters/shizue/src/status/mod.rs new file mode 100644 index 0000000000..672583d419 --- /dev/null +++ b/fighters/shizue/src/status/mod.rs @@ -0,0 +1,16 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::off_flag(fighter.object(), vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(fighter.object(), vars::shizue::instance::LLOID_TIMER, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi::install(agent); +} diff --git a/fighters/shizue/src/status/special_hi.rs b/fighters/shizue/src/status/special_hi.rs index 9b6292c353..6075bcf4e6 100644 --- a/fighters/shizue/src/status/special_hi.rs +++ b/fighters/shizue/src/status/special_hi.rs @@ -1,18 +1,14 @@ use super::*; -unsafe extern "C" fn shizue_special_hi_detach_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH + +unsafe extern "C" fn special_hi_detach_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let boost = VarModule::is_flag(fighter.object(), vars::shizue::status::IS_DETACH_BOOST); let ret = smashline::original_status(Pre, fighter, *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH)(fighter); VarModule::set_flag(fighter.object(), vars::shizue::status::IS_DETACH_BOOST, boost); ret } -pub fn install() { - smashline::Agent::new("shizue") - .status( - Pre, - *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH, - shizue_special_hi_detach_pre, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH, special_hi_detach_pre); } diff --git a/fighters/shizue/src/trafficsign/acmd.rs b/fighters/shizue/src/trafficsign/acmd.rs new file mode 100644 index 0000000000..abec0d6a55 --- /dev/null +++ b/fighters/shizue/src/trafficsign/acmd.rs @@ -0,0 +1,33 @@ +use super::*; + +unsafe extern "C" fn game_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.458); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.85); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("trafficsign"), 14.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("trafficsign"), 12.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.9); + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack", game_attack); +} diff --git a/fighters/shizue/src/trafficsign/mod.rs b/fighters/shizue/src/trafficsign/mod.rs new file mode 100644 index 0000000000..3874b2a0bd --- /dev/null +++ b/fighters/shizue/src/trafficsign/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("shizue_trafficsign"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shulk/src/acmd/aerials.rs b/fighters/shulk/src/acmd/aerials.rs index 0ac6d9676e..8d32e73a8c 100644 --- a/fighters/shulk/src/acmd/aerials.rs +++ b/fighters/shulk/src/acmd/aerials.rs @@ -1,108 +1,104 @@ - use super::*; -unsafe extern "C" fn shulk_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_DESIRED_RATE(fighter, 11.0, 9.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 11.0, 9.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_DESIRED_RATE(fighter, 18.0, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 10.0, 68, 100, 0, 50, 3.6, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 7.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 13.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, 18.0, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 10.0, 68, 100, 0, 50, 3.6, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 7.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 13.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn shulk_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 6.0, 3.0); + FT_DESIRED_RATE(agent, 6.0, 3.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, 5.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 8.5, 58, 70, 0, 70, 4.0, 12.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, 5.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 8.5, 58, 70, 0, 70, 4.0, 12.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.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 shulk_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 17.0, 15.0); + FT_DESIRED_RATE(agent, 17.0, 15.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.5, 361, 95, 0, 35, 2.75, -1.0, 0.7, 0.0, Some(-1.0), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.5, 361, 95, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -5.5, Some(0.0), Some(8.0), Some(-0.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.5, 361, 95, 0, 35, 2.75, -1.0, 0.7, 0.0, Some(-1.0), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.5, 361, 95, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -5.5, Some(0.0), Some(8.0), Some(-0.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.5, 361, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -7.5, Some(0.0), Some(8.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.5, 361, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -7.5, Some(0.0), Some(8.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 9.5, -18.5, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 9.5, -18.5, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 361, 85, 0, 35, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(10.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 361, 85, 0, 35, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(10.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 3.6, 0.0, 9.5, -17.0, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(9.5), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 3.6, 0.0, 9.5, -17.0, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(9.5), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -126,122 +122,122 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 11.0, 6.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 11.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 90, 40, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 4.5, 90, 90, 45, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 90, 40, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 4.5, 90, 90, 45, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - FT_DESIRED_RATE(fighter, 7.0, 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 7.0, 4.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 88, 90, 0, 40, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 88, 90, 0, 40, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 88, 90, 0, 40, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 88, 90, 0, 40, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 88, 80, 0, 35, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 88, 80, 0, 35, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 88, 80, 0, 35, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 88, 80, 0, 35, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 78.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 shulk_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 12.0, 10.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 12.0, 10.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 2.5); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 45, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 160, 100, 20, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 45, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 160, 100, 20, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - FT_DESIRED_RATE(fighter, 6.0, 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 6.0, 4.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.2); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 270, 90, 0, 15, 6.2, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 270, 90, 0, 15, 6.2, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 270, 85, 0, 50, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.5, 270, 85, 0, 55, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 270, 85, 0, 50, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.5, 270, 85, 0, 55, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.5, 270, 53, 0, 30, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 10.5, 270, 54, 0, 30, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.5, 270, 53, 0, 30, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.5, 270, 54, 0, 30, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 361, 75, 0, 55, 3.2, 0.0, -14.8, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 361, 75, 0, 55, 3.2, 0.0, -14.8, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attackairn", shulk_attack_air_n_game) - .acmd("game_attackairf", shulk_attack_air_f_game) - .acmd("game_attackairb", shulk_attack_air_b_game) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", shulk_attack_air_hi_game) - .acmd("game_attackairlw", shulk_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/shulk/src/acmd/ground.rs b/fighters/shulk/src/acmd/ground.rs index e7832e4748..c04330edb9 100644 --- a/fighters/shulk/src/acmd/ground.rs +++ b/fighters/shulk/src/acmd/ground.rs @@ -1,102 +1,99 @@ - use super::*; -unsafe extern "C" fn shulk_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.0, 361, 10, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.0, 361, 10, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //jablock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.0, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.0, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn shulk_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 361, 10, 0, 40, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 40, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 35, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 361, 10, 0, 40, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 40, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 35, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn shulk_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 4.65, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 9.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 4.65, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 9.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0, 11.0); + FT_DESIRED_RATE(agent, 14.0, 11.0); frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, 28.0, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 361, 95, 0, 35, 3.7, 0.0, 7.4, 11.6, Some(0.0), Some(7.4), Some(6.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 70, 95, 0, 35, 3.1, 0.0, 7.4, 18.8, Some(0.0), Some(7.4), Some(7.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, 28.0, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 361, 95, 0, 35, 3.7, 0.0, 7.4, 11.6, Some(0.0), Some(7.4), Some(6.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 70, 95, 0, 35, 3.1, 0.0, 7.4, 18.8, Some(0.0), Some(7.4), Some(7.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attack11", shulk_attack_11_game) - .acmd("game_attack12", shulk_attack_12_game) - .acmd("game_attack13", shulk_attack_13_game) - .acmd("game_attackdash", shulk_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/shulk/src/acmd/mod.rs b/fighters/shulk/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/shulk/src/acmd/mod.rs +++ b/fighters/shulk/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/shulk/src/acmd/other.rs b/fighters/shulk/src/acmd/other.rs index e68b073c19..e45b6bc504 100644 --- a/fighters/shulk/src/acmd/other.rs +++ b/fighters/shulk/src/acmd/other.rs @@ -1,198 +1,120 @@ - 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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_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(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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_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_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_shulk_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_shulk_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, 19.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_shulk_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_shulk_step_left_l")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_shulk_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_shulk_step_right_l")); } } -unsafe extern "C" fn 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, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.143); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.143); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } @@ -241,20 +163,21 @@ unsafe extern "C" fn sound_win2b_us_en(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("shulk") - .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("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_win2", effect_win2) - .acmd("sound_win2a_us_en", sound_win2a_us_en) - .acmd("sound_win2b_us_en", sound_win2b_us_en) - .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("game_dash", game_dash); + 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("effect_win2", effect_win2); + agent.acmd("sound_win2a_us_en", sound_win2a_us_en); + agent.acmd("sound_win2b_us_en", sound_win2b_us_en); } diff --git a/fighters/shulk/src/acmd/smashes.rs b/fighters/shulk/src/acmd/smashes.rs index b17520594f..69957daf90 100644 --- a/fighters/shulk/src/acmd/smashes.rs +++ b/fighters/shulk/src/acmd/smashes.rs @@ -1,203 +1,198 @@ - use super::*; -unsafe extern "C" fn shulk_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.244); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.244); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 90, 40, 70, 0, 4.3, 0.0, 12.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 60, 0, 3.9, 0.0, 17.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 40, 70, 0, 4.3, 0.0, 12.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 60, 0, 3.9, 0.0, 17.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 3.5, 0.0, 35.3, 0.9, Some(0.0), Some(7.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 5.0, 0.0, 16.0, 0.9, Some(0.0), Some(9.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 3.5, 0.0, 35.3, 0.9, Some(0.0), Some(7.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 5.0, 0.0, 16.0, 0.9, Some(0.0), Some(9.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 75, 90, 0, 50, 4.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 14.5, 65, 90, 0, 50, 4.4, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.5, 75, 90, 0, 50, 4.5, 0.0, 7.4, 12.5, Some(0.0), Some(7.4), Some(4.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 4.1, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 3.8, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 75, 90, 0, 50, 4.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 14.5, 65, 90, 0, 50, 4.4, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.5, 75, 90, 0, 50, 4.5, 0.0, 7.4, 12.5, Some(0.0), Some(7.4), Some(4.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 4.1, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 3.8, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -237,7 +232,7 @@ unsafe extern "C" fn shulk_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_lw4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -251,7 +246,7 @@ unsafe extern "C" fn shulk_attack_lw4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_lw4_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -285,15 +280,15 @@ unsafe extern "C" fn shulk_attack_lw4_expression(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attacks4hi", shulk_attack_s4_hi_game) - .acmd("game_attacks4", shulk_attack_s4_s_game) - .acmd("game_attacks4lw", shulk_attack_s4_lw_game) - .acmd("game_attackhi4", shulk_attack_hi4_game) - .acmd("game_attacklw4", shulk_attack_lw4_game) - .acmd("effect_attacklw4", shulk_attack_lw4_effect) - .acmd("sound_attacklw4", shulk_attack_lw4_sound) - .acmd("expression_attacklw4", shulk_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/shulk/src/acmd/specials.rs b/fighters/shulk/src/acmd/specials.rs index 4d13cfbe36..f4daba25e3 100644 --- a/fighters/shulk/src/acmd/specials.rs +++ b/fighters/shulk/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn shulk_special_n_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -25,7 +24,7 @@ unsafe extern "C" fn shulk_special_n_start_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -85,7 +84,7 @@ unsafe extern "C" fn shulk_special_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -133,7 +132,7 @@ unsafe extern "C" fn shulk_special_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_air_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -180,7 +179,7 @@ unsafe extern "C" fn shulk_special_air_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -224,67 +223,67 @@ unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma,*FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma,*FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ADD_SHIFT_RESERVE_INPUT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 100, 78, 0, 3.2, 0.0, 20.0, 7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 86, 100, 80, 0, 4.5, 0.0, 20.0, 16.0, Some(0.0), Some(4.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 100, 78, 0, 3.2, 0.0, 20.0, 7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 86, 100, 80, 0, 4.5, 0.0, 20.0, 16.0, Some(0.0), Some(4.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 52, 100, 43, 0, 3.2, 0.0, 18.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 43, 0, 3.2, 0.0, 18.0, 16.0, Some(0.0), Some(10.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 52, 100, 43, 0, 3.2, 0.0, 18.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 43, 0, 3.2, 0.0, 18.0, 16.0, Some(0.0), Some(10.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_ADD_SHIFT_INPUT); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_FALL); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); } frame(lua_state, 30.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); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_ADD_SHIFT_INPUT); } } -unsafe extern "C" fn shulk_special_lw_attack_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -308,7 +307,7 @@ unsafe extern "C" fn shulk_special_lw_attack_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn shulk_special_lw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 0.8); @@ -325,23 +324,23 @@ unsafe extern "C" fn shulk_special_lw_f_game(agent: &mut L2CAgentBase) { } } +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specialnstart", effect_specialnstart); + agent.acmd("effect_specialairnstart", effect_specialnstart); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); -pub fn install() { - smashline::Agent::new("shulk") - .acmd("effect_specialnstart", shulk_special_n_start_effect) - .acmd("effect_specialairnstart", shulk_special_n_start_effect) - .acmd("game_specials", shulk_special_s_game) - .acmd("game_specialairs", shulk_special_s_game) - .acmd("effect_specials", shulk_special_s_effect) - .acmd("effect_specialairs", shulk_special_air_s_effect) - .acmd("sound_specials", shulk_special_s_sound) - .acmd("sound_specialairs", shulk_special_s_sound) - .acmd("expression_specials", expression_specials) - .acmd("expression_specialairs", expression_specials) - .acmd("game_specialhi", shulk_special_hi_game) - .acmd("game_specialairhi", shulk_special_hi_game) - .acmd("game_speciallwattack", shulk_special_lw_attack_game) - .acmd("game_specialairlwattack", shulk_special_lw_attack_game) - .acmd("game_speciallwf", shulk_special_lw_f_game) - .install(); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + + agent.acmd("game_speciallwattack", game_speciallwattack); + agent.acmd("game_specialairlwattack", game_speciallwattack); + agent.acmd("game_speciallwf", game_speciallwf); } diff --git a/fighters/shulk/src/acmd/throws.rs b/fighters/shulk/src/acmd/throws.rs index b5be8cb90f..e6e6747978 100644 --- a/fighters/shulk/src/acmd/throws.rs +++ b/fighters/shulk/src/acmd/throws.rs @@ -1,31 +1,30 @@ use super::*; -unsafe extern "C" fn shulk_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 shulk_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -45,7 +44,7 @@ unsafe extern "C" fn shulk_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,115 +64,117 @@ unsafe extern "C" fn shulk_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 95, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 95, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 4); + CHECK_FINISH_CAMERA(agent, 15, 4); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 135, 95, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 135, 95, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 30, 3.0, 0.0, 31.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 30, 3.0, 0.0, 31.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 19); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 19); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 60, 108, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 60, 108, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 0, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 0, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_catch", shulk_catch_game) - .acmd("game_catchdash", shulk_catch_dash_game) - .acmd("game_catchturn", shulk_catch_turn_game) - .acmd("game_throwf", shulk_throw_f_game) - .acmd("game_throwb", shulk_throw_b_game) - .acmd("game_throwhi", shulk_throw_hi_game) - .acmd("game_throwlw", shulk_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/shulk/src/acmd/tilts.rs b/fighters/shulk/src/acmd/tilts.rs index 3ce01e7b0c..df5642bf00 100644 --- a/fighters/shulk/src/acmd/tilts.rs +++ b/fighters/shulk/src/acmd/tilts.rs @@ -1,81 +1,77 @@ - use super::*; -unsafe extern "C" fn shulk_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 5.0, 2.0); + FT_DESIRED_RATE(agent, 5.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 0.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.5, 361, 92, 0, 30, 3.2, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 9.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 14.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 0.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.5, 361, 92, 0, 30, 3.2, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 9.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 14.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0, 9.0); + FT_DESIRED_RATE(agent, 14.0, 9.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 80, 0, 70, 3.8, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 80, 0, 70, 3.8, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn shulk_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 9.0, 7.0); + FT_DESIRED_RATE(agent, 9.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.5, 0.0, 9.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.0, 0.0, 14.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.5, 0.0, 9.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.0, 0.0, 14.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attacks3", shulk_attack_s3_s_game) - .acmd("game_attackhi3", shulk_attack_hi3_game) - .acmd("game_attacklw3", shulk_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/shulk/src/lib.rs b/fighters/shulk/src/lib.rs index 4e823553ab..a4753c1fe1 100644 --- a/fighters/shulk/src/lib.rs +++ b/fighters/shulk/src/lib.rs @@ -4,8 +4,9 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + pub mod vtable_hook; use smash::{ @@ -38,10 +39,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - vtable_hook::install(); - opff::install(); + let agent = &mut Agent::new("shulk"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + vtable_hook::install(agent); + agent.install(); } diff --git a/fighters/shulk/src/opff.rs b/fighters/shulk/src/opff.rs index f826d031b6..781b4e8e66 100644 --- a/fighters/shulk/src/opff.rs +++ b/fighters/shulk/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // Fixes weird vanilla behavior where touching ground during upB puts you into special fall for 1f before landing unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) @@ -88,8 +87,7 @@ pub unsafe fn shulk_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("shulk") - .on_line(Main, shulk_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shulk_frame_wrapper); } diff --git a/fighters/shulk/src/status.rs b/fighters/shulk/src/status/mod.rs similarity index 53% rename from fighters/shulk/src/status.rs rename to fighters/shulk/src/status/mod.rs index 86bfa65bd4..f3d832c7c9 100644 --- a/fighters/shulk/src/status.rs +++ b/fighters/shulk/src/status/mod.rs @@ -1,27 +1,10 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_s; -pub fn install() { - smashline::Agent::new("shulk") - .on_start(shulk_init) - .install(); - special_n::install(); - special_s::install(); -} - -extern "C" fn shulk_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_SHULK { - return; - } - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); - } -} - unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shulk::instance::DISABLE_SPECIAL_S) { false.into() @@ -42,3 +25,16 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L 0.into() } + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); +} diff --git a/fighters/shulk/src/status/special_n.rs b/fighters/shulk/src/status/special_n.rs index f042ef6493..c948d30e0a 100644 --- a/fighters/shulk/src/status/special_n.rs +++ b/fighters/shulk/src/status/special_n.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_N + +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let beat = VarModule::is_flag(fighter.battle_object, vars::shulk::status::MONADO_BEAT); StatusModule::init_settings( @@ -33,8 +34,6 @@ unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -pub fn install() { - smashline::Agent::new("shulk") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, shulk_special_n_pre) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); } \ No newline at end of file diff --git a/fighters/shulk/src/status/special_s.rs b/fighters/shulk/src/status/special_s.rs index 6443156190..5d6798f766 100644 --- a/fighters/shulk/src/status/special_s.rs +++ b/fighters/shulk/src/status/special_s.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn shulk_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_S + +unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -29,7 +30,7 @@ unsafe extern "C" fn shulk_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -unsafe extern "C" fn shulk_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); } @@ -38,10 +39,10 @@ unsafe extern "C" fn shulk_special_s_main(fighter: &mut L2CFighterCommon) -> L2C } VarModule::on_flag(fighter.object(), vars::shulk::instance::DISABLE_SPECIAL_S); VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); - fighter.sub_shift_status_main(L2CValue::Ptr(shulk_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn shulk_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -145,9 +146,7 @@ unsafe extern "C" fn shulk_special_s_main_loop(fighter: &mut L2CFighterCommon) - return 0.into(); } -pub fn install() { - smashline::Agent::new("shulk") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_pre,) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/shulk/src/vtable_hook.rs b/fighters/shulk/src/vtable_hook.rs index 61f23ba119..55544bb08d 100644 --- a/fighters/shulk/src/vtable_hook.rs +++ b/fighters/shulk/src/vtable_hook.rs @@ -73,7 +73,7 @@ pub unsafe extern "C" fn shulk_check_valid_arts_statuses(fighter: &mut Fighter) } } -pub fn install() { +pub fn install(agent: &mut Agent) { skyline::install_hooks!( shulk_check_valid_arts_statuses, ); diff --git a/fighters/simon/src/acmd/aerials.rs b/fighters/simon/src/acmd/aerials.rs index e44fbf2c2e..4153418e4c 100644 --- a/fighters/simon/src/acmd/aerials.rs +++ b/fighters/simon/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn simon_attack_air_n_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 6.0); @@ -37,30 +36,7 @@ unsafe extern "C" fn simon_attack_air_n_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_whip_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 7.0); - FT_DESIRED_RATE(fighter, 25.0-7.0, 10.0); - frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 29.0); - FT_DESIRED_RATE(fighter, 43.0-29.0, 19.0); - -} - -unsafe extern "C" fn simon_whip_landing_air_n_game(fighter: &mut L2CAgentBase) { - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -78,9 +54,9 @@ unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { frame(lua_state, 16.0); FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 23.0, 39.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 10.0, 7.0, Some(0.0), Some(23.0), Some(39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 10.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 8.0, 41.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 8.0, 7.0, Some(0.0), Some(8.0), Some(41.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 8.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); if is_excute(fighter) { @@ -96,31 +72,9 @@ unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn simon_whip_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - } -unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairfhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -138,9 +92,9 @@ unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { frame(lua_state, 16.0); FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 8.0, 41.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 8.0, 7.0, Some(0.0), Some(8.0), Some(41.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 8.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 23.0, 39.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 10.0, 7.0, Some(0.0), Some(23.0), Some(39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 10.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); if is_excute(fighter) { @@ -156,31 +110,9 @@ unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn simon_whip_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - } -unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairflw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -216,31 +148,9 @@ unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_whip_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -259,9 +169,9 @@ unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_CLIFF_RAY_CHECK); WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LASSO_FLAG_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 70, 0, 65, 2.4, 0.0, 23.0, -39.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 75, 0, 65, 2.4, 0.0, 10.0, -7.0, Some(0.0), Some(23.0), Some(-39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 45, 75, 0, 65, 5.5, 0.0, 10.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 70, 0, 65, 2.4, 0.0, 8.0, -40.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 75, 0, 65, 2.4, 0.0, 8.0, -7.0, Some(0.0), Some(8.0), Some(-40.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 75, 0, 65, 5.5, 0.0, 8.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); if is_excute(fighter) { @@ -271,27 +181,9 @@ unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn simon_whip_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - } -unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairbhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -310,9 +202,9 @@ unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_CLIFF_RAY_CHECK); WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LASSO_FLAG_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 70, 0, 65, 2.4, 0.0, 8.0, -40.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 75, 0, 65, 2.4, 0.0, 8.0, -7.0, Some(0.0), Some(8.0), Some(-40.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 75, 0, 65, 5.5, 0.0, 8.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 70, 0, 65, 2.4, 0.0, 23.0, -39.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 75, 0, 65, 2.4, 0.0, 10.0, -7.0, Some(0.0), Some(23.0), Some(-39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 45, 75, 0, 65, 5.5, 0.0, 10.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); if is_excute(fighter) { @@ -322,27 +214,9 @@ unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_whip_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - -unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairblw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -373,27 +247,9 @@ unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_whip_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - -unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -423,27 +279,9 @@ unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn simon_whip_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 15.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - } -unsafe extern "C" fn simon_attack_air_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -492,7 +330,7 @@ unsafe extern "C" fn simon_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_air_lw2_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); FT_MOTION_RATE(fighter, 0.75); @@ -508,28 +346,19 @@ unsafe extern "C" fn simon_attack_air_lw2_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("simon_whip") - .acmd("game_attackairn", simon_whip_attack_air_n_game) - .acmd("game_landingairn", simon_whip_landing_air_n_game) - .acmd("game_attackairfhi", simon_whip_attack_air_f_hi_game) - .acmd("game_attackairf", simon_whip_attack_air_f_game) - .acmd("game_attackairflw", simon_whip_attack_air_f_lw_game) - .acmd("game_attackairbhi", simon_whip_attack_air_b_hi_game) - .acmd("game_attackairb", simon_whip_attack_air_b_game) - .acmd("game_attackairblw", simon_whip_attack_air_b_lw_game) - .acmd("game_attackairhi", simon_whip_attack_air_hi_game) - .install(); - smashline::Agent::new("simon") - .acmd("game_attackairn", simon_attack_air_n_game) - .acmd("game_attackairfhi", simon_attack_air_f_hi_game) - .acmd("game_attackairf", simon_attack_air_f_game) - .acmd("game_attackairflw", simon_attack_air_f_lw_game) - .acmd("game_attackairbhi", simon_attack_air_b_hi_game) - .acmd("game_attackairb", simon_attack_air_b_game) - .acmd("game_attackairblw", simon_attack_air_b_lw_game) - .acmd("game_attackairhi", simon_attack_air_hi_game) - .acmd("game_attackairlw", simon_attack_air_lw_game) - .acmd("game_attackairlw2", simon_attack_air_lw2_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairfhi", game_attackairfhi); + agent.acmd("game_attackairflw", game_attackairflw); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairbhi", game_attackairbhi); + agent.acmd("game_attackairblw", game_attackairblw); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw2", game_attackairlw2); } diff --git a/fighters/simon/src/acmd/ground.rs b/fighters/simon/src/acmd/ground.rs index 3b8e994357..5bc7294e2a 100644 --- a/fighters/simon/src/acmd/ground.rs +++ b/fighters/simon/src/acmd/ground.rs @@ -1,154 +1,150 @@ - use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 5.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 5.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 11.5, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 11.5, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_down_only(boma, 4, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); // Jab lock hitbox - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 13.0, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 13.0, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_down_only(boma, 5, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); - - } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 50, 95, 0, 40, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 50, 95, 0, 40, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 50, 80, 0, 35, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 50, 80, 0, 35, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, -3.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, -3.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - FLASH(fighter, 1.0, 1.0, 1.0, 0.3); + if is_excute(agent) { + FLASH(agent, 1.0, 1.0, 1.0, 0.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9.1, 2.4, 0, 180, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9.1, 2.4, 0, 180, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + COL_NORMAL(agent); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -3.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -3.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 11.8, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 11.8, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_simon_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_simon_rnd_attack")); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn expression_attackdash(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_attackdash(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); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .acmd("effect_attackdash", effect_attackdash) - .acmd("sound_attackdash", sound_attackdash) - .acmd("expression_attackdash", expression_attackdash) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/mod.rs b/fighters/simon/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/simon/src/acmd/mod.rs +++ b/fighters/simon/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/other.rs b/fighters/simon/src/acmd/other.rs index 4d695a1e9a..ec863d050c 100644 --- a/fighters/simon/src/acmd/other.rs +++ b/fighters/simon/src/acmd/other.rs @@ -1,197 +1,108 @@ - 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_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_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(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_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_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 !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_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_simon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_simon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); - PLAY_SE(fighter, Hash40::new("se_simon_whip_chain")); + PLAY_SE(agent, Hash40::new("se_simon_whip_chain")); } } -unsafe extern "C" fn simon_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, 11.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 simon_axe_fly_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("axe"), 8.0, 100, 60, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 8, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - -} - -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("simon_axe") - .acmd("game_fly", simon_axe_fly_game) - .install(); - smashline::Agent::new("simon") - .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", simon_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_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); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/smashes.rs b/fighters/simon/src/acmd/smashes.rs index 64dd4553a7..9f99a0f512 100644 --- a/fighters/simon/src/acmd/smashes.rs +++ b/fighters/simon/src/acmd/smashes.rs @@ -1,198 +1,143 @@ - use super::*; -unsafe extern "C" fn simon_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.0, 0.0, 6.5, 17.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 4.5, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 3.0, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 2.0, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 1.0, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.0, 0.0, 6.5, 17.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 4.5, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 3.0, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 2.0, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 1.0, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.2); + FT_MOTION_RATE(agent, 0.2); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SIMON_WHIP, *ATTACK_REGION_WHIP); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 90, 88, 0, 61, 3.1, 0.0, 52.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 90, 79, 0, 60, 3.1, 0.0, 18.0, 2.0, Some(0.0), Some(52.0), Some(2.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 90, 88, 0, 61, 3.1, 0.0, 52.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 90, 79, 0, 60, 3.1, 0.0, 18.0, 2.0, Some(0.0), Some(52.0), Some(2.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_whip_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(fighter, 0.2); - frame(lua_state, 2.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1); - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 19.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 52.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - -} - -unsafe extern "C" fn simon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, 20.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, 30.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, 20.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, 30.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, -6.2, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, -14.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, -23.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, -6.2, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, -14.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, -23.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_whip_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_attacks4hi", simon_attack_s4_hi_game) - .acmd("game_attacks4", simon_attack_s4_s_game) - .acmd("game_attacks4lw", simon_attack_s4_lw_game) - .acmd("game_attackhi4", simon_attack_hi4_game) - .acmd("game_attacklw4", simon_attack_lw4_game) - .install(); - smashline::Agent::new("simon_whip") - .acmd("game_attackhi4", simon_whip_attack_hi4_game) - .acmd("game_attacklw4", simon_whip_attack_lw4_game) - .install(); -} + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/specials.rs b/fighters/simon/src/acmd/specials.rs index 723b4a68ae..de2d4d25e5 100644 --- a/fighters/simon/src/acmd/specials.rs +++ b/fighters/simon/src/acmd/specials.rs @@ -1,120 +1,69 @@ - use super::*; -unsafe extern "C" fn simon_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - boma.select_cliff_hangdata_from_name("special_hi"); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 1, Hash40::new("top"), 6.0, 61, 92, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + frame(lua_state, 30.0); + if is_excute(agent){ + ArticleModule::shoot(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); } - } -unsafe extern "C" fn simon_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 20.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); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 1, Hash40::new("top"), 6.0, 61, 95, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 6.0, 61, 95, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } - } -unsafe extern "C" fn simon_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); - } - frame(lua_state, 30.0); - if is_excute(fighter){ - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_specialhi", simon_special_hi_game) - .acmd("game_specialairhi", simon_special_air_hi_game) - .acmd("game_specialn", simon_special_n_game) - .acmd("game_specialairn", simon_special_n_game) - .install(); -} + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/throws.rs b/fighters/simon/src/acmd/throws.rs index 83b771da35..0fbd80f647 100644 --- a/fighters/simon/src/acmd/throws.rs +++ b/fighters/simon/src/acmd/throws.rs @@ -1,33 +1,32 @@ use super::*; -unsafe extern "C" fn simon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.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(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 simon_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -50,7 +49,7 @@ unsafe extern "C" fn simon_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -73,103 +72,105 @@ unsafe extern "C" fn simon_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 93, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 93, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 24, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 24, 7); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn simon_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 44, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 44, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 4); + CHECK_FINISH_CAMERA(agent, 20, 4); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 42.0, 21.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + FT_MOTION_RATE_RANGE(agent, 18.0, 42.0, 21.0); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn simon_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 84, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 84, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 89, 100, 0, 55, 2.0, 0.0, 23.0, 0.0, Some(0.0), Some(50.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 89, 100, 0, 55, 2.0, 0.0, 23.0, 0.0, Some(0.0), Some(50.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3, 34); + CHECK_FINISH_CAMERA(agent, 3, 34); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 65, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 65, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); - CHECK_FINISH_CAMERA(fighter, 5, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + CHECK_FINISH_CAMERA(agent, 5, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_catch", simon_catch_game) - .acmd("game_catchdash", simon_catch_dash_game) - .acmd("game_catchturn", simon_catch_turn_game) - .acmd("game_throwf", simon_throw_f_game) - .acmd("game_throwb", simon_throw_b_game) - .acmd("game_throwhi", simon_throw_hi_game) - .acmd("game_throwlw", simon_throw_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/tilts.rs b/fighters/simon/src/acmd/tilts.rs index 46d9691699..ae42e54085 100644 --- a/fighters/simon/src/acmd/tilts.rs +++ b/fighters/simon/src/acmd/tilts.rs @@ -1,69 +1,48 @@ use super::*; -unsafe extern "C" fn simon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 10.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 10.0, 7.0, Some(0.0), Some(10.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 10.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 10.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 10.0, 7.0, Some(0.0), Some(10.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 10.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_HOLD); } } -unsafe extern "C" fn simon_whip_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 11.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - -} - -unsafe extern "C" fn simon_attack_squat_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacksquats3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 7.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 7.0, 7.0, Some(0.0), Some(7.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 7.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 7.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 7.0, 7.0, Some(0.0), Some(7.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 7.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_squat_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -76,7 +55,7 @@ unsafe extern "C" fn simon_attack_squat_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_squat_s3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -92,7 +71,7 @@ unsafe extern "C" fn simon_attack_squat_s3_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_squat_s3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -108,112 +87,107 @@ unsafe extern "C" fn simon_attack_squat_s3_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn simon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, 3.5, Some(0.0), Some(26.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 3.5, 0.0, 17.5, 3.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 5.0, 0.0, 10.5, 2.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, 3.5, Some(0.0), Some(26.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 3.5, 0.0, 17.5, 3.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 5.0, 0.0, 10.5, 2.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::clear(boma, 2, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn simon_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn simon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(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) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 40, 20, 0, 65, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 6.0, 40, 20, 0, 55, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 40, 20, 0, 65, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 6.0, 40, 20, 0, 55, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn simon_attack_lw32_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_LW32_WORK_ID_FLAG_LANDING_AIR); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 60, 100, 0, 50, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 7.0, 60, 100, 0, 50, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 60, 100, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 60, 100, 0, 50, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 7.0, 60, 100, 0, 50, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 60, 100, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 50, 50, 0, 60, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 4.0, 50, 50, 0, 60, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 50, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 50, 50, 0, 60, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 4.0, 50, 50, 0, 60, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 50, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("simon_whip") - .acmd("game_attacks3", simon_whip_attack_s3_s_game) - .install(); - smashline::Agent::new("simon") - .acmd("game_attacks3", simon_attack_s3_s_game) - .acmd("game_attacksquats3", simon_attack_squat_s3_game) - .acmd("effect_attacksquats3", simon_attack_squat_s3_effect) - .acmd("sound_attacksquats3", simon_attack_squat_s3_sound) - .acmd("expression_attacksquats3", simon_attack_squat_s3_expression) - .acmd("game_attackhi3", simon_attack_hi3_game) - .acmd("expression_attackhi3", simon_attack_hi3_expression) - .acmd("game_attacklw3", simon_attack_lw3_game) - .acmd("game_attacklw32", simon_attack_lw32_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attacksquats3", game_attacksquats3); + agent.acmd("effect_attacksquats3", effect_attacksquats3); + agent.acmd("sound_attacksquats3", sound_attacksquats3); + agent.acmd("expression_attacksquats3", expression_attacksquats3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attacklw32", game_attacklw32); +} \ No newline at end of file diff --git a/fighters/simon/src/axe/acmd.rs b/fighters/simon/src/axe/acmd.rs new file mode 100644 index 0000000000..505fa00136 --- /dev/null +++ b/fighters/simon/src/axe/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("axe"), 8.0, 100, 60, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 8, 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_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/simon/src/axe/mod.rs b/fighters/simon/src/axe/mod.rs new file mode 100644 index 0000000000..d2afe262ac --- /dev/null +++ b/fighters/simon/src/axe/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("simon_axe"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/simon/src/lib.rs b/fighters/simon/src/lib.rs index 7bb0378152..c0cd3e961c 100644 --- a/fighters/simon/src/lib.rs +++ b/fighters/simon/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod axe; +mod whip; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("simon"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + axe::install(); + whip::install(); } diff --git a/fighters/simon/src/opff.rs b/fighters/simon/src/opff.rs index cfe6066a9b..6568c1fa88 100644 --- a/fighters/simon/src/opff.rs +++ b/fighters/simon/src/opff.rs @@ -125,8 +125,6 @@ pub unsafe fn simon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("simon") - .on_line(Main, simon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, simon_frame_wrapper); } diff --git a/fighters/simon/src/status/attacklw3.rs b/fighters/simon/src/status/attacklw3.rs index 69bd488b51..ad01cc77e9 100644 --- a/fighters/simon/src/status/attacklw3.rs +++ b/fighters/simon/src/status/attacklw3.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING @@ -37,12 +36,6 @@ unsafe extern "C" fn attack_lw32_landing_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("simon") - .status( - Main, - *FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING, - attack_lw32_landing_main, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING, attack_lw32_landing_main); +} \ No newline at end of file diff --git a/fighters/simon/src/status/attacks3.rs b/fighters/simon/src/status/attacks3.rs index d4b6291b6a..f2c29da302 100644 --- a/fighters/simon/src/status/attacks3.rs +++ b/fighters/simon/src/status/attacks3.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_S3 @@ -53,8 +52,6 @@ unsafe extern "C" fn attack_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("simon") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); +} \ No newline at end of file diff --git a/fighters/simon/src/status/mod.rs b/fighters/simon/src/status/mod.rs index edbba49031..c29711155a 100644 --- a/fighters/simon/src/status/mod.rs +++ b/fighters/simon/src/status/mod.rs @@ -1,9 +1,11 @@ use super::*; +use globals::*; +// status script import mod attacklw3; mod attacks3; -pub fn install() { - attacklw3::install(); - attacks3::install(); +pub fn install(agent: &mut Agent) { + attacklw3::install(agent); + attacks3::install(agent); } diff --git a/fighters/simon/src/whip/acmd.rs b/fighters/simon/src/whip/acmd.rs new file mode 100644 index 0000000000..fe7b929133 --- /dev/null +++ b/fighters/simon/src/whip/acmd.rs @@ -0,0 +1,165 @@ +use super::*; + +// tilts + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 11.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 23.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } +} + +// smashes + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.2); + frame(lua_state, 2.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 19.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 52.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); +} + +// aerials + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 7.0); + FT_DESIRED_RATE(agent, 25.0-7.0, 10.0); + frame(lua_state, 25.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 29.0); + FT_DESIRED_RATE(agent, 43.0-29.0, 19.0); +} + +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 16.0); + FT_DESIRED_RATE(agent, 18.0-16.0, 3.0); + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } +} + +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 15.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairfhi", game_attackairf); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairflw", game_attackairf); + + agent.acmd("game_attackairbhi", game_attackairb); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairblw", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); +} \ No newline at end of file diff --git a/fighters/simon/src/whip/mod.rs b/fighters/simon/src/whip/mod.rs new file mode 100644 index 0000000000..6843b9d849 --- /dev/null +++ b/fighters/simon/src/whip/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("simon_whip"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/aerials.rs b/fighters/snake/src/acmd/aerials.rs index 5215c8e102..5907eb70e9 100644 --- a/fighters/snake/src/acmd/aerials.rs +++ b/fighters/snake/src/acmd/aerials.rs @@ -1,255 +1,252 @@ use super::*; -unsafe extern "C" fn snake_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 3.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 35.0, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 10.0, 35.0, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.5, 38.0, 4.0); - if is_excute(fighter) { //move foot out - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 35.5, 38.0, 4.0); + if is_excute(agent) { //move foot out + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn snake_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.864); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.864); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 105, 0, 40, 4.7, 0.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 105, 0, 40, 4.7, 0.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn snake_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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 StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_PASS { GroundModule::set_passable_check(boma, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 3.5, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 3.5, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.0, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.0, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); if StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_PASS { GroundModule::set_passable_check(boma, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn snake_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 80, 70, 0, 35, 4.5, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 14.0, 80, 90, 0, 45, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 80, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 80, 70, 0, 35, 4.5, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 14.0, 80, 90, 0, 45, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 80, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -8.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -8.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn snake_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 80, 100, 35, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.5, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 80, 100, 35, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.5, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 275, 90, 0, 30, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 275, 150, 0, 50, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 275, 90, 0, 30, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 5.0, 275, 150, 0, 50, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 275, 90, 0, 30, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 275, 150, 0, 50, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 275, 90, 0, 30, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 5.0, 275, 150, 0, 50, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attackairn", snake_attack_air_n_game) - .acmd("game_attackairf", snake_attack_air_f_game) - .acmd("game_attackairb", snake_attack_air_b_game) - .acmd("game_attackairhi", snake_attack_air_hi_game) - .acmd("game_attackairlw", snake_attack_air_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/ground.rs b/fighters/snake/src/acmd/ground.rs index 4bd593fd81..3979c31479 100644 --- a/fighters/snake/src/acmd/ground.rs +++ b/fighters/snake/src/acmd/ground.rs @@ -1,100 +1,97 @@ - use super::*; -unsafe extern "C" fn snake_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.0, -1.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.25, 0.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 80, 60, 30, 5, 4.0, 0.0, 2.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 4.0, 88, 60, 30, 5, 4.0, 3.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 361, 20, 0, 20, 3.5, 0.0, 4.0, 11.5, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.0, -1.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.25, 0.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 80, 60, 30, 5, 4.0, 0.0, 2.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 4.0, 88, 60, 30, 5, 4.0, 3.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 361, 20, 0, 20, 3.5, 0.0, 4.0, 11.5, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn snake_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { KineticModule::add_speed(boma, &Vector3f::new(1.5, 0.0, 0.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 50, 60, 20, 0, 3.0, 1.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 50, 60, 20, 0, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 3.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 4.0, 10.0, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 50, 60, 20, 0, 3.0, 1.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 50, 60, 20, 0, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 3.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 4.0, 10.0, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn snake_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 361, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 361, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 55, 80, 0, 60, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 55, 80, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 55, 80, 0, 60, 3.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 55, 80, 0, 60, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 55, 80, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 55, 80, 0, 60, 3.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 110, 100, 0, 40, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 110, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 110, 100, 0, 40, 3.0, 0.0, 3.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 110, 100, 0, 40, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 110, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 110, 100, 0, 40, 3.0, 0.0, 3.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attack11", snake_attack_11_game) - .acmd("game_attack12", snake_attack_12_game) - .acmd("game_attack13", snake_attack_13_game) - .acmd("game_attackdash", snake_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/mod.rs b/fighters/snake/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/snake/src/acmd/mod.rs +++ b/fighters/snake/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index 8035bb5345..ed8bfb8c10 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -1,654 +1,234 @@ - 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_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_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(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_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_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_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); 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 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_snake_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_snake_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_snake_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_snake_step_left_m")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_snake_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_snake_step_right_m")); } } -unsafe extern "C" fn 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 snake_side_taunt_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealsr(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_win03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_win03")); } } -unsafe extern "C" fn snake_up_taunt_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealhir(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 2, 360/*angle*/, 10/*size*/, 1, 0, 12, 30, 30, 80); - // physics!(fighter, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 2, 360, 10, 1, 0, 12, 30, 30, 80); + // physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); } frame(lua_state, 30.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_appealhi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_appealhi")); } } -unsafe extern "C" fn snake_down_taunt_explode_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 80.0, 50.0); +unsafe extern "C" fn game_appealendexplode(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 80.0, 50.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0 ); ArticleModule::shoot(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); } frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); // SNAKE_C4_FLAG_IS_SHOWTIME[entry_id] = true; ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_EXPLOSION, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn snake_down_taunt_explode_exp(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_appealendexplode(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0 ); } frame(lua_state, 30.0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); frame(lua_state, 75.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 80.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn snake_down_taunt_explode_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealendexplode(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_appealend")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_appealend")); } frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l04")); - PLAY_SE(fighter, Hash40::new("se_snake_squat")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l04")); + PLAY_SE(agent, Hash40::new("se_snake_squat")); } - // frame(lua_state, 70.0); - // if is_excute(fighter) { - // } frame(lua_state, 75.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l05")); } } -unsafe extern "C" fn snake_down_taunt_explode_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appealendexplode(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 75.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn snake_trenchmortar_bullet_impact_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - KineticModule::unable_energy(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_KINETIC_ENERGY_ID_GRAVITY); - VisibilityModule::set_int64(boma, hash40("main") as i64, hash40("impact") as i64); - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_STATUS_FLAG_ENABLE_ADVANCE_STATUS); - } -} - -unsafe extern "C" fn snake_c4_target_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - if VarModule::is_flag(fighter.object(), vars::snake::instance::SELF_STICK) { - SEARCH(fighter, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - else { - SEARCH(fighter, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn snake_c4_stick_other_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); - } - for _ in 0..5 { - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - } - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - for _ in 0..10 { - wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - } - wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); - } -} - -unsafe extern "C" fn snake_c4_stick_target_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - - } -} - -unsafe extern "C" fn snake_c4_stick_target_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); - } - wait(lua_state, 60.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND(fighter, Hash40::new("snake_final_lockon_ready"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_final_lockon_ready2"), false, false); - } - wait(lua_state, 90.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - for _ in 0..4 { - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - for _ in 0..10 { - wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - } - wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); - } -} - -unsafe extern "C" fn snake_c4_stick_target_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_C3){ - PLAY_SE(fighter, Hash40::new("se_snake_special_l08")); - } - else{ - PLAY_SE(fighter, Hash40::new("se_snake_special_l03")); - } - PLAY_SE(fighter, Hash40::new("se_snake_final02")); - } -} - -unsafe extern "C" fn snake_c4_explosion_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - // Hitbox for opponents - ATTACK(fighter, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - // Snake-only hitbox - ATTACK(fighter, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - VisibilityModule::set_whole(boma, false); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 17.0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - if !WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ - AttackModule::clear_all(boma); - } - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ - 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); } } -//tranq gun - -unsafe extern "C" fn snake_tranq_gun_start_snd(fighter : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_gun_shoot_snd(fighter : &mut L2CAgentBase) { -} - -//tranq dart - -unsafe extern "C" fn snake_tranq_dart_fly_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn snake_tranq_dart_fly_snd(fighter : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_dart_fly_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); - // LAST_PARTICLE_SET_COLOR(fighter, 0.6, 0.6, 2.8); - LAST_PARTICLE_SET_COLOR(fighter, 2.5, 2.5, 0.0); - LAST_EFFECT_SET_RATE(fighter, 0.001); - - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - } - for _ in 0..5 { - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke2"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke3"), true, true); - } - wait(lua_state, 5.0); - } -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} -unsafe extern "C" fn snake_tranq_dart_fall_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - } -} - -unsafe extern "C" fn snake_tranq_dart_explode_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"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); - } -} - -unsafe extern "C" fn snake_tranq_dart_fall_explode_game(fighter : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_dart_explode_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let sfx = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); - } -} - -unsafe extern "C" fn snake_tranq_dart_explode_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} +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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("expression_appealsr", stub); + agent.acmd("expression_appealsl", stub); + agent.acmd("expression_appealhir", stub); + agent.acmd("expression_appealhil", stub); + + agent.acmd("sound_appealsr", sound_appealsr); + agent.acmd("sound_appealhir", sound_appealhir); -unsafe extern "C" fn snake_tranq_dart_land_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); - } -} -//// + agent.acmd("game_appealendexplode", game_appealendexplode); + agent.acmd("effect_appealendexplode", effect_appealendexplode); + agent.acmd("sound_appealendexplode", sound_appealendexplode); + agent.acmd("expression_appealendexplode", expression_appealendexplode); -pub fn install() { - smashline::Agent::new("snake") - .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("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appealsr", snake_side_taunt_snd) - .acmd("sound_appealhir", snake_up_taunt_snd) - .acmd("game_appealendexplode", snake_down_taunt_explode_game) - .acmd("expression_appealendexplode", snake_down_taunt_explode_exp) - .acmd("sound_appealendexplode", snake_down_taunt_explode_snd) - .acmd("effect_appealendexplode", snake_down_taunt_explode_eff) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("snake_c4") - .acmd("game_establishtarget", snake_c4_target_game) - .acmd("effect_stickother", snake_c4_stick_other_effect) - .acmd("game_sticktarget", snake_c4_stick_target_game) - .acmd("effect_sticktarget", snake_c4_stick_target_effect) - .acmd("sound_sticktarget", snake_c4_stick_target_sound) - .acmd("game_explosion", snake_c4_explosion_game) - .install(); - smashline::Agent::new("snake_nikita") - .acmd("sound_start", snake_tranq_gun_start_snd) - .acmd("sound_shoot", snake_tranq_gun_shoot_snd) - .install(); - smashline::Agent::new("snake_nikitamissile") - .acmd("game_fly", snake_tranq_dart_fly_game) - .acmd("game_flyattackcommon", snake_tranq_dart_fly_game) - .acmd("game_stopfall", snake_tranq_dart_fly_game) - .acmd("sound_fly", snake_tranq_dart_fly_snd) - .acmd("sound_stopfall", snake_tranq_dart_fly_snd) - .acmd("effect_fly", snake_tranq_dart_fly_eff) - .acmd("effect_stopfall", snake_tranq_dart_fall_eff) - .acmd("game_explosion", snake_tranq_dart_explode_game) - .acmd("game_fallexplosion", snake_tranq_dart_fall_explode_game) - .acmd("game_hiexplosion", snake_tranq_dart_fall_explode_game) - .acmd("sound_explosion", snake_tranq_dart_explode_snd) - .acmd("sound_fallexplosion", snake_tranq_dart_explode_snd) - .acmd("sound_hiexplosion", snake_tranq_dart_explode_snd) - .acmd("effect_explosion", snake_tranq_dart_explode_eff) - .acmd("effect_hiexplosion", snake_tranq_dart_explode_eff) - .acmd("effect_fallexplosion", snake_tranq_dart_land_eff) - .install(); - smashline::Agent::new("snake_trenchmortar") - .acmd("game_impact", snake_trenchmortar_bullet_impact_game) - .install(); -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/smashes.rs b/fighters/snake/src/acmd/smashes.rs index 683c51188e..9670cea08a 100644 --- a/fighters/snake/src/acmd/smashes.rs +++ b/fighters/snake/src/acmd/smashes.rs @@ -1,425 +1,415 @@ use super::*; -//first hit +unsafe extern "C" fn effect_attacks4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 5.0); + for _ in 0..34 { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); + } + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + } + } +} -unsafe extern "C" fn snake_side_smash_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - FT_DESIRED_RATE(fighter, 14.0, 10.0); + FT_DESIRED_RATE(agent, 14.0, 10.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, false, 0); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 361, 25, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 170, 20, 0, 25, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 361, 25, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 170, 20, 0, 25, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 15, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(9.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 15, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(9.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - VarModule::on_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + VarModule::on_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); } frame(lua_state, 38.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); +unsafe extern "C" fn effect_attacks4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 53.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); - } - frame(lua_state, 17.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, true); +unsafe extern "C" fn expression_attacks4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 21.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } -} - -//charge - -unsafe extern "C" fn snake_side_smash_charge_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - frame(lua_state, 5.0); - for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); - } + frame(lua_state, 16.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -//second hit - -unsafe extern "C" fn snake_side_smash_2_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn game_attacks4s2(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.5); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //fake/empty hitboxes to create particle effects - ATTACK(fighter, 2, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - VarModule::on_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + VarModule::on_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 34.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); // WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_2_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn effect_attacks4s2(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); + frame(lua_state, 9.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_2_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn sound_attacks4s2(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 49.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_2_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); +unsafe extern "C" fn expression_attacks4s2(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 9.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, true); + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } - frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); + frame(lua_state, 8.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -//third hit - -unsafe extern "C" fn snake_side_smash_3_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn game_attacks4s3(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.5); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_3_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } +unsafe extern "C" fn effect_attacks4s3(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } - frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + frame(lua_state, 10.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_3_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn sound_attacks4s3(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 38.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_3_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn expression_attacks4s3(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } - frame(lua_state, 10.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, true); + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } - frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); +} + +unsafe extern "C" fn effect_attacklw4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 5.0); + for _ in 0..34 { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); + } + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + } } } -////changed down-smash to spinning double kick +unsafe extern "C" fn expression_attacklw4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, 0); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, 0); + } +} -unsafe extern "C" fn snake_down_smash_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 25, 87, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 25, 87, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 25, 87, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 25, 87, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 25, 87, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 25, 87, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_DESIRED_RATE(fighter, 19.0, 13.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 19.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 14.0, 20, 88, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 20, 88, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 20, 88, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 14.0, 20, 88, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 20, 88, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 20, 88, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_down_smash_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack_smash_l")); - PLAY_SE(fighter, Hash40::new("se_snake_smash_l01")); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); - // PLAY_SE(fighter, Hash40::new("vc_snake_attack04")); - // PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack_smash_s")); - PLAY_SE(fighter, Hash40::new("se_snake_smash_l02")); - } -} - -unsafe extern "C" fn snake_down_smash_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - // EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 13, -1, 35, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 5, 7, 9, 10, -70, 6, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + // EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 13, -1, 35, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 5, 7, 9, 10, -70, 6, 1, true); } // frame(lua_state, 13.0); - // if is_excute(fighter) { - // EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, 17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + // if is_excute(agent) { + // EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, 17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); // } frame(lua_state, 33.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, 14, -180, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, 14, -180, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, -17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, -17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); } } -//charge - -unsafe extern "C" fn snake_down_smash_charge_exp(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - physics!(fighter, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, 0); +unsafe extern "C" fn sound_attacklw4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } - frame(lua_state, 60.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, 0); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_l")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l01")); } -} - -unsafe extern "C" fn snake_down_smash_charge_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - frame(lua_state, 5.0); - for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); - } + frame(lua_state, 31.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); + // PLAY_SE(agent, Hash40::new("vc_snake_attack04")); + // PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_s")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l02")); } } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attacks4", snake_side_smash_game) - .acmd("expression_attacks4", snake_side_smash_expr) - .acmd("sound_attacks4", snake_side_smash_snd) - .acmd("effect_attacks4", snake_side_smash_eff) - .acmd("effect_attacks4charge", snake_side_smash_charge_eff) - .acmd("game_attacks4s2", snake_side_smash_2_game) - .acmd("expression_attacks4s2", snake_side_smash_2_expr) - .acmd("sound_attacks4s2", snake_side_smash_2_snd) - .acmd("effect_attacks4s2", snake_side_smash_2_eff) - .acmd("game_attacks4s3", snake_side_smash_3_game) - .acmd("expression_attacks4s3", snake_side_smash_3_expr) - .acmd("sound_attacks4s3", snake_side_smash_3_snd) - .acmd("effect_attacks4s3", snake_side_smash_3_eff) - .acmd("game_attacklw4", snake_down_smash_game) - .acmd("sound_attacklw4", snake_down_smash_snd) - .acmd("effect_attacklw4", snake_down_smash_eff) - .acmd("expression_attacklw4charge", snake_down_smash_charge_exp) - .acmd("effect_attacklw4charge", snake_down_smash_charge_eff) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4s2", game_attacks4s2); + agent.acmd("effect_attacks4s2", effect_attacks4s2); + agent.acmd("sound_attacks4s2", sound_attacks4s2); + agent.acmd("expression_attacks4s2", expression_attacks4s2); + + agent.acmd("game_attacks4s3", game_attacks4s3); + agent.acmd("effect_attacks4s3", effect_attacks4s3); + agent.acmd("sound_attacks4s3", sound_attacks4s3); + agent.acmd("expression_attacks4s3", expression_attacks4s3); + + agent.acmd("effect_attacklw4charge", effect_attacklw4charge); + agent.acmd("expression_attacklw4charge", expression_attacklw4charge); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/specials.rs b/fighters/snake/src/acmd/specials.rs index 60c96a784b..0367090446 100644 --- a/fighters/snake/src/acmd/specials.rs +++ b/fighters/snake/src/acmd/specials.rs @@ -1,144 +1,27 @@ - use super::*; use smash::app::lua_bind::ItemManager::get_num_of_active_item; -unsafe extern "C" fn snake_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn snake_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn snake_special_lw_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn snake_special_lw_squat_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn snake_special_air_lw_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -unsafe extern "C" fn snake_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || (ControlModule::get_stick_y(boma) >= 0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SENSORBOMB) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SENSORBOMB), 0, 0, false, false); } } } else if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || (ControlModule::get_stick_y(boma) <= -0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SMOKESCREEN) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SMOKESCREEN), 0, 0, false, false); } } @@ -151,308 +34,300 @@ unsafe extern "C" fn snake_special_n_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); - } - -} - -unsafe extern "C" fn snake_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - /* - if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || (ControlModule::get_stick_y(boma) >= 0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { - if(get_num_of_active_item(*ITEM_KIND_SENSORBOMB) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SENSORBOMB), 0, 0, false, false); - } - } - } - else if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || (ControlModule::get_stick_y(boma) <= -0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { - if(get_num_of_active_item(*ITEM_KIND_SMOKESCREEN) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SMOKESCREEN), 0, 0, false, false); - } - } - } - */ - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE, false, 0); - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, false, 0); - if(ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN)){ - ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 8.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN) { ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); - } - -} - -unsafe extern "C" fn game_specialairhihang(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_STICK); - } - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 89.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_TIME_OUT); - } -} - -unsafe extern "C" fn game_cypher_detach(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"), 6.0, 42, 17, 0, 63, 2.5, 0.0, 1.5, -3.2, Some(0.0), Some(1.5), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 3.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_KICK, *ATTACK_REGION_OBJECT); - } -} - -//new self-stick scripts - -unsafe extern "C" fn snake_down_special_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn snake_down_special_crouch_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); } } -unsafe extern "C" fn snake_down_special_air_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn snake_side_special_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - VarModule::off_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); +unsafe extern "C" fn game_specialsstart(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + VarModule::off_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 1.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 12.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 12.0); } - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, false, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Guard) { - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 16.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE_RANGE(fighter, 16.0, 38.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE_RANGE(agent, 16.0, 38.0, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - VarModule::inc_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + VarModule::inc_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT); ArticleModule::set_flag(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, true, *WEAPON_SNAKE_NIKITA_INSTANCE_WORK_ID_FLAG_SHOOT); - if VarModule::get_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT) == 3 { - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); + if VarModule::get_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT) == 3 { + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); } } } frame(lua_state, 38.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE_RANGE(fighter, 38.0, 64.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 38.0, 64.0, 1.0); } frame(lua_state, 64.0); - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 79.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - VarModule::set_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT, 0); - VarModule::off_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + VarModule::set_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT, 0); + VarModule::off_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 83.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_special_expr(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); - ItemModule::set_have_item_visibility(boma, false, 0); +unsafe extern "C" fn effect_specialsstart(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); } - frame(lua_state, 21.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + frame(lua_state, 16.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); + } + } + frame(lua_state, 24.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); + } + } + frame(lua_state, 25.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + EFFECT_FOLLOW(agent, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); } } } -unsafe extern "C" fn snake_side_special_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialsstart(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l05")) + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l05")) } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + PLAY_SE(agent, Hash40::new("se_snake_special_s01")); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - let sfx_handle = SoundModule::play_se(fighter.module_accessor, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 3.0, 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + let sfx_handle = SoundModule::play_se(boma, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 3.0, 0); } } frame(lua_state, 41.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s02")); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s03")); } frame(lua_state, 80.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s07")) + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s07")) } } -unsafe extern "C" fn snake_side_special_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); +unsafe extern "C" fn expression_specialsstart(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); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); + frame(lua_state, 21.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } } - frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); - } +} + +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } - frame(lua_state, 25.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); + frame(lua_state, 2.0); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_speciallwblast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 27.0); + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { + if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL)) { + WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } - frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_speciallwsquatblast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); + } + frame(lua_state, 1.0); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 27.0); + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { + if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { + WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairhihang(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); + } + frame(lua_state, 41.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_STICK); + } + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 89.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_TIME_OUT); + } } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_specialhistart", snake_special_hi_start_game) - .acmd("game_specialairhistart", snake_special_air_hi_start_game) - .acmd("game_speciallwblast", snake_special_lw_blast_game) - .acmd( - "game_speciallwsquatblast", - snake_special_lw_squat_blast_game, - ) - .acmd("game_specialairlwblast", snake_special_air_lw_blast_game) - .acmd("game_specialnstart", snake_special_n_start_game) - .acmd("game_specialairnstart", snake_special_air_n_start_game) - .acmd("game_specialairhihang", game_specialairhihang) - .acmd("game_speciallwselfstick", snake_down_special_floor) - .acmd( - "game_speciallwsquatselfstick", - snake_down_special_crouch_floor, - ) - .acmd("game_specialairlwselfstick", snake_down_special_air_floor) - .acmd("game_specialsstart", snake_side_special_game) - .acmd("game_specialairsstart", snake_side_special_game) - .acmd("expression_specialsstart", snake_side_special_expr) - .acmd("expression_specialairsstart", snake_side_special_expr) - .acmd("sound_specialsstart", snake_side_special_snd) - .acmd("sound_specialairsstart", snake_side_special_snd) - .acmd("effect_specialsstart", snake_side_special_eff) - .acmd("effect_specialairsstart", snake_side_special_eff) - .install(); - smashline::Agent::new("snake_cypher") - .acmd("game_detach", game_cypher_detach) - .install(); +unsafe extern "C" fn game_speciallwselfstick(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } + +unsafe extern "C" fn game_speciallwsquatselfstick(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("sound_specialsstart", sound_specialsstart); + agent.acmd("sound_specialairsstart", sound_specialsstart); + agent.acmd("expression_specialsstart", expression_specialsstart); + agent.acmd("expression_specialairsstart", expression_specialsstart); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialhistart); + agent.acmd("game_specialairhihang", game_specialairhihang); + + agent.acmd("game_speciallwblast", game_speciallwblast); + agent.acmd("game_specialairlwblast", game_speciallwblast); + agent.acmd("game_speciallwsquatblast", game_speciallwsquatblast); + + agent.acmd("game_speciallwselfstick", game_speciallwselfstick); + agent.acmd("game_specialairlwselfstick", game_speciallwselfstick); + agent.acmd("game_speciallwsquatselfstick", game_speciallwsquatselfstick); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/throws.rs b/fighters/snake/src/acmd/throws.rs index 61a61dff97..2ad9a9ac3d 100644 --- a/fighters/snake/src/acmd/throws.rs +++ b/fighters/snake/src/acmd/throws.rs @@ -1,79 +1,75 @@ - use super::*; -unsafe extern "C" fn snake_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 0.0, Some(0.0), Some(8.2), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 0.0, Some(0.0), Some(8.2), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 snake_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 7.0, Some(0.0), Some(8.2), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 7.0, Some(0.0), Some(8.2), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); } -unsafe extern "C" fn snake_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, -11.0, Some(0.0), Some(8.2), Some(-17.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, -11.0, Some(0.0), Some(8.2), Some(-17.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.43); + FT_MOTION_RATE(agent, 1.43); } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_catch", snake_catch_game) - .acmd("game_catchdash", snake_catch_dash_game) - .acmd("game_catchturn", snake_catch_turn_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/tilts.rs b/fighters/snake/src/acmd/tilts.rs index 357f153965..c102b8011a 100644 --- a/fighters/snake/src/acmd/tilts.rs +++ b/fighters/snake/src/acmd/tilts.rs @@ -1,127 +1,122 @@ - use super::*; -unsafe extern "C" fn snake_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 78, 10, 0, 42, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 65, 10, 0, 20, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 78, 10, 0, 42, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 65, 10, 0, 20, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 78, 10, 0, 42, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 65, 10, 0, 20, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 78, 10, 0, 42, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 65, 10, 0, 20, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); AttackModule::set_add_reaction_frame(boma, 3, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn snake_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(5.5-1.0)); } frame(lua_state, 5.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(6.0-5.5)); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 361, 100, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 90, 0, 50, 6.0, 0.0, 10.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(6.0-5.5)); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 361, 100, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 90, 0, 50, 6.0, 0.0, 10.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn snake_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 5.0, 4.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 5.0, 4.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn snake_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(3.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 11.0, 80, 73, 0, 50, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 85, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 11.0, 80, 73, 0, 50, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 85, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 14.0/(33.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 14.0/(33.0-13.0)); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attacks3", snake_attack_s3_s_game) - .acmd("game_attacks3s2", snake_attack_s3_s2_game) - .acmd("game_attackhi3", snake_attack_hi3_game) - .acmd("game_attacklw3", snake_attack_lw3_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3s2", game_attacks3s2); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); +} \ No newline at end of file diff --git a/fighters/snake/src/c4/acmd.rs b/fighters/snake/src/c4/acmd.rs new file mode 100644 index 0000000000..c1772245e2 --- /dev/null +++ b/fighters/snake/src/c4/acmd.rs @@ -0,0 +1,216 @@ +use super::*; + +unsafe extern "C" fn game_establishtarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + if VarModule::is_flag(agent.object(), vars::snake::instance::SELF_STICK) { + SEARCH(agent, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } + else { + SEARCH(agent, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } + } +} + +unsafe extern "C" fn effect_sticktarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); + } + wait(lua_state, 60.0); + if is_excute(agent) { + //EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready2"), false, false); + } + wait(lua_state, 90.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + for _ in 0..4 { + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + for _ in 0..10 { + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + } +} + +unsafe extern "C" fn sound_sticktarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_C3){ + PLAY_SE(agent, Hash40::new("se_snake_special_l08")); + } + else{ + PLAY_SE(agent, Hash40::new("se_snake_special_l03")); + } + PLAY_SE(agent, Hash40::new("se_snake_final02")); + } +} + +unsafe extern "C" fn effect_stickother(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); + } + for _ in 0..5 { + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + for _ in 0..10 { + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + } +} + +unsafe extern "C" fn game_explosion(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + // Hitbox for opponents + ATTACK(agent, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, 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_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + // Snake-only hitbox + ATTACK(agent, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + VisibilityModule::set_whole(boma, false); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); + } + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 17.0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ + AttackModule::clear_all(boma); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ + AttackModule::clear_all(boma); + } + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_establishtarget", game_establishtarget); + + agent.acmd("game_sticktarget", stub); + agent.acmd("effect_sticktarget", effect_sticktarget); + agent.acmd("sound_sticktarget", sound_sticktarget); + + agent.acmd("effect_stickother", effect_stickother); + + agent.acmd("game_explosion", game_explosion); +} \ No newline at end of file diff --git a/fighters/snake/src/c4/mod.rs b/fighters/snake/src/c4/mod.rs new file mode 100644 index 0000000000..54c4f7f17a --- /dev/null +++ b/fighters/snake/src/c4/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("snake_c4"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/c4/opff.rs b/fighters/snake/src/c4/opff.rs new file mode 100644 index 0000000000..51a887a8f7 --- /dev/null +++ b/fighters/snake/src/c4/opff.rs @@ -0,0 +1,21 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +unsafe extern "C" fn c4_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + if weapon.is_status(*WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let snake = utils::util::get_battle_object_from_id(owner_id); + let snake_boma = &mut *(*snake).module_accessor; + let snake_status_kind = StatusModule::status_kind(snake_boma); + // Despawn sticky when snake dies + if snake_status_kind == *FIGHTER_STATUS_KIND_DEAD { + ArticleModule::remove_exist(snake_boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, c4_callback); +} \ No newline at end of file diff --git a/fighters/snake/src/cypher/acmd.rs b/fighters/snake/src/cypher/acmd.rs new file mode 100644 index 0000000000..a192b37f1c --- /dev/null +++ b/fighters/snake/src/cypher/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_detach", stub); +} \ No newline at end of file diff --git a/fighters/snake/src/cypher/mod.rs b/fighters/snake/src/cypher/mod.rs new file mode 100644 index 0000000000..ff869df0d5 --- /dev/null +++ b/fighters/snake/src/cypher/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_cypher"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/lib.rs b/fighters/snake/src/lib.rs index d3bd76b48d..4bf54ab2ed 100644 --- a/fighters/snake/src/lib.rs +++ b/fighters/snake/src/lib.rs @@ -7,6 +7,14 @@ pub mod acmd; pub mod opff; pub mod status; +// articles + +mod c4; +mod cypher; +mod nikita; +mod nikitamissile; +mod trenchmortar; + use smash::{ lib::{ L2CValue, @@ -37,9 +45,18 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); -} + let agent = &mut Agent::new("snake"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + c4::install(); + cypher::install(); + nikita::install(); + nikitamissile::install(); + trenchmortar::install(); +} \ No newline at end of file diff --git a/fighters/snake/src/nikita/acmd.rs b/fighters/snake/src/nikita/acmd.rs new file mode 100644 index 0000000000..966bfbd640 --- /dev/null +++ b/fighters/snake/src/nikita/acmd.rs @@ -0,0 +1,8 @@ +use super::*; + +unsafe extern "C" fn stub(agent : &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_start", stub); + agent.acmd("sound_shoot", stub); +} \ No newline at end of file diff --git a/fighters/snake/src/nikita/mod.rs b/fighters/snake/src/nikita/mod.rs new file mode 100644 index 0000000000..7bf36d9bf4 --- /dev/null +++ b/fighters/snake/src/nikita/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_nikita"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/nikitamissile/acmd.rs b/fighters/snake/src/nikitamissile/acmd.rs new file mode 100644 index 0000000000..adaabed21d --- /dev/null +++ b/fighters/snake/src/nikitamissile/acmd.rs @@ -0,0 +1,99 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn effect_fly(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); + // LAST_PARTICLE_SET_COLOR(agent, 0.6, 0.6, 2.8); + LAST_PARTICLE_SET_COLOR(agent, 2.5, 2.5, 0.0); + LAST_EFFECT_SET_RATE(agent, 0.001); + + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + } + for _ in 0..5 { + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke2"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke3"), true, true); + } + wait(lua_state, 5.0); + } +} + +unsafe extern "C" fn effect_stopfall(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + } +} + +unsafe extern "C" fn game_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); + } +} + +unsafe extern "C" fn effect_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let sfx = SoundModule::play_se(boma, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); + } +} + +unsafe extern "C" fn effect_fallexplosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn stub(agent : &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flyattackcommon", game_fly); + + agent.acmd("game_fly", game_fly); + agent.acmd("effect_fly", effect_fly); + agent.acmd("sound_fly", stub); + + agent.acmd("game_stopfall", game_fly); + agent.acmd("effect_stopfall", effect_stopfall); + agent.acmd("sound_stopfall", stub); + + agent.acmd("game_explosion", game_explosion); + agent.acmd("effect_explosion", effect_explosion); + agent.acmd("sound_explosion", sound_explosion); + + agent.acmd("game_hiexplosion", stub); + agent.acmd("effect_hiexplosion", effect_explosion); + agent.acmd("sound_hiexplosion", sound_explosion); + + agent.acmd("game_fallexplosion", stub); + agent.acmd("effect_fallexplosion", effect_fallexplosion); + agent.acmd("sound_fallexplosion", sound_explosion); +} \ No newline at end of file diff --git a/fighters/snake/src/nikitamissile/mod.rs b/fighters/snake/src/nikitamissile/mod.rs new file mode 100644 index 0000000000..17dcc77f00 --- /dev/null +++ b/fighters/snake/src/nikitamissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_nikitamissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/opff.rs b/fighters/snake/src/opff.rs index bc33500656..47eafc3b36 100644 --- a/fighters/snake/src/opff.rs +++ b/fighters/snake/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - /*unsafe fn grab_walk(boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat2: i32) { if status_kind == *FIGHTER_STATUS_KIND_CATCH_WAIT { let motion_value = 0.65; @@ -53,6 +52,15 @@ unsafe fn fsmash_combo(boma: &mut BattleObjectModuleAccessor, status_kind: i32) } } +// freeze snake in place when using down taunt on the respawn platform +unsafe fn rebirth_box_handling(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if boma.is_status(*FIGHTER_STATUS_KIND_REBIRTH) + && boma.is_motion_one_of(&[Hash40::new("appeal_lw_l"), Hash40::new("appeal_lw_r")]) + && MotionModule::frame(boma) as i32 == 37 { + MotionModule::set_rate(boma, 0.0); + } +} + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -96,6 +104,7 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod fsmash_combo(boma, status_kind); grenade_counter_reset(boma, id, status_kind); fastfall_specials(fighter); + rebirth_box_handling(fighter, boma); } /*#[weapon_frame( agent = WEAPON_KIND_SNAKE_C4 )] @@ -126,24 +135,6 @@ pub unsafe fn snake_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -unsafe extern "C" fn c4_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - if weapon.kind() != WEAPON_KIND_SNAKE_C4 { - return - } - if weapon.is_status(*WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let snake = utils::util::get_battle_object_from_id(owner_id); - let snake_boma = &mut *(*snake).module_accessor; - let snake_status_kind = StatusModule::status_kind(snake_boma); - // Despawn sticky when snake dies - if snake_status_kind == *FIGHTER_STATUS_KIND_DEAD { - ArticleModule::remove_exist(snake_boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } -} -pub fn install() { - smashline::Agent::new("snake") - .on_line(Main, snake_frame_wrapper) - .on_line(Main, c4_callback) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.on_line(Main, snake_frame_wrapper); +} \ No newline at end of file diff --git a/fighters/snake/src/status/appeal.rs b/fighters/snake/src/status/appeal.rs index 0254d905b4..854e939b30 100644 --- a/fighters/snake/src/status/appeal.rs +++ b/fighters/snake/src/status/appeal.rs @@ -1,7 +1,5 @@ use super::*; -use globals::*; - //implimented function for checking if an article is "constrained" to snake extern "C" { #[link_name = "\u{1}_ZN3app24FighterSpecializer_Snake21is_constraint_articleERNS_7FighterEiNS_22ArticleOperationTargetE"] @@ -12,9 +10,10 @@ extern "C" { ) -> bool; } -////added new up-taunt and side-taunt +// FIGHTER_STATUS_KIND_APPEAL +// added new up-taunt and side-taunt -unsafe extern "C" fn snake_taunt_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); if ControlModule::get_command_flag_cat(fighter.module_accessor, 1) == *FIGHTER_PAD_CMD_CAT2_FLAG_APPEAL_HI { MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_hi_r"), 0.0, 1.0, false, 0.0, false, false); @@ -26,10 +25,11 @@ unsafe extern "C" fn snake_taunt_status_main(fighter: &mut L2CFighterCommon) -> else { MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_lw_r"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(snake_taunt_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_taunt_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn appeal_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() @@ -55,7 +55,7 @@ pub unsafe fn snake_taunt_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue return false.into() } -unsafe extern "C" fn snake_taunt_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[0xb].get_i32() != *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); @@ -68,9 +68,10 @@ unsafe extern "C" fn snake_taunt_status_end(fighter: &mut L2CFighterCommon) -> L return 0.into() } -//added down-taunt box walk and c4 place/explode +// FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT +// added down-taunt box walk and c4 place/explode -unsafe extern "C" fn snake_down_taunt_wait_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_wait"), 0.0, 1.0, false, 0.0, false, false); fighter.off_flag(*FIGHTER_SNAKE_STATUS_APPEAL_FLAG_EXIT); @@ -79,10 +80,11 @@ unsafe extern "C" fn snake_down_taunt_wait_status_main(fighter: &mut L2CFighterC let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE); VarModule::set_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT, 0); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_down_taunt_wait_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_wait_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_down_taunt_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn appeal_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if VarModule::get_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT) > 0 { VarModule::dec_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT); @@ -151,7 +153,7 @@ pub unsafe fn snake_down_taunt_wait_main_loop(fighter: &mut L2CFighterCommon) -> return false.into() } -unsafe extern "C" fn snake_down_taunt_wait_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_wait_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[0xb].get_i32() != *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); @@ -164,7 +166,9 @@ unsafe extern "C" fn snake_down_taunt_wait_status_end(fighter: &mut L2CFighterCo return 0.into() } -unsafe extern "C" fn snake_down_taunt_end_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SNAKE_STATUS_KIND_APPEAL_END + +unsafe extern "C" fn appeal_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if VarModule::is_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE) { VarModule::off_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE); @@ -174,10 +178,11 @@ unsafe extern "C" fn snake_down_taunt_end_status_main(fighter: &mut L2CFighterCo MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_end"), 0.0, 1.0, false, 0.0, false, false); } fighter.off_flag(*FIGHTER_SNAKE_STATUS_APPEAL_FLAG_EXIT); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_down_taunt_end_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_end_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_down_taunt_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn appeal_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() @@ -194,7 +199,7 @@ pub unsafe fn snake_down_taunt_end_main_loop(fighter: &mut L2CFighterCommon) -> return false.into() } -unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); let fighta : *mut Fighter = std::mem::transmute(object); @@ -205,29 +210,14 @@ unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCom ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); return 0.into() } -pub fn install() { - smashline::Agent::new("snake") - .status(Main, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_main) - .status(End, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_end) - .status( - Main, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, - snake_down_taunt_wait_status_main, - ) - .status( - End, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, - snake_down_taunt_wait_status_end, - ) - .status( - Main, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, - snake_down_taunt_end_status_main, - ) - .status( - End, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, - snake_down_taunt_end_status_end, - ) - .install(); -} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_APPEAL, appeal_main); + agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end); + + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, appeal_wait_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, appeal_wait_end); + + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, appeal_end_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, appeal_end_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/attack_s4.rs b/fighters/snake/src/status/attack_s4.rs index 8548062446..3f5e2f36e1 100644 --- a/fighters/snake/src/status/attack_s4.rs +++ b/fighters/snake/src/status/attack_s4.rs @@ -1,15 +1,15 @@ use super::*; -use globals::*; - + +// FIGHTER_STATUS_KIND_ATTACK_S4 ////changed rpg7 side-smash to multi-hit knife -unsafe extern "C" fn snake_side_smash_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4)(fighter) } -unsafe extern "C" fn snake_side_smash_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_IS_BUFFERED); @@ -17,17 +17,7 @@ unsafe extern "C" fn snake_side_smash_status_end(fighter: &mut L2CFighterCommon) smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4)(fighter) } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4, - snake_side_smash_status_main, - ) - .status( - End, - *FIGHTER_STATUS_KIND_ATTACK_S4, - snake_side_smash_status_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/catch.rs b/fighters/snake/src/status/catch.rs index b3ec60c94c..f9007c951c 100644 --- a/fighters/snake/src/status/catch.rs +++ b/fighters/snake/src/status/catch.rs @@ -1,23 +1,25 @@ use super::*; -use globals::*; - -////fixed unwanted buffered throws and walking +// FIGHTER_STATUS_KIND_CATCH_PULL +// fixed unwanted buffered throws and walking -unsafe extern "C" fn snake_grab_pull_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_pull_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_pull_main_loop as *const () as _)) // 0.into() } -unsafe extern "C" fn snake_grab_dash_pull_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_CATCH_DASH_PULL + +unsafe extern "C" fn catch_dash_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_pull_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_pull_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); @@ -65,12 +67,13 @@ pub unsafe fn snake_grab_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CVa return false.into() } -unsafe extern "C" fn snake_grab_attack_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_attack"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_attack_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_attack_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn catch_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); return true.into() @@ -128,7 +131,7 @@ pub unsafe fn snake_grab_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2C ////added grab walk -unsafe extern "C" fn snake_grab_wait_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; ControlModule::reset_trigger(fighter.module_accessor); if VarModule::is_flag(fighter.object(), vars::snake::instance::IS_GRAB_WALK) { @@ -146,10 +149,11 @@ unsafe extern "C" fn snake_grab_wait_status_main(fighter: &mut L2CFighterCommon) else { MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_wait"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_wait_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_wait_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn catch_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); @@ -204,38 +208,18 @@ pub unsafe fn snake_grab_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CVa return false.into() } -unsafe extern "C" fn snake_grab_wait_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_wait_end(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::IS_GRAB_WALK); smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_WAIT)(fighter) } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_PULL, - snake_grab_pull_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, - snake_grab_dash_pull_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_ATTACK, - snake_grab_attack_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - snake_grab_wait_status_main, - ) - .status( - End, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - snake_grab_wait_status_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, catch_dash_pull_main); + + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_main); + + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catch_wait_main); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_WAIT, catch_wait_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/mod.rs b/fighters/snake/src/status/mod.rs index ff13908a80..31319381ad 100644 --- a/fighters/snake/src/status/mod.rs +++ b/fighters/snake/src/status/mod.rs @@ -1,49 +1,17 @@ use super::*; +use globals::*; +// status script import mod appeal; mod attack_s4; mod catch; mod special_s; +mod rebirth; -unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("appeal_hi_l"), - hash40("appeal_hi_r"), - hash40("appeal_s_l"), - hash40("appeal_s_r"), - hash40("appeal_lw_l"), - hash40("appeal_lw_r") - ].contains(&mot) { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { - ArticleModule::remove(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - else { - let fighta = fighter.global_table[0x2].get_ptr() as *mut Fighter; - if FighterSpecializer_Snake::is_constraint_article( - fighta, - *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL) - ) & 1 != 0 { - ArticleModule::shoot( - fighter.module_accessor, - *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), - false - ); - } - } - fighter.status_end_Rebirth(); - 0.into() -} - -pub fn install() { - Agent::new("snake") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end) - .install(); - appeal::install(); - attack_s4::install(); - catch::install(); - special_s::install(); -} +pub fn install(agent: &mut Agent) { + appeal::install(agent); + attack_s4::install(agent); + catch::install(agent); + special_s::install(agent); + rebirth::install(agent); +} \ No newline at end of file diff --git a/fighters/snake/src/status/rebirth.rs b/fighters/snake/src/status/rebirth.rs new file mode 100644 index 0000000000..dc90f1d643 --- /dev/null +++ b/fighters/snake/src/status/rebirth.rs @@ -0,0 +1,20 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { + ArticleModule::shoot( + fighter.module_accessor, + *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, + ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), + false + ); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/special_s.rs b/fighters/snake/src/status/special_s.rs index fa5c191071..ff6647d0b8 100644 --- a/fighters/snake/src/status/special_s.rs +++ b/fighters/snake/src/status/special_s.rs @@ -1,10 +1,10 @@ use super::*; -use globals::*; - -////side-special tranq gun +// FIGHTER_STATUS_KIND_SPECIAL_S -unsafe extern "C" fn snake_side_special_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// side-special tranq gun + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { PostureModule::set_stick_lr(fighter.module_accessor, 0.0); PostureModule::update_rot_y_lr(fighter.module_accessor); fighter.set_int64(hash40("special_s_start") as i64, *FIGHTER_SNAKE_STATUS_WORK_INT_MOT_KIND); @@ -17,10 +17,11 @@ unsafe extern "C" fn snake_side_special_status_main(fighter: &mut L2CFighterComm KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_start"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(special_side_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) // 0.into() } -pub unsafe fn special_side_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if MotionModule::is_end(fighter.module_accessor) { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); @@ -64,12 +65,7 @@ pub unsafe fn change_motion_by_situation(fighter: &mut L2CFighterCommon, skip_ch MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_S, - snake_side_special_status_main, - ) - .install(); -} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); +} \ No newline at end of file diff --git a/fighters/snake/src/trenchmortar/acmd.rs b/fighters/snake/src/trenchmortar/acmd.rs new file mode 100644 index 0000000000..5f904ae58c --- /dev/null +++ b/fighters/snake/src/trenchmortar/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_impact(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + KineticModule::unable_energy(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_KINETIC_ENERGY_ID_GRAVITY); + VisibilityModule::set_int64(boma, hash40("main") as i64, hash40("impact") as i64); + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_STATUS_FLAG_ENABLE_ADVANCE_STATUS); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_impact", game_impact); +} \ No newline at end of file diff --git a/fighters/snake/src/trenchmortar/mod.rs b/fighters/snake/src/trenchmortar/mod.rs new file mode 100644 index 0000000000..9a9fae0a35 --- /dev/null +++ b/fighters/snake/src/trenchmortar/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_trenchmortar"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sonic/src/acmd/aerials.rs b/fighters/sonic/src/acmd/aerials.rs index 76d7a92baf..1f065ec804 100644 --- a/fighters/sonic/src/acmd/aerials.rs +++ b/fighters/sonic/src/acmd/aerials.rs @@ -1,318 +1,312 @@ - use super::*; -unsafe extern "C" fn sonic_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 105, 0, 15, 4.25, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 361, 105, 0, 15, 6.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 105, 0, 15, 4.25, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 361, 105, 0, 15, 6.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma,1,false); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 95, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 95, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 361, 100, 0, 25, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 361, 100, 0, 25, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 0.33); + FT_MOTION_RATE(agent, 0.33); frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sonic_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0/6.0); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0/6.0); frame(lua_state, 4.8); // effectively f4 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 11.0, 361, 90, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 11.0, 361, 90, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.6); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 11.0, 270, 52, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 11.0, 270, 85, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 11.0, 270, 52, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 11.0, 270, 85, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sonic_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.5, 1.0, 180, -150 , 90, 0.92, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.5, 1.0, 180, -150 , 90, 0.92, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 2); } - } -unsafe extern "C" fn sonic_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_l")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_sonic_attackair_f03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_sonic_attackair_f03")); } - } -unsafe extern "C" fn sonic_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 361, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 361, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 80, 0, 40, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 5.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 80, 0, 40, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 5.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sonic_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6.0, -4.0, 165, 65, 150, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6.0, -4.0, 165, 65, 150, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); } - } -unsafe extern "C" fn sonic_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0/(4.0-0.0)); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0/(4.0-0.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.333); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.333); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 5.0, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 5.0, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sonic_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7.5, 2.5, -10, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 7.5, -2.5, 190, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7.5, 2.5, -10, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 7.5, -2.5, 190, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), 0.85, 11.5, 0, 59, 74, 154, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), -0.95, 11.5, 0, 245, -77, 22, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), 0.85, 11.5, 0, 59, 74, 154, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), -0.95, 11.5, 0, 245, -77, 22, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 19.5, 0.0, 0, 0, 0, 1.55, 0, 0, 0, 0, 0, 361, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 19.5, 0.0, 0, 0, 0, 1.55, 0, 0, 0, 0, 0, 361, true); } - } -unsafe extern "C" fn sonic_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 10.0/(16.0-0.0)); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 10.0/(16.0-0.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 1.4, -4, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.4, -4, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 287, 76, 0, 13, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 37, 88, 0, 45, 4.1, 0.0, -0.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 287, 76, 0, 13, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 37, 88, 0, 45, 4.1, 0.0, -0.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 66, 0, 30, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 88, 0, 45, 4.1, 0.0, 1.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 66, 0, 30, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 88, 0, 45, 4.1, 0.0, 1.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 75, 0, 45, 4.3, -4.0, 6.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 75, 0, 45, 4.3, -4.0, 6.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 14.0/(49.0-33.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 14.0/(49.0-33.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attackairn", sonic_attack_air_n_game) - .acmd("game_attackairf", sonic_attack_air_f_game) - .acmd("effect_attackairf", sonic_attack_air_f_effect) - .acmd("sound_attackairf", sonic_attack_air_f_sound) - .acmd("expression_attackairf", sonic_attack_air_f_expression) - .acmd("game_attackairb", sonic_attack_air_b_game) - .acmd("effect_attackairb", sonic_attack_air_b_effect) - .acmd("game_attackairhi", sonic_attack_air_hi_game) - .acmd("effect_attackairhi", sonic_attack_air_hi_effect) - .acmd("expression_attackairhi", sonic_attack_air_hi_expression) - .acmd("game_attackairlw", sonic_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/sonic/src/acmd/ground.rs b/fighters/sonic/src/acmd/ground.rs index 61abce468c..92dc5227ab 100644 --- a/fighters/sonic/src/acmd/ground.rs +++ b/fighters/sonic/src/acmd/ground.rs @@ -1,197 +1,192 @@ - use super::*; -unsafe extern "C" fn sonic_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.0, 0.0, 7.0, 6.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 3.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.0, 0.0, 3.3, 8.0, Some(0.0), Some(3.3), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.0, 0.0, 7.0, 6.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 3.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.0, 0.0, 3.3, 8.0, Some(0.0), Some(3.3), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sonic_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/6.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 85, 25, 0, 20, 3.3, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 4.3, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 85, 25, 0, 20, 3.3, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 4.3, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn sonic_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("footl"), -6, -5, 0, 90, 180, 60, 0.7, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("footl"), -6, -5, 0, 90, 180, 60, 0.7, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 7.5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 7.5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn sonic_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 361, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 5.0, 5.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 361, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 5.0, 5.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn sonic_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("footr"), -7, 1.5, 0, 90, 180, -40, 0.8, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 8.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("footr"), -7, 1.5, 0, 90, 180, -40, 0.8, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 8.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn sonic_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/11.0); + FT_MOTION_RATE(agent, 8.0/11.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 20, 0, 3.0, 0.0, 6.0, 7.0, Some(0.0), Some(6.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 20, 0, 3.0, 0.0, 6.0, 7.0, Some(0.0), Some(6.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 15.0/(21.0 - 11.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 30, 0, 4.5, 1.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 15.0/(21.0 - 11.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 30, 0, 4.5, 1.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 55, 80, 0, 85, 4.0, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("head"), 6.0, 55, 80, 0, 85, 3.5, 2.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 55, 80, 0, 85, 4.0, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("head"), 6.0, 55, 80, 0, 85, 3.5, 2.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 48, 94, 0, 50, 3.6, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 48, 94, 0, 50, 3.6, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 38.0/(50.0 - 21.0)); + FT_MOTION_RATE(agent, 38.0/(50.0 - 21.0)); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sonic_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -5, 0, 180, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -5, 0, 180, 0, 1.0, true, *EF_FLIP_YZ); } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 3, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 3, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 16.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -10, -15, 0, 0, 1.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -10, -15, 0, 0, 1.3, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -1, 0, 10, 0, 0, 0, 1.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -1, 0, 10, 0, 0, 0, 1.4, true); } - } -unsafe extern "C" fn sonic_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_ll")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_l")); } - } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attack11", sonic_attack_11_game) - .acmd("game_attack12", sonic_attack_12_game) - .acmd("effect_attack12", sonic_attack_12_effect) - .acmd("game_attack13", sonic_attack_13_game) - .acmd("effect_attack13", sonic_attack_13_effect) - .acmd("game_attackdash", sonic_attack_dash_game) - .acmd("effect_attackdash", sonic_attack_dash_effect) - .acmd("sound_attackdash", sonic_attack_dash_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/sonic/src/acmd/mod.rs b/fighters/sonic/src/acmd/mod.rs index e2d01f3d67..d8a22387b4 100644 --- a/fighters/sonic/src/acmd/mod.rs +++ b/fighters/sonic/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/sonic/src/acmd/other.rs b/fighters/sonic/src/acmd/other.rs index 8b1ba1055b..d05f34c468 100644 --- a/fighters/sonic/src/acmd/other.rs +++ b/fighters/sonic/src/acmd/other.rs @@ -1,183 +1,106 @@ - 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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_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(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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_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_sonic_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_sonic_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, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sonic_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sonic_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sonic_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sonic_step_left_m")); } } -unsafe extern "C" fn sonic_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, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_SONIC_STATUS_DASH_FLAG_BRAKE_INCREASE); } - } -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); } } @@ -187,17 +110,18 @@ unsafe extern "C" fn expression_wait4(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("sonic") - .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", sonic_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("expression_wait4", expression_wait4) - .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("expression_wait4", expression_wait4); } diff --git a/fighters/sonic/src/acmd/smashes.rs b/fighters/sonic/src/acmd/smashes.rs index e063d79230..d96e2857ea 100644 --- a/fighters/sonic/src/acmd/smashes.rs +++ b/fighters/sonic/src/acmd/smashes.rs @@ -1,105 +1,147 @@ - use super::*; -unsafe extern "C" fn sonic_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 80, 100, 0, 27, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 16.0, 80, 100, 0, 27, 5.25, 3.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 80, 100, 0, 27, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 16.0, 80, 100, 0, 27, 5.25, 3.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 12.0, 361, 100, 0, 15, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 12.0, 361, 100, 0, 15, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 30.0/(42.0 - 17.0)); + FT_MOTION_RATE(agent, 30.0/(42.0 - 17.0)); + } +} + +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13, 0, 0, 50, 90, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + LAST_EFFECT_SET_RATE(agent, 2.0); + } + frame(lua_state, 27.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sonic_attack_hi4_expression(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 sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new_raw(0x13589f8893)); + } + frame(lua_state, 9.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("se_sonic_attackair_f03")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_sonic_attack06")); + PLAY_STATUS(agent, Hash40::new("se_sonic_smash_l01")); + //PLAY_SE(agent, Hash40::new("se_sonic_smash_h01")); + } + wait(lua_state, 27.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_landing02")); + } +} + +unsafe extern "C" fn expression_attackhi4(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); } frame(lua_state, 7.0); // make this the frame you can charge the attack sv_animcmd::execute(lua_state , 7.0); // make this the frame you can charge the attack - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitm"), @@ -109,165 +151,117 @@ unsafe extern "C" fn sonic_attack_hi4_expression(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/10.0); } - frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13, 0, 0, 50, 90, 1.2, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sonic_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new_raw(0x13589f8893)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(32.0 - 10.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 90, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("se_sonic_attackair_f03")); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 94, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_sonic_attack06")); - PLAY_STATUS(fighter, Hash40::new("se_sonic_smash_l01")); - //PLAY_SE(fighter, Hash40::new("se_sonic_smash_h01")); + frame(lua_state, 32.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 28.0/(54.0 - 32.0)); } - wait(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_landing02")); + frame(lua_state, 54.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sonic_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/10.0); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + frame(lua_state, 8.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(32.0 - 10.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 361, 90, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -4, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 94, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 28.0/(54.0 - 32.0)); + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, 2.5, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); } - frame(lua_state, 54.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -5.5, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn sonic_attack_lw4_expression(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_L); +unsafe extern "C" fn expression_attacklw4(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_L); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); } frame(lua_state, 52.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn sonic_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -4, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, 2.5, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -5.5, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attacks4hi", sonic_attack_s4_hi_game) - .acmd("game_attacks4", sonic_attack_s4_s_game) - .acmd("game_attacks4lw", sonic_attack_s4_lw_game) - .acmd("game_attackhi4", sonic_attack_hi4_game) - .acmd("expression_attackhi4", sonic_attack_hi4_expression) - .acmd("effect_attackhi4", sonic_attack_hi4_effect) - .acmd("sound_attackhi4", sonic_attack_hi4_sound) - .acmd("game_attacklw4", sonic_attack_lw4_game) - .acmd("expression_attacklw4", sonic_attack_lw4_expression) - .acmd("effect_attacklw4", sonic_attack_lw4_effect) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index 130adf3b80..e6784f6257 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -1,258 +1,289 @@ - use super::*; -unsafe extern "C" fn sonic_specialsbooststart(fighter: &mut L2CAgentBase) { - // FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specialnhomingstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK) { + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 40.0, 0.0, 10.0, 10.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); + } + } } -unsafe extern "C" fn sonic_specialsbooststart_snd(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); +unsafe extern "C" fn game_specialnhoming(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut bone_hash = match WorkModule::is_flag(boma, *FIGHTER_SONIC_STATUS_SPECIAL_N_HOMING_FLAG_IS_KIRBY){ + true => Hash40::new("rot"), + false => Hash40::new("hip") + }; + if is_excute(agent) { + JostleModule::set_status(boma, false); + FT_MOTION_RATE(agent, 0.013); + ATTACK(agent, 0, 0, bone_hash, 8.0, 80, 90, 0, 50, 5.0, 0.5, 1.5, 0.0, Some(0.5), Some(1.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::set_captured_same_time_attack(boma, 0, true); + AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn sonic_specialsbooststart_exp(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn sound_specialnhoming(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rng = app::sv_math::rand(smash::hash40("fighter"), 2); + let mut sound = ""; + if rng == 0 { sound = "vc_sonic_004"; } + else { sound = "vc_sonic_attack02"; } + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_sonic_rounddash")); + PLAY_SE(agent, Hash40::new(sound)); + PLAY_SE(agent, Hash40::new("se_sonic_special_n01")); } } -unsafe extern "C" fn sonic_specialsboost(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 1.0 / 3.0); - frame(fighter.lua_state_agent, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 45, 4.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - } - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 25, 120, 0, 50, 3.0, 0.0, 4.0, -0.5, Some(0.0), Some(9.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - VarModule::on_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_JUMP); - } - frame(fighter.lua_state_agent, 14.0); - FT_MOTION_RATE(fighter, 0.25); +unsafe extern "C" fn game_specialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.3); + } + frame(lua_state, 3.0); + if is_excute(agent) { + let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; + KineticModule::add_speed(boma, &temp); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } } -unsafe extern "C" fn sonic_specialsboost_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + UNABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::set_captured_same_time_attack(boma, 0, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); + ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 60, 60, 0, 80, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } + frame(lua_state, 34.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 39.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn game_specialsbooststart(agent: &mut L2CAgentBase) { + // FT_MOTION_RATE(agent, 0.75); +} + +unsafe extern "C" fn sound_specialsbooststart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); + } +} + +unsafe extern "C" fn expression_specialsbooststart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_specialsboost(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + FT_MOTION_RATE(agent, 1.0 / 3.0); + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 45, 4.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 25, 120, 0, 50, 3.0, 0.0, 4.0, -0.5, Some(0.0), Some(9.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_JUMP); + } + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 0.25); +} + +unsafe extern "C" fn effect_specialsboost(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_FOLLOW_NO_STOP(fighter, eff, Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1.25, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + EFFECT_FOLLOW_NO_STOP(agent, eff, Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1.25, true); + EffectModule::enable_sync_init_pos_last(boma); } } -unsafe extern "C" fn sonic_specialsboost_snd(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_special_s01")); +unsafe extern "C" fn sound_specialsboost(agent: &mut L2CAgentBase) { + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_special_s01")); } } -unsafe extern "C" fn sonic_specialsboost_exp(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); +unsafe extern "C" fn expression_specialsboost(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn sonic_specialsboostend(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 0.5); - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - frame(fighter.lua_state_agent, 8.0); - FT_MOTION_RATE(fighter, 1.6); +unsafe extern "C" fn game_specialsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.6); } -unsafe extern "C" fn sonic_specialsboostend_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn effect_specialsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_OFF_KIND(fighter, eff, false, false); + EFFECT_OFF_KIND(agent, eff, false, false); } for _ in 0..4 { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } - wait(fighter.lua_state_agent, 4.0); + wait(lua_state, 4.0); } } -unsafe extern "C" fn sonic_specialsboostend_snd(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_dash_stop")); +unsafe extern "C" fn sound_specialsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_dash_stop")); } } -unsafe extern "C" fn sonic_specialsboostend_exp(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialsboostend(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn sonic_specialairsboostend(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 0.8); - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - VarModule::on_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_CONTROL); +unsafe extern "C" fn game_specialairsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_CONTROL); } } -unsafe extern "C" fn sonic_specialairsboostend_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn effect_specialairsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_OFF_KIND(fighter, eff, false, false); + EFFECT_OFF_KIND(agent, eff, false, false); } } -unsafe extern "C" fn sonic_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::shoot_exist(boma, *FIGHTER_SONIC_GENERATE_ARTICLE_GIMMICKJUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 8.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 sonic_gimmick_jump_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"), 4.0, 90, 90, 0, 30, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn sonic_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for i in 1..50 { wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 1.0, 90, 0, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 90, 0, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn sonic_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, false); } - } -unsafe extern "C" fn sonic_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, false); } - -} - -unsafe extern "C" fn sonic_special_lw_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 60, 57, 0, 97, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter,0, 0.5); - AttackModule::set_captured_same_time_attack(boma, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_ATTACK_ID_DEFAULT, true); - AttackModule::set_attack_keep_rumble(boma, 0, true); - } } -unsafe extern "C" fn sonic_special_air_lw_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { JostleModule::set_status(boma, false); - UNABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 60, 106, 0, 55, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - AttackModule::set_captured_same_time_attack(boma, 0, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); - ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); - } - frame(lua_state, 34.0); - if is_excute(agent) { AttackModule::clear_all(boma); - } - frame(lua_state, 39.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn sonic_special_n_homing_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK) { - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 40.0, 0.0, 10.0, 10.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); - } - } -} - -unsafe extern "C" fn sonic_special_n_homing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - let mut bone_hash = match WorkModule::is_flag(boma, *FIGHTER_SONIC_STATUS_SPECIAL_N_HOMING_FLAG_IS_KIRBY){ - true => Hash40::new("rot"), - false => Hash40::new("hip") - }; - - - if is_excute(fighter) { - JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 0.013); - ATTACK(fighter, 0, 0, bone_hash, 8.0, 80, 90, 0, 50, 5.0, 0.5, 1.5, 0.0, Some(0.5), Some(1.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - AttackModule::set_captured_same_time_attack(boma, 0, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 60, 57, 0, 97, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent,0, 0.5); + AttackModule::set_captured_same_time_attack(boma, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_ATTACK_ID_DEFAULT, true); AttackModule::set_attack_keep_rumble(boma, 0, true); } - } -unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -261,17 +292,14 @@ unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { } frame(lua_state, 3.0); if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 60, 106, 0, 55, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_captured_same_time_attack(boma, 0, true); } frame(lua_state, 10.0); if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); + WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 60, 60, 0, 80, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); -} frame(lua_state, 34.0); if is_excute(agent) { AttackModule::clear_all(boma); @@ -282,90 +310,40 @@ unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sonic_special_n_homing_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rng = app::sv_math::rand(smash::hash40("fighter"), 2); - let mut sound = ""; - - if rng == 0 { sound = "vc_sonic_004"; } - else { sound = "vc_sonic_attack02"; } - - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_sonic_rounddash")); - PLAY_SE(fighter, Hash40::new(sound)); - PLAY_SE(fighter, Hash40::new("se_sonic_special_n01")); - } -} - -unsafe extern "C" fn sonic_special_n_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.3); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; - KineticModule::add_speed(boma, &temp); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn sonic_special_n_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sonic_special_n_landing(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_specialsbooststart", sonic_specialsbooststart) - .acmd("sound_specialsbooststart", sonic_specialsbooststart_snd) - .acmd( - "expression_specialsbooststart", - sonic_specialsbooststart_exp, - ) - .acmd("game_specialsboost", sonic_specialsboost) - .acmd("effect_specialsboost", sonic_specialsboost_eff) - .acmd("sound_specialsboost", sonic_specialsboost_snd) - .acmd("expression_specialsboost", sonic_specialsboost_exp) - .acmd("game_specialsboostend", sonic_specialsboostend) - .acmd("effect_specialsboostend", sonic_specialsboostend_eff) - .acmd("sound_specialsboostend", sonic_specialsboostend_snd) - .acmd("expression_specialsboostend", sonic_specialsboostend_exp) - .acmd("game_specialairsboostend", sonic_specialairsboostend) - .acmd("effect_specialairsboostend", sonic_specialairsboostend_eff) - .acmd("game_specialhi", sonic_special_hi_game) - .acmd("game_speciallwhold", sonic_special_lw_hold_game) - .acmd("game_specialairlwhold", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargehi", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargelw", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargemiddle", sonic_special_lw_hold_game) - .acmd("game_speciallwstart", sonic_special_lw_start_game) - .acmd("game_specialairlwstart", sonic_special_air_lw_start_game) - .game_acmd(0x1b07509826, sonic_special_lw_dash_game) - .game_acmd(0x195dc47911, sonic_special_air_lw_dash_game) - .acmd( - "game_specialnhomingstart", - sonic_special_n_homing_start_game, - ) - .acmd("game_specialnhoming", sonic_special_n_homing_game) - .game_acmd(0x195dc47911, hash_0x195dc47911) - .acmd("sound_specialnhoming", sonic_special_n_homing_sound) - .acmd("game_specialnhit", sonic_special_n_hit_game) - .acmd("effect_specialnhit", sonic_special_n_hit_effect) - .acmd("game_specialnlanding", sonic_special_n_landing) - .install(); - smashline::Agent::new("sonic_gimmickjump") - .acmd("game_fall", sonic_gimmick_jump_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnhomingstart", game_specialnhomingstart); + agent.acmd("game_specialnhoming", game_specialnhoming); + agent.acmd("sound_specialnhoming", sound_specialnhoming); + agent.acmd("game_specialnhit", game_specialnhit); + agent.acmd("effect_specialnhit", stub); + agent.acmd("game_specialnlanding", stub); + agent.game_acmd(0x195dc47911, hash_0x195dc47911); + + agent.acmd("game_specialsbooststart", game_specialsbooststart); + agent.acmd("sound_specialsbooststart", sound_specialsbooststart); + agent.acmd("expression_specialsbooststart", expression_specialsbooststart); + agent.acmd("game_specialsboost", game_specialsboost); + agent.acmd("effect_specialsboost", effect_specialsboost); + agent.acmd("sound_specialsboost", sound_specialsboost); + agent.acmd("expression_specialsboost", expression_specialsboost); + agent.acmd("game_specialsboostend", game_specialsboostend); + agent.acmd("effect_specialsboostend", effect_specialsboostend); + agent.acmd("sound_specialsboostend", sound_specialsboostend); + agent.acmd("expression_specialsboostend", expression_specialsboostend); + agent.acmd("game_specialairsboostend", game_specialairsboostend); + agent.acmd("effect_specialairsboostend", effect_specialairsboostend); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); + agent.acmd("game_speciallwholdchargehi", game_speciallwhold); + agent.acmd("game_speciallwholdchargelw", game_speciallwhold); + agent.acmd("game_speciallwholdchargemiddle", game_speciallwhold); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.game_acmd(0x1b07509826, game_speciallwdash); + agent.game_acmd(0x195dc47911, game_specialairlwdash); } diff --git a/fighters/sonic/src/acmd/throws.rs b/fighters/sonic/src/acmd/throws.rs index 6fd5f2adfa..4f7de24f2d 100644 --- a/fighters/sonic/src/acmd/throws.rs +++ b/fighters/sonic/src/acmd/throws.rs @@ -1,141 +1,138 @@ use super::*; -unsafe extern "C" fn sonic_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(7.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(7.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 8.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.22); - + FT_MOTION_RATE(agent, 1.22); } -unsafe extern "C" fn sonic_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.28); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.28); + 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 sonic_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 10.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { 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.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 12.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.125); - + FT_MOTION_RATE(agent, 1.125); } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 42.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 8); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 76, 60, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 76, 60, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 180, 0, 60, 5.0, 0.0, 11.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 180, 0, 60, 5.0, 0.0, 11.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 5, 4); + CHECK_FINISH_CAMERA(agent, 5, 4); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 20, 35, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.5, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 20, 35, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.5, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 45, 100, 0, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 100, 0, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 41.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 0, -5, 0); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 43.0);{ @@ -146,13 +143,14 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_catch", sonic_catch_game) - .acmd("game_catchdash", sonic_catch_dash_game) - .acmd("game_catchturn", sonic_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/sonic/src/acmd/tilts.rs b/fighters/sonic/src/acmd/tilts.rs index ce1ffe684a..5c32c2d58e 100644 --- a/fighters/sonic/src/acmd/tilts.rs +++ b/fighters/sonic/src/acmd/tilts.rs @@ -1,134 +1,133 @@ - use super::*; -unsafe extern "C" fn sonic_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 0, 1, -42, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 1, 1, -22, 0, 0, 1.1, true, *EF_FLIP_YZ); LAST_EFFECT_SET_COLOR(agent, 3, 0.7, 0.2); } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.2, 16.2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, 19.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn sonic_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 1, 1, -22, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 0, 1, -42, 0, 0, 1.1, true, *EF_FLIP_YZ); LAST_EFFECT_SET_COLOR(agent, 3, 0.7, 0.2); } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, 19.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.2, 16.2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn sonic_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -146,113 +145,113 @@ unsafe extern "C" fn sonic_attack_s3_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sonic_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 100, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 100, 100, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 106, 106, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } -} - -unsafe extern "C" fn sonic_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 5, 2, 2, 1, 5, 5, 0.925, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - - unsafe extern "C" fn sonic_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // ground only - ATTACK(fighter, 1, 0, Hash40::new("legr"), 2.0, 80, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.0, 80, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 2.0, 361, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 2.0, 80, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.0, 80, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 2.0, 361, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //air only - ATTACK(fighter, 4, 0, Hash40::new("legr"), 2.0, 366, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 2.0, 366, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneer"), 2.0, 366, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 2.0, 366, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 2.0, 366, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneer"), 2.0, 366, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 75, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.2, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 75, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.2, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } - unsafe extern "C" fn sonic_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 8, 4, 180, 325, 90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 8, 4, 180, 325, 90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.55); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 2, 8, -0.2, 180, 260, 90, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 2, 8, -0.2, 180, 260, 90, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), false, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), false, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attacks3hi", sonic_attack_s3_hi_game) - .acmd("effect_attacks3hi", sonic_attack_s3_hi_effect) - .acmd("game_attacks3", sonic_attack_s3_game) - .acmd("effect_attacks3", sonic_attack_s3_effect) - .acmd("game_attacks3lw", sonic_attack_s3_lw_game) - .acmd("effect_attacks3lw", sonic_attack_s3_lw_effect) - .acmd("game_attacklw3", sonic_attack_lw3_game) - .acmd("effect_attacklw3", sonic_attack_lw3_effect) - .acmd("game_attackhi3", sonic_attack_hi3_game) - .acmd("effect_attackhi3", sonic_attack_hi3_effect) - .install(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 100, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 100, 100, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 106, 106, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + JostleModule::set_status(boma, true); + } +} + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 5, 2, 2, 1, 5, 5, 0.925, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/sonic/src/gimmickjump/acmd.rs b/fighters/sonic/src/gimmickjump/acmd.rs new file mode 100644 index 0000000000..2d33d415bc --- /dev/null +++ b/fighters/sonic/src/gimmickjump/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 90, 0, 30, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/sonic/src/gimmickjump/mod.rs b/fighters/sonic/src/gimmickjump/mod.rs new file mode 100644 index 0000000000..d1e769c6c0 --- /dev/null +++ b/fighters/sonic/src/gimmickjump/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sonic_gimmickjump"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sonic/src/lib.rs b/fighters/sonic/src/lib.rs index 8e2ddcc726..31af2689fa 100644 --- a/fighters/sonic/src/lib.rs +++ b/fighters/sonic/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod gimmickjump; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("sonic"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + gimmickjump::install(); } diff --git a/fighters/sonic/src/opff.rs b/fighters/sonic/src/opff.rs index 827daadc28..72f0b1d056 100644 --- a/fighters/sonic/src/opff.rs +++ b/fighters/sonic/src/opff.rs @@ -92,8 +92,6 @@ pub unsafe fn sonic_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("sonic") - .on_line(Main, sonic_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, sonic_frame_wrapper); } diff --git a/fighters/sonic/src/status/dash.rs b/fighters/sonic/src/status/dash.rs index af85e4c102..e775df4204 100644 --- a/fighters/sonic/src/status/dash.rs +++ b/fighters/sonic/src/status/dash.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn pre_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_DASH + +pub unsafe extern "C" fn dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ground_brake = WorkModule::get_param_float(fighter.module_accessor, hash40("ground_brake"), 0); let mut initial_speed = VarModule::get_float(fighter.battle_object, vars::common::instance::CURR_DASH_SPEED); @@ -22,8 +22,7 @@ pub unsafe extern "C" fn pre_dash(fighter: &mut L2CFighterCommon) -> L2CValue { smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_DASH)(fighter) } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_DASH, dash_pre); } diff --git a/fighters/sonic/src/status.rs b/fighters/sonic/src/status/mod.rs similarity index 52% rename from fighters/sonic/src/status.rs rename to fighters/sonic/src/status/mod.rs index e929a4ed04..755f0bf05e 100644 --- a/fighters/sonic/src/status.rs +++ b/fighters/sonic/src/status/mod.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod wait; mod dash; @@ -36,28 +38,24 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn sonic_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_SONIC { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - wait::install(); - dash::install(); - special_n::install(); - special_s::install(); - special_s_dash::install(); - special_lw_hold::install(); - special_hi::install(); - special_n_hit::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); - smashline::Agent::new("sonic").on_start(sonic_init).install(); + wait::install(agent); + dash::install(agent); + special_n::install(agent); + special_s::install(agent); + special_s_dash::install(agent); + special_lw_hold::install(agent); + special_hi::install(agent); + special_n_hit::install(agent); } diff --git a/fighters/sonic/src/status/special_hi.rs b/fighters/sonic/src/status/special_hi.rs index 5789432868..946e69c8c6 100644 --- a/fighters/sonic/src/status/special_hi.rs +++ b/fighters/sonic/src/status/special_hi.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -35,7 +35,7 @@ pub unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub unsafe extern "C" fn exec_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_jump_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); let min_speed_y = 1.0; let speed_y = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); @@ -47,7 +47,7 @@ pub unsafe extern "C" fn exec_special_hi_jump(fighter: &mut L2CFighterCommon) -> return 0.into(); } -unsafe extern "C" fn exit_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); let landing_lag = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_landing_frame")) as f32; @@ -59,18 +59,9 @@ unsafe extern "C" fn exit_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi) - .status( - Exec, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, - exec_special_hi_jump, - ) - .status( - Exit, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, - exit_special_hi_jump, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + + agent.status(Exec, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec); + agent.status(Exit, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exit); } diff --git a/fighters/sonic/src/status/special_lw_hold.rs b/fighters/sonic/src/status/special_lw_hold.rs index 0669221491..cf15e109ee 100644 --- a/fighters/sonic/src/status/special_lw_hold.rs +++ b/fighters/sonic/src/status/special_lw_hold.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -unsafe extern "C" fn sonic_speciallwhold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD + +unsafe extern "C" fn special_lw_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_x = fighter.global_table[STICK_X].get_f32(); let lr = PostureModule::lr(fighter.module_accessor); if stick_x * lr <= -0.35 { @@ -37,12 +37,6 @@ unsafe extern "C" fn sonic_speciallwhold_pre(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, - sonic_speciallwhold_pre, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, special_lw_hold_pre); } diff --git a/fighters/sonic/src/status/special_n.rs b/fighters/sonic/src/status/special_n.rs index 09fcd10c19..5f869df01c 100644 --- a/fighters/sonic/src/status/special_n.rs +++ b/fighters/sonic/src/status/special_n.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn main_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_N + +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { hash40("special_n_start") } @@ -95,20 +95,17 @@ unsafe extern "C" fn special_n_main_loop2(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub unsafe extern "C" fn pre_special_n_homing_start(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START + +pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let blast_attack = VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK); let ret = smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); VarModule::set_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK, blast_attack); ret } -pub fn install() { - smashline::Agent::new("sonic") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, main_special_n) - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START, - pre_special_n_homing_start, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START, special_n_homing_start_pre); } diff --git a/fighters/sonic/src/status/special_n_hit.rs b/fighters/sonic/src/status/special_n_hit.rs index fa3283c05b..cf5348d8cb 100644 --- a/fighters/sonic/src/status/special_n_hit.rs +++ b/fighters/sonic/src/status/special_n_hit.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -use smashline::*; + +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT // Randomized Homing Attack Poses @@ -35,12 +35,6 @@ pub unsafe extern "C" fn special_n_hit_main(fighter: &mut L2CFighterCommon) -> L ret } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Main, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT, - special_n_hit_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT, special_n_hit_main); } diff --git a/fighters/sonic/src/status/special_s.rs b/fighters/sonic/src/status/special_s.rs index 6c8a803902..11e80b4b83 100644 --- a/fighters/sonic/src/status/special_s.rs +++ b/fighters/sonic/src/status/special_s.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn pre_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -37,7 +37,7 @@ pub unsafe extern "C" fn pre_special_s(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub unsafe extern "C" fn main_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { // fighter.sub_change_motion_by_situation(L2CValue::Hash40s("special_s"), L2CValue::Hash40s("special_air_s"), false.into()); VarModule::set_int(fighter.battle_object, vars::sonic::status::SPECIAL_S_STEP, vars::sonic::SPECIAL_S_STEP_START); MotionModule::change_motion( @@ -305,9 +305,7 @@ unsafe fn sonic_special_s_ledge_cancel_helper(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::sonic::status::SPECIAL_S_STEP, vars::sonic::SPECIAL_S_STEP_END); } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, pre_special_s) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, main_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } diff --git a/fighters/sonic/src/status/special_s_dash.rs b/fighters/sonic/src/status/special_s_dash.rs index 4c6bab9055..1891d98fdd 100644 --- a/fighters/sonic/src/status/special_s_dash.rs +++ b/fighters/sonic/src/status/special_s_dash.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn pre_special_s_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH + +pub unsafe extern "C" fn special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let log_mask_flags; let power_up_bit; if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_FLAG_SPECIAL_LW_HOLD) { @@ -43,12 +43,6 @@ pub unsafe extern "C" fn pre_special_s_dash(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH, - pre_special_s_dash, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_pre); } diff --git a/fighters/sonic/src/status/wait.rs b/fighters/sonic/src/status/wait.rs index ea433a9bc4..7a1dec6f63 100644 --- a/fighters/sonic/src/status/wait.rs +++ b/fighters/sonic/src/status/wait.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -use smashline::*; + +// FIGHTER_STATUS_KIND_WAIT pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_wait_common(); @@ -16,8 +16,7 @@ pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ); fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Wait_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("sonic") - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); } diff --git a/fighters/szerosuit/src/acmd/aerials.rs b/fighters/szerosuit/src/acmd/aerials.rs index 031840a6b8..61e7cb6c29 100644 --- a/fighters/szerosuit/src/acmd/aerials.rs +++ b/fighters/szerosuit/src/acmd/aerials.rs @@ -1,370 +1,334 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, -1); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("attack_air_n"), false, -1.0); //ArticleModule::set_rate(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 55, 80, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(9.0), Some(13.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 55, 80, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(9.0), Some(13.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(4.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(4.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 10.0, 7.0, Some(0.0), Some(3.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 10.0, 7.0, Some(0.0), Some(3.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 15.0, -1.0, Some(0.0), Some(4.0), Some(11.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 15.0, -1.0, Some(0.0), Some(4.0), Some(11.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(15.0), Some(-9.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(15.0), Some(-9.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(16.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(16.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(17.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(17.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - -} - -unsafe extern "C" fn szerosuit_whip_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, true); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - } } -unsafe extern "C" fn szerosuit_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn szerosuit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-6.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(8.0-6.0)); + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 5.0, 366, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 5.0, 366, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 5, 0, Hash40::new("legl"), 5.0, 70, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 5.0, 75, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 5.0, 80, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legl"), 5.0, 70, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 5.0, 75, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 5.0, 80, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 40, 100, 0, 40, 3.7, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 40, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 10.0, 40, 100, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 40, 100, 0, 40, 3.7, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 40, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 10.0, 40, 100, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 21.0/(40.0-17.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 21.0/(40.0-17.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 70.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 szerosuit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 361, 110, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 110, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 13.0, 361, 110, 0, 33, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 361, 110, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 110, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 13.0, 361, 110, 0, 33, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn szerosuit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 10.0, 60, 110, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 10.0, 60, 110, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 4.0/(19.0-11.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 30, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 4.0/(19.0-11.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 30, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 16.0/(29.0-19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 16.0/(29.0-19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { } frame(lua_state, 59.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 szerosuit_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_atk_air_hi"), Hash40::new("top"), 0, 9.5, -1.0, -5.8, 45, 92.4, 0.85, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_atk_air_hi"), Hash40::new("top"), 0, 9.5, -1.0, -5.8, 45, 92.4, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire_02"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire_02"), false, false); } } -unsafe extern "C" fn szerosuit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let dive_motion_rate = 10.0/(50.0-14.0); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0/(14.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 11.0/(14.0-1.0)); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::ATTACK_AIR_LW_REBOUND); } frame(lua_state, 2.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, dive_motion_rate); + if is_excute(agent) { + FT_MOTION_RATE(agent, dive_motion_rate); // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 100, 45, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 100, 45, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0 + 4.0/dive_motion_rate); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn szerosuit_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let dive_motion_rate = 15.0/(50.0-14.0); frame(lua_state, 3.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_atk_air_lw_fire"), Hash40::new("toel"), -0.5, 0.3, 0, 0, 0, -45, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("toel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_atk_air_lw_fire"), Hash40::new("toel"), -0.5, 0.3, 0, 0, 0, -45, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("toel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); } frame(lua_state, 15.0 + 7.0/dive_motion_rate); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_atk_air_lw_fire"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_atk_air_lw_fire"), false, true); } } -unsafe extern "C" fn szerosuit_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn szerosuit_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn szerosuit_landing_air_lw_expression(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_landingairlw(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); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, 0 as u32); } } -unsafe extern "C" fn szerosuit_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, false, -1); ArticleModule::set_visibility_whole(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::change_status(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, *WEAPON_SZEROSUIT_WHIP2_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 5.0, 60, 30, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("throw"), 5.0, 60, 30, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, *WEAPON_SZEROSUIT_WHIP2_STATUS_KIND_REWIND); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } } -unsafe extern "C" fn szerosuit_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attackairn", szerosuit_attack_air_n_game) - .acmd("expression_attackairn", szerosuit_attack_air_n_expression) - .acmd("game_attackairf", szerosuit_attack_air_f_game) - .acmd("game_attackairb", szerosuit_attack_air_b_game) - .acmd("game_attackairhi", szerosuit_attack_air_hi_game) - .acmd("effect_attackairhi", szerosuit_attack_air_hi_effect) - .acmd("game_attackairlw", szerosuit_attack_air_lw_game) - .acmd("effect_attackairlw", szerosuit_attack_air_lw_effect) - .acmd("game_landingairlw", szerosuit_landing_air_lw_game) - .acmd("effect_landingairlw", szerosuit_landing_air_lw_effect) - .acmd( - "expression_landingairlw", - szerosuit_landing_air_lw_expression, - ) - .acmd("game_aircatch", szerosuit_air_catch_game) - .acmd("game_aircatchlanding", szerosuit_landing_air_catch_game) - .install(); - smashline::Agent::new("szerosuit_whip") - .acmd("game_attackairn", szerosuit_whip_attack_air_n_game) - .install(); + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/szerosuit/src/acmd/ground.rs b/fighters/szerosuit/src/acmd/ground.rs index 0889205010..d59f43bdf2 100644 --- a/fighters/szerosuit/src/acmd/ground.rs +++ b/fighters/szerosuit/src/acmd/ground.rs @@ -1,135 +1,132 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 8.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.8, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 8.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.8, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn szerosuit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 9.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 10.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 9.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 10.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn szerosuit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 5.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 361, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + ATTACK(agent, 1, 0, Hash40::new("handr"), 5.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 361, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_motion_rate = 11.0/(20.0-6.0); let attack_speed_reduction = -0.8; frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(attack_speed_reduction, 0.0, 0.0)); - FT_MOTION_RATE(fighter, attack_motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 64, 0, 50, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 64, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + FT_MOTION_RATE(agent, attack_motion_rate); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 64, 0, 50, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 64, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 6.0 + 4.0/attack_motion_rate); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 70, 85, 0, 60, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 70, 85, 0, 60, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 85, 0, 60, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 70, 85, 0, 60, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-attack_speed_reduction, 0.0, 0.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_dash_expression(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_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn expression_attackdash(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_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attack11", szerosuit_attack_11_game) - .acmd("game_attack12", szerosuit_attack_12_game) - .acmd("game_attack13", szerosuit_attack_13_game) - .acmd("game_attackdash", szerosuit_attack_dash_game) - .acmd("expression_attackdash", szerosuit_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/szerosuit/src/acmd/mod.rs b/fighters/szerosuit/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/szerosuit/src/acmd/mod.rs +++ b/fighters/szerosuit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/szerosuit/src/acmd/other.rs b/fighters/szerosuit/src/acmd/other.rs index 9c6ef0f501..3544727987 100644 --- a/fighters/szerosuit/src/acmd/other.rs +++ b/fighters/szerosuit/src/acmd/other.rs @@ -1,253 +1,123 @@ - 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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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(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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_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_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_szerosuit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_szerosuit_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, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_szerosuit_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_szerosuit_step_right_l")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_szerosuit_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_szerosuit_step_left_l")); } } -unsafe extern "C" fn 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, 14.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 szerosuit_paralyzer_bullet_shoot_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"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - } } -unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_tame_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"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - } -} - -unsafe extern "C" fn szerosuit_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 szerosuit_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("szerosuit_paralyzer_bullet") - .acmd("game_shoot", szerosuit_paralyzer_bullet_shoot_game) - .acmd("game_shoottame", szerosuit_paralyzer_bullet_shoot_tame_game) - .install(); - smashline::Agent::new("szerosuit") - .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("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", szerosuit_escape_air_game) - .acmd("game_escapeairslide", szerosuit_escape_air_slide_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/szerosuit/src/acmd/smashes.rs b/fighters/szerosuit/src/acmd/smashes.rs index fb152b850f..8a2c5dd959 100644 --- a/fighters/szerosuit/src/acmd/smashes.rs +++ b/fighters/szerosuit/src/acmd/smashes.rs @@ -1,191 +1,186 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 5.5, 7.0, 7.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_ATTACK_FLAG_S4_SELECT); + } frame(lua_state, 25.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 5.5, 6.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 6.0, 5.2); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } - } -unsafe extern "C" fn szerosuit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 5.5, 7.0, 7.0); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_ATTACK_FLAG_S4_SELECT); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 6.0, 5.2); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 5.5, 6.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } - } -unsafe extern "C" fn szerosuit_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_hi_4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); execute(lua_state , 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, -1); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("attack_hi4"), false, -1.0); } } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 150, 0, 6.0, 0.0, 10.0, 7.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 150, 0, 6.0, 0.0, 10.0, 7.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..5 { - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } } - wait(lua_state, 1.0); - if is_excute(fighter) { + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); + ATTACK(agent, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); + ATTACK(agent, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); + } + wait(lua_state, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } + frame(lua_state, 42.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } -frame(lua_state, 28.0); -if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); - ATTACK(fighter, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); - ATTACK(fighter, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); -} -wait(lua_state, 2.0); -if is_excute(fighter) { - AttackModule::clear_all(boma); -} -frame(lua_state, 42.0); -if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); -} -} -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attacks4hi", szerosuit_attack_s4_hi_game) - .acmd("game_attacks4", szerosuit_attack_s4_s_game) - .acmd("game_attacks4lw", szerosuit_attack_s4_lw_game) - .acmd("game_attackhi4", szerosuit_attack_hi_4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/szerosuit/src/acmd/specials.rs b/fighters/szerosuit/src/acmd/specials.rs index f2bd22ecd1..3282004d6f 100644 --- a/fighters/szerosuit/src/acmd/specials.rs +++ b/fighters/szerosuit/src/acmd/specials.rs @@ -1,499 +1,378 @@ - use super::*; -unsafe extern "C" fn szerosuit_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(21.0-1.0)); -} - -unsafe extern "C" fn szerosuit_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(21.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(21.0-1.0)); } -unsafe extern "C" fn szerosuit_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 26.0/(28.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 26.0/(28.0-1.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_N_FLAG_SHOOT); ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_PARALYZER_BULLET, false, -1); } } -unsafe extern "C" fn szerosuit_special_air_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 26.0/(28.0-1.0)); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_N_FLAG_SHOOT); - ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_PARALYZER_BULLET, false, -1); - } + FT_MOTION_RATE(agent, 9.0/(14.0-1.0)); } -unsafe extern "C" fn szerosuit_special_n_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(14.0-1.0)); -} - -unsafe extern "C" fn szerosuit_special_s_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, 23.0/(28.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(28.0-1.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 15, 100, 90, 0, 4.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 4.0, 20, 100, 80, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 1, Hash40::new("top"), 4.0, 25, 100, 50, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(26.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 15, 100, 90, 0, 4.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 4.0, 20, 100, 80, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 1, Hash40::new("top"), 4.0, 25, 100, 50, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(26.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_S_FLAG_S2); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, (28.0-1.0)/23.0); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 365, 100, 85, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 100, 95, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 365, 100, 85, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 100, 95, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 100, 100, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.2, 345, 100, 85, 0, 3.5, 0.0, 8.0, 25.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 100, 100, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.2, 345, 100, 85, 0, 3.5, 0.0, 8.0, 25.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 2, Hash40::new("top"), 1.2, 10, 100, 85, 0, 3.7, 0.0, 8.0, 28.0, Some(0.0), Some(8.0), Some(25.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 2, Hash40::new("top"), 1.2, 10, 100, 85, 0, 3.7, 0.0, 8.0, 28.0, Some(0.0), Some(8.0), Some(25.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 3, Hash40::new("top"), 1.2, 345, 100, 85, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(28.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 3, Hash40::new("top"), 1.2, 345, 100, 85, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(28.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_S_FLAG_S2); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 4, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); - //ATTACK(fighter, 0, 4, Hash40::new("top"), 8.0, 50, 105, 0, 45, 6.6, 0.0, 8.5, 38.0, Some(0.0), Some(8.5), Some(32.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 4, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); + //ATTACK(agent, 0, 4, Hash40::new("top"), 8.0, 50, 105, 0, 45, 6.6, 0.0, 8.5, 38.0, Some(0.0), Some(8.5), Some(32.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_WHIP); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_special_s_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); //AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, (28.0-1.0)/23.0); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 57.0); - if is_excute(fighter) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_whip_special_s2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("szero_pwhip"), true, true); - EFFECT_FLW_POS(fighter, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_gbeam_lightning"), false, true); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_whip"), false, true); - } - frame(lua_state, 56.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_whip_flash"), false, true); - } -} - -unsafe extern "C" fn szerosuit_special_air_s_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, 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_WHIP); - //AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn szerosuit_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 208, 0, 40, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 208, 0, 40, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 46.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 szerosuit_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - FT_MOTION_RATE (fighter, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE (agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 196, 0, 35, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 196, 0, 35, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 47.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 szerosuit_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_REVERSE); } frame(lua_state, 19.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); //WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); VarModule::on_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_WALL_JUMP_ENABLE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } } -unsafe extern "C" fn szerosuit_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_REVERSE); } frame(lua_state, 19.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); //WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_WALL_JUMP_ENABLE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); } } -unsafe extern "C" fn szerosuit_special_air_lw_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwkick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_REVERSE_ENABLE); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 48, 115, 0, 45, 4.8, -4.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 48, 115, 0, 45, 4.8, -4.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 290, 52, 0, 30, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 290, 52, 0, 30, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 45, 100, 0, 45, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 45, 100, 0, 45, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_INSTANCE_WORK_ID_FLAG_TO_SPECIAL_LANDING); } - } -unsafe extern "C" fn szerosuit_special_air_lw_flip_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwflip(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::szerosuit::status::ATTACK_AIR_LW_REBOUND){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_specialnstart", szerosuit_special_n_start_game) - .acmd("game_specialairnstart", szerosuit_special_air_n_start_game) - .acmd("game_specialnshoot", szerosuit_special_n_shoot_game) - .acmd("game_specialairnshoot", szerosuit_special_air_n_shoot_game) - .acmd("game_specialnlanding", szerosuit_special_n_landing_game) - .acmd("game_specials", szerosuit_special_s_game) - .acmd("game_specialairs", szerosuit_special_air_s_game) - .acmd("game_specials2", szerosuit_special_s_2_game) - .acmd("game_specialairs2", szerosuit_special_air_s_2_game) - .acmd("game_specialhi", szerosuit_special_hi_game) - .acmd("game_specialairhi", szerosuit_special_air_hi_game) - .acmd("game_speciallwstart", szerosuit_special_lw_start_game) - .acmd( - "game_specialairlwstart", - szerosuit_special_air_lw_start_game, - ) - .acmd("game_specialairlwkick", szerosuit_special_air_lw_kick_game) - .acmd("game_specialairlwflip", szerosuit_special_air_lw_flip_game) - .install(); - smashline::Agent::new("szerosuit_whip") - .acmd("game_specials", szerosuit_whip_special_s_game) - .acmd("game_specialairs", szerosuit_whip_special_air_s_game) - .acmd("game_specials2", szerosuit_whip_special_s2_game) - .acmd("effect_specials2", szerosuit_whip_special_s2_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("game_specialnlanding", game_specialnlanding); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("game_specialairlwkick", game_specialairlwkick); + agent.acmd("game_specialairlwflip", game_specialairlwflip); } diff --git a/fighters/szerosuit/src/acmd/throws.rs b/fighters/szerosuit/src/acmd/throws.rs index 7bfa77b6b5..0fb765a6ab 100644 --- a/fighters/szerosuit/src/acmd/throws.rs +++ b/fighters/szerosuit/src/acmd/throws.rs @@ -1,257 +1,250 @@ use super::*; -unsafe extern "C" fn szerosuit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(7.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(7.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 3.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); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn szerosuit_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_06")); + } + wait(lua_state, 7.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_06")); + } +} + +unsafe extern "C" fn expression_catch(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); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); + } +} + +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_dash"), false, 0.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 23.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 3); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn szerosuit_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 24.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 3); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - -} - -unsafe extern "C" fn szerosuit_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_06")); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_06")); - } - -} - -unsafe extern "C" fn szerosuit_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn szerosuit_catch_expression(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); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); - } } -unsafe extern "C" fn szerosuit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 40, 50, 0, 63, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 40, 50, 0, 63, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 8); + CHECK_FINISH_CAMERA(agent, 13, 8); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 19.0/(30.0-9.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 19.0/(30.0-9.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 45, 130, 0, 30, 5.0, 0.0, 16.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 45, 130, 0, 30, 5.0, 0.0, 16.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 9); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 14.0/(30.0-11.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 14.0/(30.0-11.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 2.0, 6.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 105, 100, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 2.0, 6.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 105, 100, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 2.0, 45, 130, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 2.0, 45, 130, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 10); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 10); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 70, 78, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 70, 78, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 120, 0, 0, 4.0, 0.0, 4.0, 0.0, Some(-2.5), Some(4.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 120, 0, 0, 4.0, 0.0, 4.0, 0.0, Some(-2.5), Some(4.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_catch", szerosuit_catch_game) - .acmd("game_catchdash", szerosuit_catch_dash_game) - .acmd("game_catchturn", szerosuit_catch_turn_game) - .acmd("sound_catch", szerosuit_catch_sound) - .acmd("effect_catch", szerosuit_catch_effect) - .acmd("expression_catch", szerosuit_catch_expression) - .acmd("game_throwf", szerosuit_throw_f_game) - .acmd("game_throwb", szerosuit_throw_b_game) - .acmd("game_throwhi", szerosuit_throw_hi_game) - .acmd("game_throwlw", szerosuit_throw_lw_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("effect_catch", stub); + agent.acmd("sound_catch", sound_catch); + agent.acmd("expression_catch", expression_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/szerosuit/src/acmd/tilts.rs b/fighters/szerosuit/src/acmd/tilts.rs index c8c3204ad9..0bda8e22a6 100644 --- a/fighters/szerosuit/src/acmd/tilts.rs +++ b/fighters/szerosuit/src/acmd/tilts.rs @@ -1,214 +1,209 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); - } + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); + } } -unsafe extern "C" fn szerosuit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); - } + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); + } } -unsafe extern "C" fn szerosuit_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 12.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 12.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 7.2, 5, -1, 11.8, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 7.2, 5, -1, 11.8, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); } } -unsafe extern "C" fn szerosuit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 5.0, 90, 40, 0, 45, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 5.0, 90, 40, 0, 45, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 6.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 6.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 24.0/(40.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 24.0/(40.0-13.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 110, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 75, 110, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 85, 110, 0, 30, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 110, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 75, 110, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 85, 110, 0, 30, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 17.0/(30.0-11.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0/(30.0-11.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toel"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toel"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 7.0, -8.5, -32.5, -160.1, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 7.0, -8.5, -32.5, -160.1, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, false); - //LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, false); + //LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), true, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), true, false); } - } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attacks3hi", szerosuit_attack_s3_hi_game) - .acmd("effect_attacks3hi", szerosuit_attack_s3_hi_effect) - .acmd("game_attacks3", szerosuit_attack_s3_s_game) - .acmd("effect_attacks3", szerosuit_attack_s3_s_effect) - .acmd("game_attacks3lw", szerosuit_attack_s3_lw_game) - .acmd("effect_attacks3lw", szerosuit_attack_s3_lw_effect) - .acmd("game_attackhi3", szerosuit_attack_hi3_game) - .acmd("game_attacklw3", szerosuit_attack_lw3_game) - .acmd("effect_attacklw3", szerosuit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/szerosuit/src/lib.rs b/fighters/szerosuit/src/lib.rs index af2cb7bd53..0bc993115d 100644 --- a/fighters/szerosuit/src/lib.rs +++ b/fighters/szerosuit/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod paralyzer_bullet; +mod whip; use smash::{ lib::{ @@ -38,9 +43,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("szerosuit"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + paralyzer_bullet::install(); + whip::install(); } diff --git a/fighters/szerosuit/src/opff.rs b/fighters/szerosuit/src/opff.rs index c158d00270..c06c3e1a86 100644 --- a/fighters/szerosuit/src/opff.rs +++ b/fighters/szerosuit/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn paralyzer_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_N_SHOOT { @@ -99,8 +98,7 @@ pub unsafe fn szerosuit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("szerosuit") - .on_line(Main, szerosuit_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, szerosuit_frame_wrapper); } diff --git a/fighters/szerosuit/src/paralyzer_bullet/acmd.rs b/fighters/szerosuit/src/paralyzer_bullet/acmd.rs new file mode 100644 index 0000000000..c6603ce6e4 --- /dev/null +++ b/fighters/szerosuit/src/paralyzer_bullet/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + } +} + +unsafe extern "C" fn game_shoottame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_shoottame", game_shoottame); +} diff --git a/fighters/szerosuit/src/paralyzer_bullet/mod.rs b/fighters/szerosuit/src/paralyzer_bullet/mod.rs new file mode 100644 index 0000000000..46693712fe --- /dev/null +++ b/fighters/szerosuit/src/paralyzer_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("szerosuit_paralyzer_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/szerosuit/src/status/mod.rs b/fighters/szerosuit/src/status/mod.rs new file mode 100644 index 0000000000..48aaa3bbdf --- /dev/null +++ b/fighters/szerosuit/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod rebirth; + +pub fn install(agent: &mut Agent) { + rebirth::install(agent); +} diff --git a/fighters/szerosuit/src/status.rs b/fighters/szerosuit/src/status/rebirth.rs similarity index 59% rename from fighters/szerosuit/src/status.rs rename to fighters/szerosuit/src/status/rebirth.rs index dfea771b33..a0f7d27848 100644 --- a/fighters/szerosuit/src/status.rs +++ b/fighters/szerosuit/src/status/rebirth.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -8,8 +10,6 @@ unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - Agent::new("snake") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, szerosuit_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/szerosuit/src/whip/acmd.rs b/fighters/szerosuit/src/whip/acmd.rs new file mode 100644 index 0000000000..11359b772e --- /dev/null +++ b/fighters/szerosuit/src/whip/acmd.rs @@ -0,0 +1,104 @@ +use super::*; + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, (28.0-1.0)/23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 48.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 48.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, (28.0-1.0)/23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 57.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn effect_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("szero_pwhip"), true, true); + EFFECT_FLW_POS(agent, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_gbeam_lightning"), false, true); + } + frame(lua_state, 54.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip"), false, true); + } + frame(lua_state, 56.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip_flash"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specials2", game_specials2); + agent.acmd("effect_specials2", effect_specials2); +} diff --git a/fighters/szerosuit/src/whip/mod.rs b/fighters/szerosuit/src/whip/mod.rs new file mode 100644 index 0000000000..a0c0cf8374 --- /dev/null +++ b/fighters/szerosuit/src/whip/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("szerosuit_whip"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/acmd/aerials.rs b/fighters/tantan/src/acmd/aerials.rs index e067dc71ac..a411d5bd33 100644 --- a/fighters/tantan/src/acmd/aerials.rs +++ b/fighters/tantan/src/acmd/aerials.rs @@ -1,442 +1,464 @@ - use super::*; -unsafe extern "C" fn tantan_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn tantan_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); - } -} - -unsafe extern "C" fn tantan_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.571); - frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::clear(boma, 2, false); - } - frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 41.0, 14.0); - frame(lua_state, 36.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.4, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.25, 361, 67, 0, 37, 2.75, -1.5, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 16.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn tantan_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); - } -} - -unsafe extern "C" fn tantan_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackair_l01")); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_smash_h01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); - } -} - -unsafe extern "C" fn tantan_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn tantan_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); - } -} - -unsafe extern "C" fn tantan_attack_air_n_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - FT_MOTION_RATE(fighter, 3.0/(3.0-1.0)); - frame(fighter.lua_state_agent, 3.0); - FT_MOTION_RATE(fighter, 1.0); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.4, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.25, 361, 67, 0, 37, 2.75, -1.5, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - wait(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - AttackModule::clear_all(fighter.module_accessor); + AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_air_n_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.7, -8, -10, 0, 0, 1.1, false); //LAST_EFFECT_SET_RATE(fighter, 1.5); - let lr = PostureModule::lr(fighter.module_accessor); - if is_excute(fighter) { + let lr = PostureModule::lr(boma); + if is_excute(agent) { if(lr>=0.0){ - EFFECT_FLW_POS(fighter, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), 1, -1.75, 0, 13, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter, 3, 1.2, 0.5); + EFFECT_FLW_POS(agent, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), 1, -1.75, 0, 13, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent, 3, 1.2, 0.5); } else{ - EFFECT_FLW_POS(fighter, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), -1, 1.75, 0, 13, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter, 3, 1.2, 0.5); + EFFECT_FLW_POS(agent, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), -1, 1.75, 0, 13, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent, 3, 1.2, 0.5); } } } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7.5, 8.0, 0, 0, 0, 0.9, true, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.3); + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7.5, 8.0, 0, 0, 0, 0.9, true, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.3); //EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_speedline"), true, true); } } -unsafe extern "C" fn tantan_attack_air_n_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { + frame(lua_state, 6.0); + if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("vc_tantan_attack02")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); } } -unsafe extern "C" fn tantan_attack_air_n_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_n_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairn(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_landing_air_n_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn sound_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_n_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(lua_state, 17.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn tantan_attack_air_f_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(fighter.lua_state_agent, 10.0); - FT_MOTION_RATE(fighter, 1.0/(12.0-10.0)); - frame(fighter.lua_state_agent, 12.0); - FT_MOTION_RATE(fighter, 1.0); - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 13.75, 361, 100, 0, 25, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0/(12.0-10.0)); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 13.75, 361, 100, 0, 25, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { + frame(lua_state, 16.0); + if is_excute(agent) { //Sweetspot ground spike// - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 274, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 274, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Sweetspot semispike// - ATTACK(fighter, 2, 0, Hash40::new("footl"), 15.0, 1, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 15.0, 1, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, -1.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, -1.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(fighter.lua_state_agent, 45.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + frame(lua_state, 45.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_f_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 10.5, 2.0, 180, -150 , 90, 0.83, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 10.5, 2.0, 180, -150 , 90, 0.83, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 2); + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 2); } } -unsafe extern "C" fn tantan_attack_air_f_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); + if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("se_tantan_swing_s01")); - PLAY_SE(fighter, Hash40::new("se_common_swing_09")); + PLAY_SE(agent, Hash40::new("se_common_swing_09")); } - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); if (app::sv_math::rand(hash40("fighter"), 3) == 0) { - PLAY_SE(fighter, Hash40::new("vc_tantan_punch_03")); + PLAY_SE(agent, Hash40::new("vc_tantan_punch_03")); } } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } } -unsafe extern "C" fn tantan_attack_air_f_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 15.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_f_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { +unsafe extern "C" fn effect_landingairf(agent: &mut L2CAgentBase) { + if is_excute(agent) { //LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_landing_air_f_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn sound_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_f_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_landingairf(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_INTP, *SLOPE_STATUS_TOP, 2); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + frame(lua_state, 17.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn tantan_attack_air_b_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.5, 42, 98, 0, 42, 3.75, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.5, 42, 98, 0, 42, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.5, 42, 98, 0, 42, 3.75, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.5, 42, 98, 0, 42, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(fighter.lua_state_agent, 31.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + frame(lua_state, 31.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_b_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 8.1, -6, -151, 47, 2.9, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 8.1, -6, -151, 47, 2.9, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); //EffectModule::enable_sync_init_pos_last(fighter.module_accessor); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11.5, -14, 0, 0, 0, 0.9, false, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11.5, -14, 0, 0, 0, 0.9, false, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn tantan_attack_air_b_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackair_h01")); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackair_h01")); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { + frame(lua_state, 8.0); + if is_excute(agent) { if (app::sv_math::rand(hash40("fighter"), 3) == 0) { - PLAY_SE(fighter, Hash40::new("vc_tantan_punch_04")); + PLAY_SE(agent, Hash40::new("vc_tantan_punch_04")); } } } -unsafe extern "C" fn tantan_attack_air_b_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 8.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_b_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairb(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_b_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn expression_landingairb(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn tantan_landing_air_b_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.571); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 14.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::clear(boma, 2, false); + } + frame(lua_state, 18.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 41.0, 14.0); + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); + } +} + +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackair_l01")); + } + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_smash_h01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); + } +} + +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 26.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackairhi", tantan_attack_air_hi_game) - .acmd("expression_attackairhi", tantan_attack_air_hi_expression) - .acmd("game_attackairlw", tantan_attack_air_lw_game) - .acmd("effect_attackairlw", tantan_attack_air_lw_effect) - .acmd("sound_attackairlw", tantan_attack_air_lw_sound) - .acmd("game_landingairlw", tantan_landing_air_lw_game) - .acmd("expression_landingairlw", tantan_landing_air_lw_expression) - .acmd("game_attackairn", tantan_attack_air_n_game) - .acmd("effect_attackairn", tantan_attack_air_n_effect) - .acmd("sound_attackairn", tantan_attack_air_n_sound) - .acmd("expression_attackairn", tantan_attack_air_n_expression) - .acmd("effect_landingairn", tantan_landing_air_n_effect) - .acmd("sound_landingairn", tantan_landing_air_n_sound) - .acmd("expression_landingairn", tantan_landing_air_n_expression) - .acmd("game_attackairf", tantan_attack_air_f_game) - .acmd("effect_attackairf", tantan_attack_air_f_effect) - .acmd("sound_attackairf", tantan_attack_air_f_sound) - .acmd("expression_attackairf", tantan_attack_air_f_expression) - .acmd("effect_landingairf", tantan_landing_air_f_effect) - .acmd("sound_landingairf", tantan_landing_air_f_sound) - .acmd("expression_landingairf", tantan_landing_air_f_expression) - .acmd("game_attackairb", tantan_attack_air_b_game) - .acmd("effect_attackairb", tantan_attack_air_b_effect) - .acmd("sound_attackairb", tantan_attack_air_b_sound) - .acmd("expression_attackairb", tantan_attack_air_b_expression) - .acmd("effect_landingairb", tantan_landing_air_b_effect) - .acmd("sound_landingairb", tantan_landing_air_b_sound) - .acmd("expression_landingairb", tantan_landing_air_b_expression) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("effect_landingairn", effect_landingairn); + agent.acmd("sound_landingairn", sound_landingairn); + agent.acmd("expression_landingairn", expression_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("effect_landingairf", effect_landingairf); + agent.acmd("sound_landingairf", sound_landingairf); + agent.acmd("expression_landingairf", expression_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("effect_landingairb", effect_landingairb); + agent.acmd("sound_landingairb", sound_landingairb); + agent.acmd("expression_landingairb", expression_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/tantan/src/acmd/ground.rs b/fighters/tantan/src/acmd/ground.rs index 73b5a91c9f..13f6fa4060 100644 --- a/fighters/tantan/src/acmd/ground.rs +++ b/fighters/tantan/src/acmd/ground.rs @@ -1,24 +1,23 @@ - use super::*; -unsafe extern "C" fn tantan_attack_attack11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.5); } - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 0.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 3.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 2.75, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 6.5, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 0.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 3.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 2.75, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 6.5, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.7, 361, 16, 0, 31, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.7, 361, 16, 0, 31, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); @@ -27,104 +26,102 @@ unsafe extern "C" fn tantan_attack_attack11_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 4, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn tantan_attack_attack12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 4.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 60, 40, 0, 15, 3.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4, 80, 40, 0, 15, 4.0, 0.0, 4.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4, 93, 40, 0, 15, 4.0, 0.0, 4.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 60, 40, 0, 15, 3.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 80, 40, 0, 15, 4.0, 0.0, 4.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 93, 40, 0, 15, 4.0, 0.0, 4.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn tantan_attack_attack13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(13.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 5.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(13.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 5.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.98 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 6.5, 9.0, 1.5); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 40, 50, 0, 81, 4.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 40, 50, 0, 81, 4.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.0, 40, 80, 0, 55, 4.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 40, 80, 0, 55, 4.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 2.9, 7.2, 7.2); } - } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attack11", tantan_attack_attack11_game) - .acmd("game_attack12", tantan_attack_attack12_game) - .acmd("game_attack13", tantan_attack_attack13_game) - .acmd("game_attackdash", tantan_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/tantan/src/acmd/mod.rs b/fighters/tantan/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/tantan/src/acmd/mod.rs +++ b/fighters/tantan/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/acmd/other.rs b/fighters/tantan/src/acmd/other.rs index a2bb0fdede..aa7bf2e3f0 100644 --- a/fighters/tantan/src/acmd/other.rs +++ b/fighters/tantan/src/acmd/other.rs @@ -1,752 +1,150 @@ - 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(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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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(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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_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 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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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(boma) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_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) { - 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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_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_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -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_tantan_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn 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) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); 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); } } -unsafe extern "C" fn effect_attacklegsjumpaerial(fighter: &mut L2CAgentBase) { -} - //Ram Ram attacks// -unsafe extern "C" fn ramram_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; - let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; - frame(lua_state, reboundFrame); - //Rebound hitbox - if is_excute(fighter) { - if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ramram_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ramram_game_attacklonghold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *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_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *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_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -//Fly controls when RamRam gets sent outwards - -unsafe extern "C" fn ramram_game_attackfly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //Rebound hitbox - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} -//Fire ramram - -unsafe extern "C" fn ramram_game_attacks4fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - //Scoop for the first few frames, then send back and down - frame(lua_state, 1.0); - if is_excute(fighter) { - //Rebound hitbox - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - frame(lua_state, 14.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attacklonghold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - frame(lua_state, 14.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn arm_attack_end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackshortendr1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 8.0); if (armType==2) && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND) { - VarModule::on_flag(fighter.battle_object, vars::tantan::status::ARMS_ATTACK_CANCEL); + VarModule::on_flag(agent.battle_object, vars::tantan::status::ARMS_ATTACK_CANCEL); } } -unsafe extern "C" fn dragon_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_game_attackdragonshootlong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - //Dragon Beam linker - frame(lua_state, 6.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; - let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; - let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; - let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); - - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - AttackModule::set_power(boma, 0,16.0, false); - } - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_effect_attackdragonshootlong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); - EffectModule::enable_sync_init_pos_last(boma); - } -} - -unsafe extern "C" fn dragon_special_hi_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); - STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); - } - frame(lua_state, 2.0); - if is_excute(agent) { - let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; - PLAY_SE(agent, sfx); - } -} - -unsafe extern "C" fn dragonbeam_game_shoot(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let damage = if is_dragonized {9.0} else {6.0}; - let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - let range = if is_dragonized {30.0} else {25.0}; - let size = if is_dragonized {2.8} else {1.3}; - - ATTACK(fighter, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::disable_tip(boma); - } -} - -unsafe extern "C" fn dragonbeam_effect_beam(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; - let offset = if is_dragonized {-1.0} else {-2.5}; - EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); - } -} - -pub fn install() { - smashline::Agent::new("tantan_punch2") - .acmd("game_attackshort", megawatt_game_attackshort) - .acmd("game_attacklong", megawatt_game_attacklong) - .acmd("game_attacklonghold", megawatt_game_attacklonghold) - .install(); - smashline::Agent::new("tantan_beam") - .acmd("game_shoot", dragonbeam_game_shoot) - .acmd("game_bigshoot", dragonbeam_game_shoot) - .acmd("effect_beam", dragonbeam_effect_beam) - .acmd("effect_bigbeam", dragonbeam_effect_beam) - .install(); - smashline::Agent::new("tantan_punch3") - .acmd("game_attackshort", ramram_game_attackshort) - .acmd("game_attacklong", ramram_game_attacklong) - .acmd("game_attacklonghold", ramram_game_attacklonghold) - .install(); - smashline::Agent::new("tantan_punch1") - .acmd("game_attackshort", dragon_game_attackshort) - .acmd("game_attacklong", dragon_game_attacklong) - .acmd( - "game_attackdragonshootlong", - dragon_game_attackdragonshootlong, - ) - .acmd( - "effect_attackdragonshootlong", - dragon_effect_attackdragonshootlong, - ) - .acmd("game_specialairhiattack", dragon_special_hi_attack_game) - .acmd( - "game_specialairhiattackdragon", - dragon_special_hi_attack_game, - ) - .acmd("sound_attackbeamloop", dragon_sound_attackbeamloop) - .install(); - smashline::Agent::new("tantan_ring") - .acmd("game_attackfly", ramram_game_attackfly) - .acmd("game_attacks4fly", ramram_game_attacks4fly) - .install(); - smashline::Agent::new("tantan") - .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("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_attacklegsjumpaerialf", effect_attacklegsjumpaerial) - .acmd("effect_attacklegsjumpaerialb", effect_attacklegsjumpaerial) - .acmd("game_attackshortendr1", arm_attack_end) - .acmd("game_attackshortendrb1", arm_attack_end) - .acmd("game_attackshortendrb3", arm_attack_end) - .acmd("game_attacklongendr1", arm_attack_end) - .acmd("game_attacklongendrb1", arm_attack_end) - .acmd("game_attacklongendrb3", arm_attack_end) - .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("game_dash", game_dash); + 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("effect_attacklegsjumpaerialf", stub); + agent.acmd("effect_attacklegsjumpaerialb", stub); + + agent.acmd("game_attackshortendr1", game_attackshortendr1); + agent.acmd("game_attackshortendrb1", game_attackshortendr1); + agent.acmd("game_attackshortendrb3", game_attackshortendr1); + agent.acmd("game_attacklongendr1", game_attackshortendr1); + agent.acmd("game_attacklongendrb1", game_attackshortendr1); + agent.acmd("game_attacklongendrb3", game_attackshortendr1); } diff --git a/fighters/tantan/src/acmd/smashes.rs b/fighters/tantan/src/acmd/smashes.rs index 76cb5383ff..27b24ab6f9 100644 --- a/fighters/tantan/src/acmd/smashes.rs +++ b/fighters/tantan/src/acmd/smashes.rs @@ -1,86 +1,8 @@ - use super::*; -unsafe extern "C" fn tantan_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 4.0/(6.0-4.0)); - frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - //shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn tantan_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut is_dragonized = false; let mut is_doubledragon = false; let mut damage = 11.0; @@ -88,29 +10,29 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { let mut ranges = [18.0,22.0,25.0,29.0,31.0]; let mut size = 1.3; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 4.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - FT_MOTION_RATE_RANGE(fighter, 16.0, 18.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 18.0, 7.0); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); if (is_doubledragon && is_dragonized) { damage = 17.5; @@ -118,7 +40,7 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { ranges = [10.0,20.0,27.0,34.0,41.0]; size = 5.0; - ATTACK(fighter, 0, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, 6.0, 0.0, 0.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, 6.0, 0.0, 0.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else if is_dragonized { damage = 15.0; @@ -135,161 +57,160 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { for i in 0..5{ range = ranges[i]; if (is_doubledragon && is_dragonized) { - ATTACK(fighter, 1, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, size, 0.0, 0.0, -range, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, size, 0.0, 0.0, -range, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else{ - ATTACK(fighter, 2, 0, Hash40::new("pl1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("pl1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); if is_doubledragon { - ATTACK(fighter, 3, 0, Hash40::new("pr1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("pr1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } AttackModule::disable_tip(boma); wait(lua_state, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { if !(is_doubledragon && is_dragonized) { AttackModule::clear(boma,2,false); AttackModule::clear(boma,3,false); } } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - FT_MOTION_RATE_RANGE(fighter, 39.0, 48.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 39.0, 48.0, 16.0); frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn tantan_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut effect_l: u64 = 0; let mut effect_r: u64 = 0; let mut is_dragonized = false; let mut is_doubledragon = false; frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("sys_sscope_hold"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("sys_sscope_hold"),false,false); } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - EFFECT(fighter, Hash40::new("tantan_final_shot"), Hash40::new("pl1_muzzle"), 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("tantan_final_shot"), Hash40::new("pl1_muzzle"), 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("tantan_final_punch"), Hash40::new("pl1_muzzle_eff"), 3.0, 0, 0.0, 180, 0, 180, 0.75, false); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_final_punch"), Hash40::new("throw"), -0.045, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter,1.5); + EFFECT_FOLLOW(agent, Hash40::new("tantan_final_punch"), Hash40::new("throw"), -0.045, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent,1.5); effect_l = EffectModule::get_last_handle(boma); } else { let size = if is_dragonized {1.15} else {1.0}; - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pl1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); - LAST_EFFECT_SET_RATE(fighter,0.75); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pl1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); + LAST_EFFECT_SET_RATE(agent,0.75); effect_l = EffectModule::get_last_handle(boma); if is_dragonized { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_wepon_shot1"), Hash40::new("pl1_gimmickc"), -1.0, 0, 0, 0, 0, -90, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.75, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon_shot1"), Hash40::new("pl1_gimmickc"), -1.0, 0, 0, 0, 0, -90, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.75, 1.0); } if is_doubledragon { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pr1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); - LAST_EFFECT_SET_RATE(fighter,0.75); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pr1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); + LAST_EFFECT_SET_RATE(agent,0.75); effect_r = EffectModule::get_last_handle(boma); } } } if is_dragonized && is_doubledragon { frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 0.75); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 1.375); - EFFECT_DETACH_KIND(fighter,Hash40::new("tantan_final_punch"),-1) + EFFECT_DETACH_KIND(agent,Hash40::new("tantan_final_punch"),-1) } } else{ frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 0.375); EffectModule::set_rate(boma, effect_r as u32, 0.375); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 1.1); EffectModule::set_rate(boma, effect_r as u32, 1.1); } } - } -unsafe extern "C" fn tantan_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut is_dragonized = false; let mut is_doubledragon = false; frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_beam_ready")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - PLAY_SE(fighter, Hash40::new("vc_tantan_final02")); + PLAY_SE(agent, Hash40::new("vc_tantan_final02")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_punch_long")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_punch_long")); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; if is_dragonized && is_doubledragon { - PLAY_STATUS(fighter, Hash40::new("se_tantan_final02")); + PLAY_STATUS(agent, Hash40::new("se_tantan_final02")); } else { - PLAY_SE(fighter, sfx); + PLAY_SE(agent, sfx); } } } -unsafe extern "C" fn tantan_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //rbkind_76_dragonbeam ControlModule::set_rumble(boma, Hash40::new("rbkind_76_dragonbeam2"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn tantan_attack_s4_charge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); /* let is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; @@ -300,56 +221,161 @@ unsafe extern "C" fn tantan_attack_s4_charge_effect(fighter: &mut L2CAgentBase) for i in 1..i32::MAX{ frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); } wait(lua_state, 5.0); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("pl1_gimmickc"), 3, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("pl1_gimmickc"), 3, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, true); } } -unsafe extern "C" fn tantan_attack_s4_charge_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); } } -unsafe extern "C" fn tantan_attack_s4_charge_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter,*MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.6, -1, 0.8, 0.8, -1, Hash40::new("invalid")); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent,*MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.6, -1, 0.8, 0.8, -1, Hash40::new("invalid")); smash::app::sv_module_access::physics(lua_state); - fighter.pop_lua_stack(1); + agent.pop_lua_stack(1); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackhi4", tantan_attack_hi4_game) - .acmd("game_attacklw4", tantan_attack_lw4_game) - .acmd("game_attacks4", tantan_attack_s4_game) - .acmd("effect_attacks4", tantan_attack_s4_effect) - .acmd("sound_attacks4", tantan_attack_s4_sound) - .acmd("expression_attacks4", tantan_attack_s4_expression) - .acmd("effect_attacks4charge", tantan_attack_s4_charge_effect) - .acmd("sound_attacks4charge", tantan_attack_s4_charge_sound) - .acmd( - "expression_attacks4charge", - tantan_attack_s4_charge_expression, - ) - .install(); +//Right arm charging punch// + +unsafe extern "C" fn sound_attacks4charger(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); + + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); + } + if armType==1 { + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack02_charge")); + } + } + else if armType==2 { + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack03_charge")); + } + } + else{ + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); + } + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + } + frame(lua_state, 7.0); + if is_excute(agent) { + //shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + } + frame(lua_state, 10.0); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("sound_attacks4charge", sound_attacks4charge); + agent.acmd("expression_attacks4charge",expression_attacks4charge); + + agent.acmd("sound_attacks4charger", sound_attacks4charger); + agent.acmd("sound_attacks4chargerb", sound_attacks4charger); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/tantan/src/acmd/specials.rs b/fighters/tantan/src/acmd/specials.rs index 796b3d1e9e..404192e65c 100644 --- a/fighters/tantan/src/acmd/specials.rs +++ b/fighters/tantan/src/acmd/specials.rs @@ -1,36 +1,35 @@ - use super::*; -unsafe extern "C" fn tantan_special_n_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 1.0); if(armType == 1){ - FT_MOTION_RATE(fighter, 1.35); + FT_MOTION_RATE(agent, 1.35); } else if (armType==2) { - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } else if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { AttackModule::set_power_mul(boma, 1.1); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr5"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr5"), *HIT_STATUS_XLU); if(armType == 1){ - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 13.0, 60, 95, 0, 50, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 13.0, 60, 95, 0, 50, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 13.0, 60, 95, 0, 50, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 13.0, 60, 95, 0, 50, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_HEAVY, *ATTACK_REGION_PUNCH); } else if(armType == 2){ - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 8.5, 361, 85, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.5, 361, 85, 0, 45, 3.5, 3.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 8.5, 361, 85, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.5, 361, 85, 0, 45, 3.5, 3.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } else { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); @@ -39,280 +38,243 @@ unsafe extern "C" fn tantan_special_n_air_game(fighter: &mut L2CAgentBase) { let powerFactor = if is_dragonized {1.15} else {1.0}; let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 10.25*powerFactor, 45, 100, 0, 45, 2.5*sizeFactor, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.25*powerFactor, 45, 100, 0, 45, 4.5*sizeFactor, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 10.25*powerFactor, 45, 100, 0, 45, 2.5*sizeFactor, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.25*powerFactor, 45, 100, 0, 45, 4.5*sizeFactor, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_special_n_air_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_jump_line_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("tantan_jump_line_l"), false, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if(armType==1){ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n2"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n2"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); } else if (armType==2){ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n3"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n3"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n1"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n1"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { - LAST_EFFECT_SET_COLOR(fighter,1.0,0.5,0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("pr1_gimmickc"), 0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter,1.5); + LAST_EFFECT_SET_COLOR(agent,1.0,0.5,0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("pr1_gimmickc"), 0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent,1.5); } } } frame(lua_state, 22.0); { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_damage_fire_fly"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_damage_fire_fly"), -1); } } -unsafe extern "C" fn tantan_special_n_air_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); if(armType==1){ frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n02")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n02")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); } } else if (armType==2){ frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n03")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); } } else{ frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); } } } -unsafe extern "C" fn tantan_special_n_air_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if(armType==1){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_76_megabolthit"), 10); + RUMBLE_HIT(agent, Hash40::new("rbkind_76_megabolthit"), 10); } else if (armType==2){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 12); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 12); } else{ - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 9); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 9); } } } -unsafe extern "C" fn tantan_special_n_air_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); if (armType!=2) { //Additional landing lag for using Dragon/Megawatt - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); if (armType==0){ frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } //Landing lag frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } -unsafe extern "C" fn tantan_special_n_air_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_special_n_air_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_special_n_air_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn tantan_special_hi_air_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let angle = WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("tantan_jump_air"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180.0+angle, 0, 1, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1.3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("tantan_jump_air"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180.0+angle, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1.3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } if !WorkModule::is_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_IS_SPECIAL_HI_AIR_PHYSICS) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_hook_wind"), Hash40::new("handl"), -0.2, -0.03, -0.03, 180, 180, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_hook_wind"), Hash40::new("handl"), -0.2, -0.03, -0.03, 180, 180, 0, 1, true); } } frame(lua_state, 2.0); if !WorkModule::is_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_IS_SPECIAL_HI_AIR_PHYSICS) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_wepon_ringwind"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 2); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_wepon_ringwind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_wepon_ringwind"), false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_hook_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_hook_wind"), false, true); } } -unsafe extern "C" fn tantan_special_hi_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let bReverseFrame = if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND) {2.0} else {4.0}; +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let bReverseFrame = if agent.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND) {2.0} else {4.0}; frame(lua_state, bReverseFrame); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-5.0)); + FT_MOTION_RATE(agent, 5.0/(8.0-5.0)); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_TANTAN_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -//Right arm charging punch// - -unsafe extern "C" fn tantan_special_s_charge_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); - } - if armType==1 { - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attack02_charge")); - } - } - else if armType==2 { - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attack03_charge")); - } - } - else{ - frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_beam_ready")); - } - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("effect_specialairn", effect_specialairn); + agent.acmd("sound_specialairn", sound_specialairn); + agent.acmd("expression_specialairn", expression_specialairn); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("sound_specialairnend", sound_specialairnend); + agent.acmd("expression_specialairnend",expression_specialairnend); -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_specialairn", tantan_special_n_air_game) - .acmd("effect_specialairn", tantan_special_n_air_effect) - .acmd("sound_specialairn", tantan_special_n_air_sound) - .acmd("expression_specialairn", tantan_special_n_air_expression) - .acmd("game_specialairnend", tantan_special_n_air_end_game) - .acmd("effect_specialairnend", tantan_special_n_air_end_effect) - .acmd("sound_specialairnend", tantan_special_n_air_end_sound) - .acmd( - "expression_specialairnend", - tantan_special_n_air_end_expression, - ) - .acmd("effect_specialairhi", tantan_special_hi_air_effect) - .acmd("effect_specialairhi2", tantan_special_hi_air_effect) - .acmd("game_specialairhistart", tantan_special_hi_air_game) - .acmd("game_specialairhistart2", tantan_special_hi_air_game) - .acmd("sound_attacks4charger", tantan_special_s_charge_sound) - .acmd("sound_attacks4chargerb", tantan_special_s_charge_sound) - .install(); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("effect_specialairhi2", effect_specialairhi); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialairhistart2", game_specialairhistart); } diff --git a/fighters/tantan/src/acmd/throws.rs b/fighters/tantan/src/acmd/throws.rs index da9c72c731..bcff0ecfbb 100644 --- a/fighters/tantan/src/acmd/throws.rs +++ b/fighters/tantan/src/acmd/throws.rs @@ -1,88 +1,85 @@ use super::*; -unsafe extern "C" fn tantan_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(15.0-1.0)); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(fighter.module_accessor, 3.5, 3.5); + FT_MOTION_RATE(agent, 6.0/(15.0-1.0)); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.5); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + wait(lua_state, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); - wait(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + game_CaptureCutCommon(agent); + wait(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); + 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 tantan_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_06")); } wait(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_06")); } - } -unsafe extern "C" fn tantan_catch_expression(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_catch(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); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); } } -unsafe extern "C" fn tantan_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 80, 88, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 80, 88, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 2.0, 45, 130, 0, 30, 5.0, 1.0, 1.0, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 2.0, 45, 130, 0, 30, 5.0, 1.0, 1.0, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 10); + CHECK_FINISH_CAMERA(agent, 15, 10); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_catch", tantan_catch_game) - .acmd("sound_catch", tantan_catch_sound) - .acmd("expression_catch", tantan_catch_expression) - .acmd("game_throwhi", tantan_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("sound_catch", sound_catch); + agent.acmd("expression_catch", expression_catch); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/tantan/src/acmd/tilts.rs b/fighters/tantan/src/acmd/tilts.rs index 9af7aca337..b319591b4d 100644 --- a/fighters/tantan/src/acmd/tilts.rs +++ b/fighters/tantan/src/acmd/tilts.rs @@ -1,304 +1,293 @@ - use super::*; -unsafe extern "C" fn tantan_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + let motion = MotionModule::motion_kind(boma); + let isHigh = motion == Hash40::new("attack_s3_hi").hash; + let isLow = motion == Hash40::new("attack_s3_lw").hash; + let damageBonus = if (!isHigh && !isLow) {0.0} else {0.5}; + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + + if (isHigh) + {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false);} + else if (isLow) + {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false);} + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackhard_h01")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); + } +} + +unsafe extern "C" fn expression_attacks3(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_L); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 33.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + } +} +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let kbg = 95; let bkb = 85; frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("legr"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legr"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 6.5, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 6.5, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("legr"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 6.5, 93, kbg+5, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legr"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 6.5, 93, kbg+5, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn tantan_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; let mut sfx_level = *ATTACK_SOUND_LEVEL_M; let mut sizeFactor = 1.0; let mut powerFactor = 1.0; - frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml5"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml4"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml3"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml2"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml1"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml5"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml4"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml3"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml2"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml1"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter,13.0,24.0,8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent,13.0,24.0,8.0); + if is_excute(agent) { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); let bigScale = WorkModule::get_param_float(boma,hash40("param_private"),hash40("arm_l_big_scale")); let sizeFactor = if is_dragonized {bigScale} else {1.0}; let powerFactor = if is_dragonized {1.15} else {1.0}; let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 90, 85, 0, 40, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 90, 85, 0, 40, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 10.0*powerFactor, 70, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 10.0*powerFactor, 70, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter,1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 361, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent,1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 361, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml5"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml4"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml2"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml5"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml4"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml2"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn tantan_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); let scale = if is_dragonized {1.5} else {1.25}; //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("pl1_have"), 0, 0, 0, 0, 90, 0, 1.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 2.5, 10, 0, 0, 0, scale, true); - LAST_EFFECT_SET_SCALE_W(fighter,1.5,1,1); - LAST_EFFECT_SET_RATE(fighter,0.55); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 2.5, 10, 0, 0, 0, scale, true); + LAST_EFFECT_SET_SCALE_W(agent,1.5,1,1); + LAST_EFFECT_SET_RATE(agent,0.55); if is_dragonized { - LAST_EFFECT_SET_COLOR(fighter,0.25,1.0,0.375); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter,2.0); + LAST_EFFECT_SET_COLOR(agent,0.25,1.0,0.375); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 1, true); + LAST_EFFECT_SET_RATE(agent,2.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("tantan_dragon_attack_fire"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("tantan_dragon_attack_fire"),false,false); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_punch_end"), Hash40::new("arml1"), -1, -0.2, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_punch_end"), Hash40::new("arml1"), -1, -0.2, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn tantan_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_punch_long")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_punch_long")); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let sfx = if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) {Hash40::new("se_tantan_attack01_doragon_smash")} else {Hash40::new("se_tantan_attack01_long")}; - PLAY_SE(fighter, sfx); + PLAY_SE(agent, sfx); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_catch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_catch")); } } -unsafe extern "C" fn tantan_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; - - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_76_dragonarm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackss"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn tantan_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi3", game_attackhi3); - frame(lua_state, 6.0); - let motion = MotionModule::motion_kind(boma); - let isHigh = motion == Hash40::new("attack_s3_hi").hash; - let isLow = motion == Hash40::new("attack_s3_lw").hash; - let damageBonus = if (!isHigh && !isLow) {0.0} else {0.5}; - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - - if (isHigh) - {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false);} - else if (isLow) - {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false);} - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn tantan_attack_s3hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn tantan_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn tantan_attack_s3lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn tantan_attack_s3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackhard_h01")); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); - } -} - -unsafe extern "C" fn tantan_attack_s3_expression(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_L); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); - } -} + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackhi3", tantan_attack_hi3_game) - .acmd("game_attacklw3", tantan_attack_lw3_game) - .acmd("effect_attacklw3", tantan_attack_lw3_effect) - .acmd("sound_attacklw3", tantan_attack_lw3_sound) - .acmd("expression_attacklw3", tantan_attack_lw3_expression) - .acmd("game_attacks3hi", tantan_attack_s3_game) - .acmd("game_attacks3", tantan_attack_s3_game) - .acmd("game_attacks3lw", tantan_attack_s3_game) - .acmd("effect_attacks3hi", tantan_attack_s3hi_effect) - .acmd("effect_attacks3", tantan_attack_s3_effect) - .acmd("effect_attacks3lw", tantan_attack_s3lw_effect) - .acmd("sound_attacks3hi", tantan_attack_s3_sound) - .acmd("sound_attacks3", tantan_attack_s3_sound) - .acmd("sound_attacks3lw", tantan_attack_s3_sound) - .acmd("expression_attacks3hi", tantan_attack_s3_expression) - .acmd("expression_attacks3", tantan_attack_s3_expression) - .acmd("expression_attacks3lw", tantan_attack_s3_expression) - .install(); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("sound_attacks3", sound_attacks3); + agent.acmd("sound_attacks3hi", sound_attacks3); + agent.acmd("sound_attacks3lw", sound_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); } diff --git a/fighters/tantan/src/beam/acmd.rs b/fighters/tantan/src/beam/acmd.rs new file mode 100644 index 0000000000..babe99708c --- /dev/null +++ b/fighters/tantan/src/beam/acmd.rs @@ -0,0 +1,46 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let damage = if is_dragonized {9.0} else {6.0}; + let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; + let range = if is_dragonized {30.0} else {25.0}; + let size = if is_dragonized {2.8} else {1.3}; + + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::disable_tip(boma); + } +} + +unsafe extern "C" fn effect_beam(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; + let offset = if is_dragonized {-1.0} else {-2.5}; + EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_bigshoot", game_shoot); + agent.acmd("effect_beam", effect_beam); + agent.acmd("effect_bigbeam", effect_beam); +} diff --git a/fighters/tantan/src/beam/mod.rs b/fighters/tantan/src/beam/mod.rs new file mode 100644 index 0000000000..e83b3a97bc --- /dev/null +++ b/fighters/tantan/src/beam/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_beam"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/lib.rs b/fighters/tantan/src/lib.rs index 8e2ddcc726..570841d9f4 100644 --- a/fighters/tantan/src/lib.rs +++ b/fighters/tantan/src/lib.rs @@ -4,8 +4,16 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod punch1; +mod punch2; +mod punch3; +mod beam; +mod ring; use smash::{ lib::{ @@ -37,9 +45,18 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("tantan"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + punch1::install(); + punch2::install(); + punch3::install(); + beam::install(); + ring::install(); } diff --git a/fighters/tantan/src/opff.rs b/fighters/tantan/src/opff.rs index 39bafda49f..e796f31e0a 100644 --- a/fighters/tantan/src/opff.rs +++ b/fighters/tantan/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - //TODO: Figure out how to cancel arm recoil with a tilt/aerial, and if it's worth implementing unsafe fn recoil_cancel(boma: &mut BattleObjectModuleAccessor,status: i32,situation_kind: i32){ @@ -38,7 +37,7 @@ unsafe fn recoil_cancel(boma: &mut BattleObjectModuleAccessor,status: i32,situat unsafe fn arms_switch_during_normals(boma: &mut BattleObjectModuleAccessor, cat1: i32, status_kind: i32, situation_kind: i32, motion_kind: u64) { if [*FIGHTER_STATUS_KIND_ATTACK_S3, *FIGHTER_STATUS_KIND_ATTACK_HI3, *FIGHTER_STATUS_KIND_ATTACK_LW3, *FIGHTER_STATUS_KIND_ATTACK_AIR, *FIGHTER_STATUS_KIND_ATTACK_DASH, *FIGHTER_STATUS_KIND_ATTACK_S4, *FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) - || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ + || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ if !boma.is_in_hitlag() { if boma.is_cat_flag(Cat1::SpecialLw) { WorkModule::on_flag(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_CHANGE_PUNCH_R); @@ -48,8 +47,7 @@ unsafe fn arms_switch_during_normals(boma: &mut BattleObjectModuleAccessor, cat1 } } -unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) -{ +unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) { let dragonEffect = VarModule::get_int(boma.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE) as u32; let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { @@ -76,8 +74,8 @@ unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) } } } -unsafe fn fsmash_effect_translation(boma: &mut BattleObjectModuleAccessor, status_kind: i32) -{ + +unsafe fn fsmash_effect_translation(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if status_kind != *FIGHTER_STATUS_KIND_ATTACK_S4 { return; } @@ -111,44 +109,6 @@ pub unsafe fn tantan_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -/// prevents rocket from despawning in the blastzone -unsafe extern "C" fn dragon_frame(weapon: &mut L2CFighterBase) { - let boma = weapon.module_accessor; - - let mut is_dragonized = WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); - if !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_LEFT) - && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_KIRBY) - { - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - let bigScale = WorkModule::get_param_float(minmin_boma,hash40("param_private"),hash40("arm_l_big_scale")); - - //Only update if previously was not dragonized - if !is_dragonized { - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - WorkModule::set_flag(boma, is_dragonized,*WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); - - if is_dragonized { - let handle = EffectModule::req_follow(boma, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("gimmickc"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, bigScale, true, 0, 0, 0, 0, 0, false, false); - } - } - if is_dragonized { - PostureModule::set_scale(boma, bigScale, false); - } - } - } - if is_dragonized { - AttackModule::set_power_mul(boma, 1.15); - } -} -pub fn install() { - smashline::Agent::new("tantan") - .on_line(Main, tantan_frame_wrapper) - .install(); - - smashline::Agent::new("tantan_punch1") - .on_line(Main, dragon_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tantan_frame_wrapper); } diff --git a/fighters/tantan/src/punch1/acmd.rs b/fighters/tantan/src/punch1/acmd.rs new file mode 100644 index 0000000000..3dd0f177b4 --- /dev/null +++ b/fighters/tantan/src/punch1/acmd.rs @@ -0,0 +1,194 @@ +use super::*; + +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 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_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attackdragonshootlong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + //Dragon Beam linker + frame(lua_state, 6.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; + let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; + let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; + let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 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_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + AttackModule::set_power(boma, 0,16.0, false); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackdragonshootlong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); + EffectModule::enable_sync_init_pos_last(boma); + } +} + +unsafe extern "C" fn game_specialairhiattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *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_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn sound_attackbeamloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); + STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); + } + frame(lua_state, 2.0); + if is_excute(agent) { + let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; + PLAY_SE(agent, sfx); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + + agent.acmd("game_attackdragonshootlong", game_attackdragonshootlong); + agent.acmd("effect_attackdragonshootlong", effect_attackdragonshootlong); + + agent.acmd("game_specialairhiattack", game_specialairhiattack); + agent.acmd("game_specialairhiattackdragon", game_specialairhiattack); + + agent.acmd("sound_attackbeamloop", sound_attackbeamloop); +} diff --git a/fighters/tantan/src/punch1/mod.rs b/fighters/tantan/src/punch1/mod.rs new file mode 100644 index 0000000000..c27599cd53 --- /dev/null +++ b/fighters/tantan/src/punch1/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch1"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/punch1/opff.rs b/fighters/tantan/src/punch1/opff.rs new file mode 100644 index 0000000000..cfe50e87b8 --- /dev/null +++ b/fighters/tantan/src/punch1/opff.rs @@ -0,0 +1,41 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +/// prevents rocket from despawning in the blastzone +unsafe extern "C" fn dragon_frame(weapon: &mut L2CFighterBase) { + let boma = weapon.module_accessor; + + let mut is_dragonized = WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); + if !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_LEFT) + && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_KIRBY) + { + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + let bigScale = WorkModule::get_param_float(minmin_boma,hash40("param_private"),hash40("arm_l_big_scale")); + + //Only update if previously was not dragonized + if !is_dragonized { + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + WorkModule::set_flag(boma, is_dragonized,*WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); + + if is_dragonized { + let handle = EffectModule::req_follow(boma, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("gimmickc"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, bigScale, true, 0, 0, 0, 0, 0, false, false); + } + } + if is_dragonized { + PostureModule::set_scale(boma, bigScale, false); + } + } + } + if is_dragonized { + AttackModule::set_power_mul(boma, 1.15); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dragon_frame); +} diff --git a/fighters/tantan/src/punch2/acmd.rs b/fighters/tantan/src/punch2/acmd.rs new file mode 100644 index 0000000000..ec6c6e14a7 --- /dev/null +++ b/fighters/tantan/src/punch2/acmd.rs @@ -0,0 +1,108 @@ +use super::*; + +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *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_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/punch2/mod.rs b/fighters/tantan/src/punch2/mod.rs new file mode 100644 index 0000000000..455494dcc1 --- /dev/null +++ b/fighters/tantan/src/punch2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/punch3/acmd.rs b/fighters/tantan/src/punch3/acmd.rs new file mode 100644 index 0000000000..65d6a63aee --- /dev/null +++ b/fighters/tantan/src/punch3/acmd.rs @@ -0,0 +1,123 @@ +use super::*; + +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; + let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; + frame(lua_state, reboundFrame); + //Rebound hitbox + if is_excute(agent) { + if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *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_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *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_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +//Fly controls when RamRam gets sent outwards +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/punch3/mod.rs b/fighters/tantan/src/punch3/mod.rs new file mode 100644 index 0000000000..70f95fca76 --- /dev/null +++ b/fighters/tantan/src/punch3/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch3"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/ring/acmd.rs b/fighters/tantan/src/ring/acmd.rs new file mode 100644 index 0000000000..94c81f2c2f --- /dev/null +++ b/fighters/tantan/src/ring/acmd.rs @@ -0,0 +1,55 @@ +use super::*; + +unsafe extern "C" fn game_attackfly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +//Fire ramram +unsafe extern "C" fn game_attacks4fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //Scoop for the first few frames, then send back and down + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackfly", game_attackfly); + agent.acmd("game_attacks4fly", game_attacks4fly); +} diff --git a/fighters/tantan/src/ring/mod.rs b/fighters/tantan/src/ring/mod.rs new file mode 100644 index 0000000000..a7facdd2ea --- /dev/null +++ b/fighters/tantan/src/ring/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_ring"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/status.rs b/fighters/tantan/src/status.rs deleted file mode 100644 index 616a7e640d..0000000000 --- a/fighters/tantan/src/status.rs +++ /dev/null @@ -1,405 +0,0 @@ -use super::*; -use globals::*; -// status script import - - -/// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - //remove double dragon effect - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE]) || !sv_information::is_ready_go() { - let dragonEffect = VarModule::get_int(fighter.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE) as u32; - if EffectModule::is_exist_effect(fighter.module_accessor, dragonEffect){ - EffectModule::kill(fighter.module_accessor, dragonEffect, false,false); - } - VarModule::set_int(fighter.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE,0); - } - true.into() -} - -extern "C" fn tantan_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_TANTAN { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -// FIGHTER_STATUS_KIND_JUMP // - -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - let arg = !(fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP); - - if fighter.status_pre_Jump_Common_param(L2CValue::Bool(arg)).get_bool() { - return 1.into() - } - else { - - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_NONE), - L2CValue::I32(*FS_SUCCEEDS_KEEP_EFFECT | *FS_SUCCEEDS_KEEP_SOUND | *FS_SUCCEEDS_KEEP_TRANSITION) - ); - } - else { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - } - return 0.into() - } -} - -//Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash - -pub unsafe extern "C" fn pre_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_button_on(Buttons::Catch) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_CATCH, false); - return 1.into(); - } - return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_JUMP_SQUAT)(fighter); -} - -unsafe extern "C" fn tantan_attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - - return smashline::original_status(Main, fighter, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL)(fighter); -} - -//ARMS land, prevents ARMDashing - -unsafe extern "C" fn tantan_attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.motion_frame() < 2.0 { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - } - - return 0.into(); -} - -// Normal Jab // - -unsafe extern "C" fn tantan_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_Attack(); -} - -unsafe extern "C" fn tantan_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.check_attack_mtrans(); - } - fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(L2CFighterCommon_bind_address_call_check_attack_mtrans as *const () as _)); - fighter.sub_status_AttackComboCommon(); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) -} - -//Ftilt// - -unsafe extern "C" fn tantan_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackS3(); -} - -unsafe extern "C" fn tantan_attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_AttackS3_Main(); -} - -unsafe extern "C" fn tantan_attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(fighter.module_accessor){ - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - } - else{ - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - } - return 0.into(); -} - -//Fsmash// - -unsafe extern "C" fn tantan_attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackS4Start(); -} - -unsafe extern "C" fn tantan_attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_AttackS4Start(); -} - -unsafe extern "C" fn tantan_attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); - return fighter.status_pre_AttackS4Hold(); -} - -unsafe extern "C" fn tantan_attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold as *const () as _)) -} - -pub unsafe extern "C" fn tantan_attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if 0 < bigFrame && bigFrame < 2 { - WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - return 0.into() -} - -pub unsafe extern "C" fn tantan_attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if 0 < bigFrame && bigFrame < 2 { - WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - return 0.into() -} - -unsafe extern "C" fn tantan_attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if fighter.motion_frame() > 16.0 && WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0 { - if bigFrame > 0 { - let maxBigFrame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_private"),hash40("arm_l_big_frame")); - let newBigFrame = (bigFrame-(maxBigFrame/2)).max(1); - WorkModule::set_int(fighter.module_accessor, newBigFrame, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - } - return fighter.status_end_AttackS4(); -} - -// Aerial Attacks - -unsafe extern "C" fn tantan_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackAir(); -} - -unsafe extern "C" fn tantan_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_end_AttackAir(); -} - -//Grab// - -unsafe extern "C" fn tantan_catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_Catch(); -} - -unsafe extern "C" fn tantan_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_Catch(); -} - -unsafe extern "C" fn tantan_catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_STATUS_KIND_CATCH { - fighter.status_CatchPull_common(hash40("catch_wait").into()); - ControlModule::reset_trigger(fighter.module_accessor); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull2"), 9.0, 1.0, false, 0.0, false, false); - return fighter.main_shift(catch_pull_main_loop) - } - else { - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_CATCH_PULL)(fighter); - } -} - -unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_CatchPull_Main() -} -// Neutral Special (Air) - -unsafe extern "C" fn tantan_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR - { - return fighter.status_pre_AttackAir(); - } - else{ - return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); - } -} - -unsafe extern "C" fn tantan_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR - { - let fighter_log_attack_kind = *FIGHTER_LOG_ATTACK_KIND_ATTACK_AIR_F; - smash_script::notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b94de0d96), FIGHTER_LOG_ACTION_CATEGORY_KEEP, fighter_log_attack_kind); - let motion_kind = Hash40::new("attack_air_f").hash; - WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackAir_Main as *const () as _)) - } - else { - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); - } -} - -unsafe extern "C" fn tantan_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - return 0.into(); - } - - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_ATTACK_SHORT_R); - return 0.into(); -} - -unsafe extern "C" fn tantan_landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::prev_status_kind(fighter.module_accessor, 0) == *FIGHTER_STATUS_KIND_SPECIAL_N - { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_LandingAttackAir_Main as *const () as _)) - } - else{ - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR)(fighter); - } -} - -unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if (fighter.motion_frame() <= 30.0) - && !fighter.is_button_on(Buttons::Special) - { - fighter.change_status_req(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, false); - return 0.into(); - } - return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter); -} - -unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND){ - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - *FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI as u64, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - return 0.into(); - } - else - { - return smashline::original_status(Pre, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)(fighter); - } -} - -unsafe extern "C" fn tantan_special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick = Vector2f::new( - fighter.stick_x(), - fighter.stick_y() - ); - let angle = ((stick.x)*-10.0*PostureModule::lr(fighter.module_accessor))-5.0; - WorkModule::set_float(fighter.module_accessor, angle, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - if (fighter.motion_frame()>=10.0) - { - fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); - } - return 0.into(); -} - -unsafe extern "C" fn tantan_special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let angle = WorkModule::get_float(fighter.module_accessor,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); - return 0.into(); -} -pub fn install() { - smashline::Agent::new("tantan") - .on_start(tantan_init) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat) - .status( - Main, - *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, - tantan_attack_jump_aerial_main, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, - tantan_attack_landing_exec, - ) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec) - .status( - Pre, - *FIGHTER_STATUS_KIND_ATTACK_S4_START, - tantan_attack_s4_start_pre, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4_START, - tantan_attack_s4_start_main, - ) - .status( - Pre, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_pre, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_main, - ) - .status( - Exec, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_exec, - ) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end) - .status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre) - .status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_PULL, - tantan_catch_pull_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec) - .status( - Main, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - tantan_landing_air_main, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND, - tantan_special_hi_exec, - ) - .status( - Pre, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, - tantan_special_hi_air_pre, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, - tantan_special_hi_air_exec, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH, - tantan_special_hi_air_reach_exec, - ) - .install(); -} diff --git a/fighters/tantan/src/status/attack.rs b/fighters/tantan/src/status/attack.rs new file mode 100644 index 0000000000..4643715c55 --- /dev/null +++ b/fighters/tantan/src/status/attack.rs @@ -0,0 +1,22 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_Attack(); +} + +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.check_attack_mtrans(); + } + fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(L2CFighterCommon_bind_address_call_check_attack_mtrans as *const () as _)); + fighter.sub_status_AttackComboCommon(); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, attack_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); +} diff --git a/fighters/tantan/src/status/attack_air.rs b/fighters/tantan/src/status/attack_air.rs new file mode 100644 index 0000000000..a44faef911 --- /dev/null +++ b/fighters/tantan/src/status/attack_air.rs @@ -0,0 +1,31 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackAir(); +} + +unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_end_AttackAir(); +} + +// FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR + +unsafe extern "C" fn landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::prev_status_kind(fighter.module_accessor, 0) == *FIGHTER_STATUS_KIND_SPECIAL_N + { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_LandingAttackAir_Main as *const () as _)) + } + else{ + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR)(fighter); + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); + + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, landing_air_main); +} diff --git a/fighters/tantan/src/status/attack_jump_aerial.rs b/fighters/tantan/src/status/attack_jump_aerial.rs new file mode 100644 index 0000000000..16bb7ba786 --- /dev/null +++ b/fighters/tantan/src/status/attack_jump_aerial.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL + +unsafe extern "C" fn attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); + EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); + EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + + return smashline::original_status(Main, fighter, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, attack_jump_aerial_main); +} diff --git a/fighters/tantan/src/status/attack_landing.rs b/fighters/tantan/src/status/attack_landing.rs new file mode 100644 index 0000000000..f68fddc5f7 --- /dev/null +++ b/fighters/tantan/src/status/attack_landing.rs @@ -0,0 +1,16 @@ +use super::*; + +// FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT +// ARMS land, prevents ARMDashing + +unsafe extern "C" fn attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.motion_frame() < 2.0 { + sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + } + + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, attack_landing_exec); +} diff --git a/fighters/tantan/src/status/attack_s3.rs b/fighters/tantan/src/status/attack_s3.rs new file mode 100644 index 0000000000..ad0e37733f --- /dev/null +++ b/fighters/tantan/src/status/attack_s3.rs @@ -0,0 +1,29 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_S3 + +unsafe extern "C" fn attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackS3(); +} + +unsafe extern "C" fn attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_AttackS3_Main(); +} + +unsafe extern "C" fn attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(fighter.module_accessor){ + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); + } + else{ + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_exec); +} diff --git a/fighters/tantan/src/status/attack_s4.rs b/fighters/tantan/src/status/attack_s4.rs new file mode 100644 index 0000000000..80c8627c74 --- /dev/null +++ b/fighters/tantan/src/status/attack_s4.rs @@ -0,0 +1,64 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4_START + +unsafe extern "C" fn attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackS4Start(); +} + +unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_AttackS4Start(); +} + +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + +unsafe extern "C" fn attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + return fighter.status_pre_AttackS4Hold(); +} + +unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold as *const () as _)) +} + +pub unsafe extern "C" fn attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if 0 < bigFrame && bigFrame < 2 { + WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + return 0.into() +} + +// FIGHTER_STATUS_KIND_ATTACK_S4 + +pub unsafe extern "C" fn attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if 0 < bigFrame && bigFrame < 2 { + WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + return 0.into() +} + +unsafe extern "C" fn attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if fighter.motion_frame() > 16.0 && WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0 { + if bigFrame > 0 { + let maxBigFrame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_private"),hash40("arm_l_big_frame")); + let newBigFrame = (bigFrame-(maxBigFrame/2)).max(1); + WorkModule::set_int(fighter.module_accessor, newBigFrame, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + } + return fighter.status_end_AttackS4(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main); + + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_exec); + + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_exec); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_end); +} diff --git a/fighters/tantan/src/status/catch.rs b/fighters/tantan/src/status/catch.rs new file mode 100644 index 0000000000..35b072b534 --- /dev/null +++ b/fighters/tantan/src/status/catch.rs @@ -0,0 +1,35 @@ +use super::*; + +// FIGHTER_STATUS_KIND_CATCH + +unsafe extern "C" fn catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_Catch(); +} + +unsafe extern "C" fn catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_Catch(); +} + +// FIGHTER_STATUS_KIND_CATCH_PULL + +unsafe extern "C" fn catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_STATUS_KIND_CATCH { + fighter.status_CatchPull_common(hash40("catch_wait").into()); + ControlModule::reset_trigger(fighter.module_accessor); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull2"), 9.0, 1.0, false, 0.0, false, false); + return fighter.main_shift(catch_pull_main_loop) + } + else { + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_CATCH_PULL)(fighter); + } +} + +unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_CatchPull_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, catch_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, catch_main); + agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,catch_pull_main); +} diff --git a/fighters/tantan/src/status/jump.rs b/fighters/tantan/src/status/jump.rs new file mode 100644 index 0000000000..db86ad1774 --- /dev/null +++ b/fighters/tantan/src/status/jump.rs @@ -0,0 +1,49 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP + +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let arg = !(fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP); + + if fighter.status_pre_Jump_Common_param(L2CValue::Bool(arg)).get_bool() { + return 1.into() + } + else { + + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_NONE), + L2CValue::I32(*FS_SUCCEEDS_KEEP_EFFECT | *FS_SUCCEEDS_KEEP_SOUND | *FS_SUCCEEDS_KEEP_TRANSITION) + ); + } + else { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + } + return 0.into() + } +} + +// FIGHTER_STATUS_KIND_JUMP_SQUAT +// Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash + +pub unsafe extern "C" fn jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_button_on(Buttons::Catch) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_CATCH, false); + return 1.into(); + } + return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_JUMP_SQUAT)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, jump_squat_pre); +} diff --git a/fighters/tantan/src/status/mod.rs b/fighters/tantan/src/status/mod.rs new file mode 100644 index 0000000000..00c131ff29 --- /dev/null +++ b/fighters/tantan/src/status/mod.rs @@ -0,0 +1,52 @@ +use super::*; +use globals::*; +// status script import + +mod jump; +mod catch; + +mod attack; +mod attack_air; +mod attack_jump_aerial; +mod attack_landing; +mod attack_s3; +mod attack_s4; + +mod special_n; +mod special_hi; + +/// Re-enables the ability to use aerial specials when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + //remove double dragon effect + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, + *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE]) || !sv_information::is_ready_go() { + let dragonEffect = VarModule::get_int(fighter.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE) as u32; + if EffectModule::is_exist_effect(fighter.module_accessor, dragonEffect){ + EffectModule::kill(fighter.module_accessor, dragonEffect, false,false); + } + VarModule::set_int(fighter.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE,0); + } + true.into() +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + jump::install(agent); + catch::install(agent); + + attack::install(agent); + attack_air::install(agent); + attack_jump_aerial::install(agent); + attack_landing::install(agent); + attack_s3::install(agent); + attack_s4::install(agent); + + special_n::install(agent); + special_hi::install(agent); +} diff --git a/fighters/tantan/src/status/special_hi.rs b/fighters/tantan/src/status/special_hi.rs new file mode 100644 index 0000000000..d096530c88 --- /dev/null +++ b/fighters/tantan/src/status/special_hi.rs @@ -0,0 +1,78 @@ +use super::*; + +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND + +unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if (fighter.motion_frame() <= 30.0) + && !fighter.is_button_on(Buttons::Special) + { + fighter.change_status_req(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, false); + return 0.into(); + } + return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter); +} + +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR + +unsafe extern "C" fn special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND){ + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + *FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI as u64, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + return 0.into(); + } + else + { + return smashline::original_status(Pre, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)(fighter); + } +} + +unsafe extern "C" fn special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick = Vector2f::new( + fighter.stick_x(), + fighter.stick_y() + ); + let angle = ((stick.x)*-10.0*PostureModule::lr(fighter.module_accessor))-5.0; + WorkModule::set_float(fighter.module_accessor, angle, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); + if (fighter.motion_frame()>=10.0) + { + fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); + } + return 0.into(); +} + +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH + +unsafe extern "C" fn special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let angle = WorkModule::get_float(fighter.module_accessor,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); + fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND, special_hi_exec); + agent.status(Pre, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, special_hi_air_pre); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, special_hi_air_exec); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH, special_hi_air_reach_exec); +} diff --git a/fighters/tantan/src/status/special_n.rs b/fighters/tantan/src/status/special_n.rs new file mode 100644 index 0000000000..79146cf3c5 --- /dev/null +++ b/fighters/tantan/src/status/special_n.rs @@ -0,0 +1,44 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N + +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR + { + return fighter.status_pre_AttackAir(); + } + else{ + return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); + } +} + +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR + { + let fighter_log_attack_kind = *FIGHTER_LOG_ATTACK_KIND_ATTACK_AIR_F; + smash_script::notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b94de0d96), FIGHTER_LOG_ACTION_CATEGORY_KEEP, fighter_log_attack_kind); + let motion_kind = Hash40::new("attack_air_f").hash; + WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); + + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackAir_Main as *const () as _)) + } + else { + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); + } +} + +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + return 0.into(); + } + + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_ATTACK_SHORT_R); + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); +} diff --git a/fighters/toonlink/src/acmd/aerials.rs b/fighters/toonlink/src/acmd/aerials.rs index a1f8f89f27..7412580490 100644 --- a/fighters/toonlink/src/acmd/aerials.rs +++ b/fighters/toonlink/src/acmd/aerials.rs @@ -1,297 +1,352 @@ use super::*; use crate::vars::*; -unsafe extern "C" fn toonlink_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.5, 50, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 10.5, 50, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.5, 50, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 10.5, 50, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 35, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 9.0, 35, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 35, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 9.0, 35, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.833); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.833); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 361, 95, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 361, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 1.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 6.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 361, 95, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 361, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 1.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 6.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn toonlink_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 5.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 67, 105, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 67, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 5.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 67, 105, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 67, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.667); + FT_MOTION_RATE(agent, 1.667); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.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 toonlink_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state,4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn toonlink_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 6.25, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 5.25, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 1.5, 367, 100, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 6.25, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 5.25, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 1.5, 367, 100, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 6.75, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 126, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 6.75, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 126, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("toonlink_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("toonlink_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_club_tornado"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 90, 90, 0, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 90, 90, 0, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("toonlink_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("toonlink_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, true); } - } -unsafe extern "C" fn toonlink_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("shield") as i64, hash40("shield_back") as i64); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 33.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercem"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_piercem"), 0); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("shield") as i64, hash40("shield_normal") as i64); } } -unsafe extern "C" fn toonlink_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 1.6, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1.6, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } //get_value_int(*SO_VAR_INT_PREV_STATUS); //0x120e80(0, *FIGHTER_STATUS_KIND_DAMAGE_FLY); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); WorkModule::on_flag(boma,*FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 268, 80, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 268, 80, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 268, 34, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 268, 34, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 98, 0, 40, 5.0, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 98, 0, 40, 5.0, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 71.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn toonlink_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + wait(lua_state, 5.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); + ArticleModule::change_status(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("shoot"), false, 0.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + ArticleModule::change_status_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); + ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("back"), false, 0.0); + WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); + } + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 53.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn effect_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attackairn", toonlink_attack_air_n_game) - .acmd("game_attackairf", toonlink_attack_air_f_game) - .acmd("expression_attackairf", toonlink_attack_air_f_expression) - .acmd("game_attackairb", toonlink_attack_air_b_game) - .acmd("expression_attackairb", toonlink_attack_air_b_expression) - .acmd("game_attackairhi", toonlink_attack_air_hi_game) - .acmd("effect_attackairhi", toonlink_attack_air_hi_effect) - .acmd("expression_attackairhi", toonlink_attack_air_hi_expression) - .acmd("game_attackairlw", toonlink_attack_air_lw_game) - .acmd("game_aircatchlanding", toonlink_landing_air_catch_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("effect_aircatch", effect_aircatch); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/toonlink/src/acmd/ground.rs b/fighters/toonlink/src/acmd/ground.rs index d42403c4c4..54853b869a 100644 --- a/fighters/toonlink/src/acmd/ground.rs +++ b/fighters/toonlink/src/acmd/ground.rs @@ -1,93 +1,92 @@ use super::*; -unsafe extern "C" fn toonlink_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn toonlink_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.2, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.2, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn toonlink_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 30, 70, 0, 75, 3.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 30, 70, 0, 70, 4.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 30, 70, 0, 75, 3.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 30, 70, 0, 70, 4.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn toonlink_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 65, 70, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 65, 70, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 65, 70, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 65, 70, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attack11", toonlink_attack_11_game) - .acmd("game_attack12", toonlink_attack_12_game) - .acmd("game_attack13", toonlink_attack_13_game) - .acmd("game_attackdash", toonlink_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/toonlink/src/acmd/mod.rs b/fighters/toonlink/src/acmd/mod.rs index e2d01f3d67..d8a22387b4 100644 --- a/fighters/toonlink/src/acmd/mod.rs +++ b/fighters/toonlink/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/toonlink/src/acmd/other.rs b/fighters/toonlink/src/acmd/other.rs index e93e5606d5..1342905773 100644 --- a/fighters/toonlink/src/acmd/other.rs +++ b/fighters/toonlink/src/acmd/other.rs @@ -1,292 +1,150 @@ - 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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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(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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_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_toonlink_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_toonlink_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, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_toonlink_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_toonlink_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_toonlink_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_toonlink_step_right_m")); } } -unsafe extern "C" fn toonlink_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 toonlink_jump_aerial_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); +unsafe extern "C" fn effect_jumpaerialfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } - } -unsafe extern "C" fn toonlink_jump_aerial_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); +unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } - } -unsafe extern "C" fn toonlink_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, false, 0); - ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *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_CUTUP, *ATTACK_REGION_OBJECT); - ArticleModule::change_status(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("shoot"), false, 0.0); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - ArticleModule::change_status_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); - ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("back"), false, 0.0); - WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); - } - frame(lua_state, 46.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 53.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 68.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - -} - -unsafe extern "C" fn toonlink_air_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } -} - -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("toonlink") - .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", toonlink_turn_dash_game) - .acmd("effect_jumpaerialfront", toonlink_jump_aerial_f_effect) - .acmd("effect_jumpaerialback", toonlink_jump_aerial_b_effect) - .acmd("game_aircatch", toonlink_air_catch_game) - .acmd("effect_aircatch", toonlink_air_catch_effect) - .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_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("effect_jumpaerialfront", effect_jumpaerialfront); + agent.acmd("effect_jumpaerialback", effect_jumpaerialback); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/toonlink/src/acmd/smashes.rs b/fighters/toonlink/src/acmd/smashes.rs index 2ddd68056e..f113c484d9 100644 --- a/fighters/toonlink/src/acmd/smashes.rs +++ b/fighters/toonlink/src/acmd/smashes.rs @@ -1,101 +1,97 @@ - use super::*; -unsafe extern "C" fn toonlink_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 16.0, 40, 105, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 16.0, 40, 105, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 16.0, 40, 105, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 16.0, 40, 105, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - } - + } } -unsafe extern "C" fn toonlink_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 100, 100, 0, 43, 6.0, 0.0, 6.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 43, 4.0, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 96, 100, 0, 43, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 96, 100, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 100, 100, 0, 43, 6.0, 0.0, 6.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 43, 4.0, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 96, 100, 0, 43, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 96, 100, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 30, 4.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 30, 4.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 11); - ATK_POWER(fighter, 1, 11); - ATK_POWER(fighter, 2, 11); - ATK_POWER(fighter, 3, 11); + if is_excute(agent) { + ATK_POWER(agent, 0, 11); + ATK_POWER(agent, 1, 11); + ATK_POWER(agent, 2, 11); + ATK_POWER(agent, 3, 11); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn toonlink_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 30, 89, 0, 55, 4.0, 0.0, 2.2, 16.0, Some(0.0), Some(2.9), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 30, 89, 0, 55, 4.0, 0.0, 2.2, 16.0, Some(0.0), Some(2.9), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 30, 89, 0, 55, 4.3, 0.0, 4.2, -16.0, Some(0.0), Some(4.2), Some(-5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 13.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 30, 89, 0, 55, 4.3, 0.0, 4.2, -16.0, Some(0.0), Some(4.2), Some(-5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 13.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.880); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.880); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attacks4", toonlink_attack_s4_s_game) - .acmd("game_attackhi4", toonlink_attack_hi4_game) - .acmd("game_attacklw4", toonlink_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/toonlink/src/acmd/specials.rs b/fighters/toonlink/src/acmd/specials.rs index 12b2c64eb0..aaded0375a 100644 --- a/fighters/toonlink/src/acmd/specials.rs +++ b/fighters/toonlink/src/acmd/specials.rs @@ -1,107 +1,103 @@ - use super::*; -unsafe extern "C" fn toonlink_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 90, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 74, 100, 83, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.5, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 90, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 74, 100, 83, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.5, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 90, 0, 5.5, 3.0, 2.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 90, 0, 5.5, 3.0, 2.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 88, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 88, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 88, 0, 5.5, 2.5, 1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 88, 0, 5.5, 2.5, 1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 77, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 77, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 80, 0, 5.5, 3.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 80, 0, 5.5, 3.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 83, 100, 74, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 83, 100, 74, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 140, 100, 80, 0, 5.5, 4.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 140, 100, 80, 0, 5.5, 4.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 186, 0, 40, 8.5, 0.0, 7.5, 13.0, Some(0.0), Some(7.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 186, 0, 40, 8.5, 0.0, 7.5, 13.0, Some(0.0), Some(7.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_specialairhi", toonlink_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/toonlink/src/acmd/throws.rs b/fighters/toonlink/src/acmd/throws.rs index d58fa3595e..facc07a396 100644 --- a/fighters/toonlink/src/acmd/throws.rs +++ b/fighters/toonlink/src/acmd/throws.rs @@ -1,28 +1,26 @@ use super::*; -unsafe extern "C" fn toonlink_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 130, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 130, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -16, 1); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -16, 1); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_throwb", toonlink_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/toonlink/src/acmd/tilts.rs b/fighters/toonlink/src/acmd/tilts.rs index 3f63db0118..d2f51860ec 100644 --- a/fighters/toonlink/src/acmd/tilts.rs +++ b/fighters/toonlink/src/acmd/tilts.rs @@ -1,68 +1,64 @@ - use super::*; -unsafe extern "C" fn toonlink_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 38, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 38, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 361, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 361, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn toonlink_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 95, 86, 0, 46, 3.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 85, 86, 0, 46, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 95, 86, 0, 46, 3.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 85, 86, 0, 46, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn toonlink_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 75, 65, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 9.0, 28, 34, 0, 70, 3.5, 8.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 75, 65, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 9.0, 28, 34, 0, 70, 3.5, 8.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attacks3", toonlink_attack_s3_s_game) - .acmd("game_attackhi3", toonlink_attack_hi3_game) - .acmd("game_attacklw3", toonlink_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/toonlink/src/lib.rs b/fighters/toonlink/src/lib.rs index 8e2ddcc726..3def8a8e49 100644 --- a/fighters/toonlink/src/lib.rs +++ b/fighters/toonlink/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("toonlink"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/toonlink/src/opff.rs b/fighters/toonlink/src/opff.rs index 734a43467a..9acf13090f 100644 --- a/fighters/toonlink/src/opff.rs +++ b/fighters/toonlink/src/opff.rs @@ -110,8 +110,7 @@ pub unsafe fn toonlink_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("toonlink") - .on_line(Main, toonlink_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, toonlink_frame_wrapper); } diff --git a/fighters/toonlink/src/status/mod.rs b/fighters/toonlink/src/status/mod.rs new file mode 100644 index 0000000000..6694e3bd13 --- /dev/null +++ b/fighters/toonlink/src/status/mod.rs @@ -0,0 +1,9 @@ +use super::*; +use globals::*; +// status script import + +mod special_hi; + +pub fn install(agent: &mut Agent) { + special_hi::install(agent); +} diff --git a/fighters/toonlink/src/status.rs b/fighters/toonlink/src/status/special_hi.rs similarity index 93% rename from fighters/toonlink/src/status.rs rename to fighters/toonlink/src/status/special_hi.rs index 476c669639..2f316fc362 100644 --- a/fighters/toonlink/src/status.rs +++ b/fighters/toonlink/src/status/special_hi.rs @@ -1,10 +1,8 @@ use super::*; -use globals::*; - -// FIGHTER_STATUS_KIND_SPECIAL_HI // +// FIGHTER_STATUS_KIND_SPECIAL_HI -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); @@ -61,7 +59,7 @@ unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2 return 0.into() } -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; StatusModule::init_settings( fighter.module_accessor, @@ -90,7 +88,7 @@ pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { @@ -218,18 +216,9 @@ unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L } return 0.into() } -pub fn install() { - smashline::Agent::new("toonlink") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status( - Pre, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - pre_specialhi_end, - ) - .status( - Main, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - specialhi_end, - ) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); } diff --git a/fighters/trail/src/acmd/aerials.rs b/fighters/trail/src/acmd/aerials.rs index 7e5bd6bae6..cd86100252 100644 --- a/fighters/trail/src/acmd/aerials.rs +++ b/fighters/trail/src/acmd/aerials.rs @@ -1,292 +1,291 @@ use super::*; -unsafe extern "C" fn sora_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { MotionModule::set_rate(boma, (11.0-1.0)/3.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //MotionModule::set_rate(boma, 2.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 361, 115, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 361, 115, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 0, 25, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 0, 25, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 0.5); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("trail_air_lw_fall"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("trail_air_lw_fall"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 1.5, 0, 0, 90, 1.15, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -1.0, 1.0, 0, 0, 90, 1.2, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 4.0, 0, 0, 0, 90.0, 0.5, true); - //LAST_EFFECT_SET_COLOR(fighter, 4.0, 5.0, 1.0); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 8.0, 0, 0, 0, 90.0, 0.5, true); - //LAST_EFFECT_SET_COLOR(fighter, 4.0, 5.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_light"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 1.5, 0, 0, 90, 1.15, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -1.0, 1.0, 0, 0, 90, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 4.0, 0, 0, 0, 90.0, 0.5, true); + //LAST_EFFECT_SET_COLOR(agent, 4.0, 5.0, 1.0); + //EFFECT_FOLLOW(agent, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 8.0, 0, 0, 0, 90.0, 0.5, true); + //LAST_EFFECT_SET_COLOR(agent, 4.0, 5.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_light"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_light"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_light"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_attackair_l01")); - //STOP_SE_arg2(fighter, Hash40::new("se_trail_jump02"), 50); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_attackair_l01")); + //STOP_SE_arg2(agent, Hash40::new("se_trail_jump02"), 50); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_attackair_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_attackair_l02")); } } -unsafe extern "C" fn sora_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (1.0)); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 75, 4, 0, 60, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, -1.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 75, 4, 0, 60, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, -1.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); wait(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_F_FLAG_CHECK_COMBO_BUTTON_ON); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.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 sora_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_CHECK_COMBO_BUTTON_ON); //MotionModule::set_rate(boma, 1.25); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 78, 8, 0, 75, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 78, 8, 0, 75, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, -1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_CHECK_COMBO_BUTTON_ON); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (37.0-20.0)/12.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_air_f3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 0.0, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 4.5, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.5, 40, 110, 0, 50, 4.6, 0.0, 9.5, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 0.0, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 4.5, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.5, 40, 110, 0, 50, 4.6, 0.0, 9.5, -1.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sora_attack_air_f3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); VarModule::off_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 100, 0, 20, 4.5, 1.5, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.5, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 4.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 8.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 100, 0, 20, 4.5, 1.5, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.5, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 4.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 8.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.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 sora_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); if VarModule::is_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR){ VarModule::on_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); @@ -294,69 +293,68 @@ unsafe extern "C" fn sora_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (9.5-5.0)/5.0); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (20.0-9.5)/8.0); if VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 4.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 8.2, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 4.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 8.2, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.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 sora_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 15.5; let attack_end_frame = 25.0; let attack_duration = 7.0; let attack_duration_rate = (attack_end_frame-attack_start_frame)/attack_duration; let spike_start_frame = attack_start_frame + 5.0*attack_duration_rate; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (10.0-1.0)/3.0); VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); if VarModule::is_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR){ @@ -365,184 +363,188 @@ unsafe extern "C" fn sora_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (attack_start_frame-10.0)/4.0); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, attack_duration_rate); if VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.5, 62, 117, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 4.25, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 8.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.5, 62, 117, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 4.25, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 8.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 4.25, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 8.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 4.25, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 8.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } } frame(lua_state, spike_start_frame); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 58, 80, 0, 60, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 58, 80, 0, 60, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 58, 80, 0, 60, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 58, 80, 0, 60, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } //println!("spike start"); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); //println!("spike end"); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (50.0-30.0)/13.0); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); } - } -unsafe extern "C" fn sora_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 5); } } -unsafe extern "C" fn sora_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_trail_attackair_n03")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_trail_attackair_n03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } } -unsafe extern "C" fn sora_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_81_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_81_attackl"), 0); } } -unsafe extern "C" fn sora_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn sora_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sora_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_trail_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_trail_landing02")); } } -unsafe extern "C" fn sora_landing_air_lw_expression(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_landingairlw(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); ControlModule::set_rumble(boma, Hash40::new("rbkind_81_landingairlw"), 0, false, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if ItemModule::is_have_item(boma, 0){ - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0); + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0); } } frame(lua_state, 27.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.08); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.08); } frame(lua_state, 32.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.03); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.03); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attackairn", sora_attack_air_n_game) - .acmd("effect_attackairn", sora_attack_air_n_effect) - .acmd("sound_attackairn", sora_attack_air_n_sound) - .acmd("game_attackairf", sora_attack_air_f_game) - .acmd("effect_attackairf", sora_attack_air_f_effect) - .acmd("game_attackairf2", sora_attack_air_f2_game) - .acmd("game_attackairf3", sora_attack_air_f3_game) - .acmd("effect_attackairf3", sora_attack_air_f3_effect) - .acmd("game_attackairb", sora_attack_air_b_game) - .acmd("game_attackairhi", sora_attack_air_hi_game) - .acmd("effect_attackairhi", sora_attack_air_hi_effect) - .acmd("game_attackairlw", sora_attack_air_lw_game) - .acmd("effect_attackairlw", sora_attack_air_lw_effect) - .acmd("sound_attackairlw", sora_attack_air_lw_sound) - .acmd("expression_attackairlw", sora_attack_air_lw_expression) - .acmd("game_landingairlw", sora_landing_air_lw_game) - .acmd("effect_landingairlw", sora_landing_air_lw_effect) - .acmd("sound_landingairlw", sora_landing_air_lw_sound) - .acmd("expression_landingairlw", sora_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairf2", game_attackairf2); + + agent.acmd("game_attackairf3", game_attackairf3); + agent.acmd("effect_attackairf3", effect_attackairf3); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/trail/src/acmd/ground.rs b/fighters/trail/src/acmd/ground.rs index 13d3be225b..7d1ff53979 100644 --- a/fighters/trail/src/acmd/ground.rs +++ b/fighters/trail/src/acmd/ground.rs @@ -1,253 +1,250 @@ - use super::*; -unsafe extern "C" fn sora_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 7.0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (30.0-18.0)/7.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); - EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn sora_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(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) { MotionModule::set_rate(boma, (4.0-1.0)/1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 85, 16, 0, 25, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 85, 16, 0, 25, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (25.0-14.0)/9.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("trail_keyblade_speedline"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("trail_keyblade_speedline"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } } -unsafe extern "C" fn sora_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(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) { MotionModule::set_rate(boma, (5.0-1.0)/2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + //ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 3.0); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sora_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_atk_slash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_atk_slash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } } -unsafe extern "C" fn sora_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(4.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(4.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(9.0-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(9.0-4.0)); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - //HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + //HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 2.5, 5.0, 0.0, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 2.5, 5.0, 0.0, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("trans"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("trans"), *HIT_STATUS_NORMAL); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 40.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("trans"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("trans"), *HIT_STATUS_OFF); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); } - frame(lua_state, 52.0); - } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attack11", sora_attack_11_game) - .acmd("effect_attack11", sora_attack_11_effect) - .acmd("game_attack12", sora_attack_12_game) - .acmd("effect_attack12", sora_attack_12_effect) - .acmd("game_attack13", sora_attack_13_game) - .acmd("effect_attack13", sora_attack_13_effect) - .acmd("game_attackdash", sora_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/trail/src/acmd/mod.rs b/fighters/trail/src/acmd/mod.rs index c2888e2ab1..d8a22387b4 100644 --- a/fighters/trail/src/acmd/mod.rs +++ b/fighters/trail/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; -mod tilts; + mod ground; -mod other; -mod specials; +mod tilts; mod smashes; +mod aerials; +mod specials; mod throws; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/trail/src/acmd/other.rs b/fighters/trail/src/acmd/other.rs index bf28f7b809..5770d37e85 100644 --- a/fighters/trail/src/acmd/other.rs +++ b/fighters/trail/src/acmd/other.rs @@ -1,200 +1,126 @@ 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_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(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_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_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_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); 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 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_trail_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_trail_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, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_trail_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_trail_step_left_l")); } } -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 run_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_run(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); loop { frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_step_right_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_step_right_l")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_step_left_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_step_left_l")); } - fighter.clear_lua_stack(); + agent.clear_lua_stack(); sv_animcmd::wait_loop_sync_mot(lua_state); - fighter.pop_lua_stack(1); + agent.pop_lua_stack(1); } } -pub fn install() { - smashline::Agent::new("trail") - .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("game_dash", game_dash) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_run", run_sound) - .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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("sound_run", sound_run); } diff --git a/fighters/trail/src/acmd/smashes.rs b/fighters/trail/src/acmd/smashes.rs index 965aaa0f13..18bb793137 100644 --- a/fighters/trail/src/acmd/smashes.rs +++ b/fighters/trail/src/acmd/smashes.rs @@ -1,44 +1,43 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(17.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(17.0-7.0)); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 4.6, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 40, 107, 0, 30, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 4.6, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 40, 107, 0, 30, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.5); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 3.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.5, 40, 109, 0, 35, 3.4, 0.0, 7.8, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 3.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.5, 40, 109, 0, 35, 3.4, 0.0, 7.8, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } @@ -75,95 +74,95 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 85, 20, 0, 88, 3.8, 0.0, 4.0, 0.0, Some(0.0), Some(7.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 85, 20, 0, 88, 3.8, 0.0, 4.0, 0.0, Some(0.0), Some(7.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 12.5, 76, 85, 0, 45, 4.0, 0.0, 4.0, -6.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 11.5, 76, 80, 0, 45, 4.0, 0.0, 4.0, -12.0, Some(0.0), Some(4.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 12.5, 76, 85, 0, 45, 4.0, 0.0, 4.0, -6.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 11.5, 76, 80, 0, 45, 4.0, 0.0, 4.0, -12.0, Some(0.0), Some(4.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_smash_lw_flash"), Hash40::new("haver"), 0, 11, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_smash_lw_flash"), Hash40::new("haver"), 0, 11, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_smash_lw_speedline"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_smash_lw_speedline"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_smash_lw_flash"), false, true); - EFFECT(fighter, Hash40::new("trail_smash_lw_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 0.4); - EFFECT(fighter, Hash40::new("trail_smash_lw_attack"), Hash40::new("haver"), 0, -2, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_smash_lw_flash"), false, true); + EFFECT(agent, Hash40::new("trail_smash_lw_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 0.4); + EFFECT(agent, Hash40::new("trail_smash_lw_attack"), Hash40::new("haver"), 0, -2, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } frame(lua_state, 57.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -0.9, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -0.9, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/trail/src/acmd/specials.rs b/fighters/trail/src/acmd/specials.rs index 4cb3c95836..93e4928aa4 100644 --- a/fighters/trail/src/acmd/specials.rs +++ b/fighters/trail/src/acmd/specials.rs @@ -1,215 +1,215 @@ use super::*; -unsafe extern "C" fn game_specialn3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_FLAG_CHANGE_MAGIC); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } } -unsafe extern "C" fn game_specialairn3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairn3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_FLAG_CHANGE_MAGIC); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn game_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if agent.kind() == *FIGHTER_KIND_KIRBY { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.25); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.25); + if is_excute(agent) { AttackModule::clear(boma, 0, false); WorkModule::set_float(boma, 4.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_CHANGE_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 16.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -8.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 24.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -2.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 12.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -14.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_LAST_SHOOT); WorkModule::set_float(boma, 0.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 42, 64, 0, 52, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(6.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 42, 64, 0, 52, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(6.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear(boma, 0, false); WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 57.0); - FT_START_ADJUST_MOTION_FRAME_arg1(fighter, 1.0); + FT_START_ADJUST_MOTION_FRAME_arg1(agent, 1.0); } else { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); ArticleModule::remove_exist(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, Hash40::new("special_n2"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_CHANGE_MAGIC); } } } -unsafe extern "C" fn effect_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_ice_hold"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_ice_hold"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("trail_ice_sword_flare"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_ice_sword_flare"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 0, 180, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 180, 180, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 0, 180, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 180, 180, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.25); } } @@ -230,93 +230,93 @@ unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_81_special_n2"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 43.0); if ItemModule::is_have_item(boma, 0) { - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.05); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.05); } } frame(lua_state, 49.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.08); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.08); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } frame(lua_state, 58.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0); } } // Now unused -unsafe extern "C" fn game_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialairs1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } // Is now effectively Sonic Blade 1 -unsafe extern "C" fn game_specials2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); if angle == 0.0 || angle >= 180.0 { @@ -324,42 +324,42 @@ unsafe extern "C" fn game_specials2(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } // Ensure only specials2 comes out - WorkModule::set_int(fighter.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(boma, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } -unsafe extern "C" fn game_specialairs2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); if angle == 0.0 || angle >= 180.0 { @@ -367,67 +367,67 @@ unsafe extern "C" fn game_specialairs2(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); // KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } // Ensure only specials2 comes out - WorkModule::set_int(fighter.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(boma, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } -unsafe extern "C" fn sound_specials2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { +unsafe extern "C" fn sound_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { let rng = sv_math::rand(hash40("fighter"), 3) as i32; if rng == 2 { - PLAY_SE(fighter, Hash40::new("vc_trail_special_s01")); + PLAY_SE(agent, Hash40::new("vc_trail_special_s01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } } frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s02")); } } -unsafe extern "C" fn game_specials3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3(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) { let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { // For when you're *not* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } } else { // For when you *are* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); @@ -435,52 +435,52 @@ unsafe extern "C" fn game_specials3(fighter: &mut L2CAgentBase) { GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } -unsafe extern "C" fn game_specialairs3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3(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) { let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { // For when you're *not* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } } else { // For when you *are* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); @@ -488,113 +488,73 @@ unsafe extern "C" fn game_specialairs3(fighter: &mut L2CAgentBase) { GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } -unsafe extern "C" fn sound_specials3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s03")); } } else { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s04")); } } } -unsafe extern "C" fn effect_specialsstart2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialsup(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialsdown(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsstart2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsup(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsdown(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsstart2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(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) { VarModule::off_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_JUMP_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.8, 86, 100, 116, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.8, 88, 100, 82, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.8, 86, 100, 116, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.8, 88, 100, 82, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.8, 110, 100, 120, 0, 4.2, 0.0, 4.2, 16.8, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.8, 108, 100, 86, 0, 4.2, 0.0, 12.6, 16.8, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.8, 94, 100, 130, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.8, 92, 100, 76, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 3.8, 110, 100, 120, 0, 4.2, 0.0, 4.2, 16.8, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.8, 108, 100, 86, 0, 4.2, 0.0, 12.6, 16.8, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.8, 94, 100, 130, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.8, 92, 100, 76, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 2, true, false); AttackModule::set_no_finish_camera(boma, 3, true, false); AttackModule::set_no_finish_camera(boma, 4, true, false); @@ -602,17 +562,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 80, 100, 124, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 82, 100, 70, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 106, 100, 122, 0, 2.4, 0.0, 7.6, -12.2, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 108, 100, 78, 0, 2.4, 0.0, 12.2, -12.2, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 94, 100, 114, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 92, 100, 68, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 80, 100, 124, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 82, 100, 70, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 106, 100, 122, 0, 2.4, 0.0, 7.6, -12.2, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 108, 100, 78, 0, 2.4, 0.0, 12.2, -12.2, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 94, 100, 114, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 92, 100, 68, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -622,17 +582,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 76, 100, 92, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 78, 100, 62, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 108, 100, 100, 0, 2.8, 0.0, 4.6, 14.6, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 106, 100, 72, 0, 2.8, 0.0, 10.0, 14.6, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 92, 100, 110, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 90, 100, 58, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 76, 100, 92, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 78, 100, 62, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 108, 100, 100, 0, 2.8, 0.0, 4.6, 14.6, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 106, 100, 72, 0, 2.8, 0.0, 10.0, 14.6, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 92, 100, 110, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 90, 100, 58, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -642,18 +602,18 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 88, 100, 92, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 84, 100, 46, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 102, 100, 88, 0, 2.4, 0.0, 8.8, -12.2, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 106, 100, 48, 0, 2.4, 0.0, 13.4, -12.2, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 92, 100, 90, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 90, 100, 48, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 88, 100, 92, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 84, 100, 46, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 102, 100, 88, 0, 2.4, 0.0, 8.8, -12.2, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 106, 100, 48, 0, 2.4, 0.0, 13.4, -12.2, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 92, 100, 90, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 90, 100, 48, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -663,17 +623,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 74, 100, 90, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 72, 100, 72, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 98, 100, 92, 0, 2.8, 0.0, 7.2, 14.6, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 96, 100, 72, 0, 2.8, 0.0, 12.6, 14.6, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 94, 100, 102, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 92, 100, 62, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 74, 100, 90, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 72, 100, 72, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 98, 100, 92, 0, 2.8, 0.0, 7.2, 14.6, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 96, 100, 72, 0, 2.8, 0.0, 12.6, 14.6, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 94, 100, 102, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 92, 100, 62, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -683,17 +643,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 125, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 150, 100, 110, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 130, 100, 150, 0, 2.4, 0.0, 8.2, -12.2, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 150, 100, 150, 0, 2.4, 0.0, 12.8, -12.2, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 130, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 150, 100, 130, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 125, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 150, 100, 110, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 130, 100, 150, 0, 2.4, 0.0, 8.2, -12.2, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 150, 100, 150, 0, 2.4, 0.0, 12.8, -12.2, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 130, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 150, 100, 130, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -703,123 +663,80 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 5.2, 0.0, 7.4, 8.4, Some(0.0), Some(9.6), Some(8.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 4.8, 0.0, 12.6, 15.6, Some(0.0), Some(14.8), Some(15.6), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 5.2, 0.0, 7.4, 8.4, Some(0.0), Some(9.6), Some(8.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 4.8, 0.0, 12.6, 15.6, Some(0.0), Some(14.8), Some(15.6), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); if VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_COMMAND_ACCEPT); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_COMMAND_ACCEPT); } frame(lua_state, 75.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 79.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn game_trail_fire_fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let lr = PostureModule::lr(boma); - let offset = Vector2f {x: (14.0 * lr), y: 7.5}; // distance for article to be offset - PostureModule::add_pos_2d(boma, &offset); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.6, 361, 24, 0, 42, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.2, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.2, 361, 22, 0, 36, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.8, 361, 20, 0, 32, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn3", game_specialn3); + agent.acmd("game_specialairn3", game_specialairn3); -unsafe extern "C" fn game_falllast(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, None, None, None, 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, Some(0.0), Some(10.0), Some(0.0), 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); -} + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specialairs2); + agent.acmd("sound_specials2", sound_specials2); + agent.acmd("sound_specialairs2", sound_specials2); + + agent.acmd("game_specials3", game_specials3); + agent.acmd("game_specialairs3", game_specialairs3); + agent.acmd("sound_specials3", sound_specials3); + agent.acmd("sound_specialairs3", sound_specials3); -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_specialn3", game_specialn3) - .acmd("game_specialairn3", game_specialairn3) - .acmd("game_specialn2", game_specialn2) - .acmd("game_specialairn2", game_specialn2) - .acmd("effect_specialn2", effect_specialn2) - .acmd("effect_specialairn2", effect_specialn2) - .acmd("sound_specialn2", sound_specialn2) - .acmd("sound_specialairn2", sound_specialn2) - .acmd("expression_specialn2", expression_specialn2) - .acmd("expression_specialairn2", expression_specialn2) - .acmd("game_specials1", game_specials1) - .acmd("game_specialairs1", game_specialairs1) - .acmd("game_specials2", game_specials2) - .acmd("game_specialairs2", game_specialairs2) - .acmd("sound_specials2", sound_specials2) - .acmd("sound_specialairs2", sound_specials2) - .acmd("game_specials3", game_specials3) - .acmd("game_specialairs3", game_specialairs3) - .acmd("sound_specials3", sound_specials3) - .acmd("sound_specialairs3", sound_specials3) - .acmd("effect_specialsstart2", effect_specialsstart2) - .acmd("effect_specialsup", effect_specialsup) - .acmd("effect_specialsdown", effect_specialsdown) - .acmd("effect_specialairsstart2", effect_specialairsstart2) - .acmd("effect_specialairsup", effect_specialairsup) - .acmd("effect_specialairsdown", effect_specialairsdown) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialhi) - .install(); - smashline::Agent::new("trail_fire") - .acmd("game_fly", game_trail_fire_fly) - .acmd("game_fly2", game_trail_fire_fly) - .install(); - smashline::Agent::new("trail_thunder") - .acmd("game_falllast", game_falllast) - .install(); + agent.acmd("effect_specialsstart2", effect_specialsstart2); + agent.acmd("effect_specialairsstart2", effect_specialsstart2); + agent.acmd("effect_specialsup", effect_specialsstart2); + agent.acmd("effect_specialairsup", effect_specialsstart2); + agent.acmd("effect_specialsdown", effect_specialsstart2); + agent.acmd("effect_specialairsdown", effect_specialsstart2); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); } diff --git a/fighters/trail/src/acmd/throws.rs b/fighters/trail/src/acmd/throws.rs index 172fec8082..68b13a708a 100644 --- a/fighters/trail/src/acmd/throws.rs +++ b/fighters/trail/src/acmd/throws.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn trail_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 trail_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -48,7 +48,7 @@ unsafe extern "C" fn trail_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn trail_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -72,81 +72,80 @@ unsafe extern "C" fn trail_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn trail_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 84, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 84, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 7.6, 48, 68, 0, 106, 4.0, 1.6, 0.0, 0.0, Some(7.2), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 7.6, 48, 68, 0, 106, 4.0, 1.6, 0.0, 0.0, Some(7.2), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 8); + CHECK_FINISH_CAMERA(agent, 13, 8); } frame(lua_state, 34.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn trail_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.8, 108, 65, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.8, 108, 65, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 18); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn trail_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 74, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 74, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 3, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 3, 1); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_catch", trail_catch_game) - .acmd("game_catchdash", trail_catch_dash_game) - .acmd("game_catchturn", trail_catch_turn_game) - .acmd("game_throwb", trail_throw_b_game) - .acmd("game_throwhi", trail_throw_hi_game) - .acmd("game_throwlw", trail_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/trail/src/acmd/tilts.rs b/fighters/trail/src/acmd/tilts.rs index f0f0f8a67d..d03ed8da70 100644 --- a/fighters/trail/src/acmd/tilts.rs +++ b/fighters/trail/src/acmd/tilts.rs @@ -1,88 +1,86 @@ - use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 0.3); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 0.3); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_S3_FLAG_CHECK_COMBO_BUTTON_ON); } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3) { // Jab 2 -> Ftilt cancel - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 80, 30, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 80, 30, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } else { // Normal ftilt - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 9.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 9.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } - } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 80, 20, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 80, 20, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 0.84); + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 0.84); } else { - FT_MOTION_RATE(fighter, 0.84); + FT_MOTION_RATE(agent, 0.84); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 27.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 1.4); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 1.4); } } } -unsafe extern "C" fn game_attacks3s2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 65, 12, 0, 50, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 80, 12, 0, 50, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 95, 12, 0, 50, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 25, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 23, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 180, 22, 0, 24, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 65, 12, 0, 50, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 80, 12, 0, 50, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 95, 12, 0, 50, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 25, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 23, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 180, 22, 0, 24, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 10.0, false); @@ -91,156 +89,155 @@ unsafe extern "C" fn game_attacks3s2(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 10.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_S3_FLAG_CHECK_COMBO_BUTTON_ON); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_attacks3s3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attacks3s3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 4.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 9.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 4.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 9.2, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - //ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.4, 42, 90, 0, 70, 3.4, 0.0, 9.2, -6.8, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 6.4, 42, 90, 0, 70, 3.6, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(14.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + //ATTACK(agent, 3, 0, Hash40::new("haver"), 6.4, 42, 90, 0, 70, 3.4, 0.0, 9.2, -6.8, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + //ATTACK(agent, 4, 0, Hash40::new("top"), 6.4, 42, 90, 0, 70, 3.6, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(14.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (45.0-20.0)/(17.0)); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 90, 0, 0, 150, 4.0, 0.0, 6.0, -3.5, Some(0.0), Some(6.0), Some(3.5), 1.0, 0.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 90, 0, 0, 150, 4.0, 0.0, 6.0, -3.5, Some(0.0), Some(6.0), Some(3.5), 1.0, 0.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, 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_PUNCH, *ATTACK_REGION_NONE); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 354, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 186, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 354, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 186, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 18, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 162, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 18, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 162, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.4, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.2, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.6, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 76, 100, 22, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 104, 100, 22, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.4, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.2, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.6, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 76, 100, 22, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 104, 100, 22, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame_revised(boma, 0, 4, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 4, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 4, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 82, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 82, 70, 0, 70, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 82, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 82, 70, 0, 70, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 14.0/(33.0-13.0)); + FT_MOTION_RATE(agent, 14.0/(33.0-13.0)); } frame(lua_state, 32.0); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent){ + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks32", game_attacks3s2) - .acmd("game_attacks33", game_attacks3s3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks32", game_attacks3s2); + agent.acmd("game_attacks33", game_attacks3s3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/trail/src/fire/acmd.rs b/fighters/trail/src/fire/acmd.rs new file mode 100644 index 0000000000..19f8af20f2 --- /dev/null +++ b/fighters/trail/src/fire/acmd.rs @@ -0,0 +1,32 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let lr = PostureModule::lr(boma); + let offset = Vector2f {x: (14.0 * lr), y: 7.5}; // distance for article to be offset + PostureModule::add_pos_2d(boma, &offset); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.6, 361, 24, 0, 42, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.2, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.2, 361, 22, 0, 36, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.8, 361, 20, 0, 32, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.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_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_fly2", game_fly); +} diff --git a/fighters/trail/src/fire/mod.rs b/fighters/trail/src/fire/mod.rs new file mode 100644 index 0000000000..8cf8f0c75f --- /dev/null +++ b/fighters/trail/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("trail_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/trail/src/lib.rs b/fighters/trail/src/lib.rs index b1ae660435..b01bf0a032 100644 --- a/fighters/trail/src/lib.rs +++ b/fighters/trail/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod fire; +mod thunder; use smash::{ lib::{ @@ -37,11 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -// cycle magic to firaga at start of match +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("trail"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + fire::install(); + thunder::install(); } diff --git a/fighters/trail/src/opff.rs b/fighters/trail/src/opff.rs index 4ac66934a9..c3cd57fb05 100644 --- a/fighters/trail/src/opff.rs +++ b/fighters/trail/src/opff.rs @@ -379,8 +379,6 @@ pub unsafe fn trail_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("trail") - .on_line(Main, trail_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, trail_frame_wrapper); } diff --git a/fighters/trail/src/status.rs b/fighters/trail/src/status.rs deleted file mode 100644 index 65925f5618..0000000000 --- a/fighters/trail/src/status.rs +++ /dev/null @@ -1,25 +0,0 @@ -use super::*; -use globals::*; -// status script import - -mod jump_aerial; - -mod attack_lw4; - -mod attack_air; - -mod special_s; - -mod special_n; - -pub fn install() { - jump_aerial::install(); - - attack_lw4::install(); - - attack_air::install(); - - special_s::install(); - - special_n::install(); -} diff --git a/fighters/trail/src/status/attack_air.rs b/fighters/trail/src/status/attack_air.rs index e554ada5b7..016b6477db 100644 --- a/fighters/trail/src/status/attack_air.rs +++ b/fighters/trail/src/status/attack_air.rs @@ -1,14 +1,14 @@ use super::*; utils::import!(common::djc::attack_air_main_status); -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) } -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { let motion_kind = MotionModule::motion_kind(fighter.module_accessor); let frame = MotionModule::frame(fighter.module_accessor); @@ -79,7 +79,7 @@ pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::attack_air_main_status(fighter) } @@ -152,7 +152,7 @@ unsafe extern "C" fn sub_attack_air_n(fighter: &mut L2CFighterCommon) { return; } -pub unsafe extern "C" fn init_attack_air_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_air_n(fighter); // Momentum transfer stuff let ratio = VarModule::get_float(fighter.object(), vars::common::instance::JUMP_SPEED_RATIO); @@ -239,7 +239,7 @@ unsafe extern "C" fn sub_attack_air_f(fighter: &mut L2CFighterCommon) { return; } -pub unsafe extern "C" fn init_attack_air_f(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_f_init(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_air_f(fighter); // Momentum transfer stuff let ratio = VarModule::get_float(fighter.object(), vars::common::instance::JUMP_SPEED_RATIO); @@ -257,20 +257,10 @@ pub unsafe extern "C" fn init_attack_air_f(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status( - Init, - *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_N, - init_attack_air_n, - ) - .status( - Init, - *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_F, - init_attack_air_f, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); + agent.status(Init, *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_N, attack_air_n_init); + agent.status(Init, *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_F, attack_air_f_init); } diff --git a/fighters/trail/src/status/attack_lw4.rs b/fighters/trail/src/status/attack_lw4.rs index 65cc0cb7f4..dd4a28a6bd 100644 --- a/fighters/trail/src/status/attack_lw4.rs +++ b/fighters/trail/src/status/attack_lw4.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_LW4 + // lets down smash travel past ledges during a DACUS pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); @@ -75,9 +77,7 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction,) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } diff --git a/fighters/trail/src/status/jump_aerial.rs b/fighters/trail/src/status/jump_aerial.rs index f2d866b3cb..270e680296 100644 --- a/fighters/trail/src/status/jump_aerial.rs +++ b/fighters/trail/src/status/jump_aerial.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_JUMP_AERIAL + // preserve momentum if double jumping out of sonic blade unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { let x_speed = VarModule::get_float(fighter.battle_object, vars::trail::instance::JUMP_CANCEL_MOMENTUM_HANDLER); @@ -13,8 +15,6 @@ unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValu original(fighter) } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } diff --git a/fighters/trail/src/status/mod.rs b/fighters/trail/src/status/mod.rs new file mode 100644 index 0000000000..8f5329c2cf --- /dev/null +++ b/fighters/trail/src/status/mod.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; +// status script import + +mod jump_aerial; +mod attack_lw4; +mod attack_air; +mod special_s; +mod special_n; + +pub fn install(agent: &mut Agent) { + jump_aerial::install(agent); + attack_lw4::install(agent); + attack_air::install(agent); + special_s::install(agent); + special_n::install(agent); +} diff --git a/fighters/trail/src/status/special_n.rs b/fighters/trail/src/status/special_n.rs index 8be566003b..a49fe53ef5 100644 --- a/fighters/trail/src/status/special_n.rs +++ b/fighters/trail/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + // swapping the cycle order of thundaga and blizzaga unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -27,6 +29,8 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return 1.into(); } +// FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2 + unsafe extern "C" fn special_n2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( @@ -159,10 +163,8 @@ unsafe extern "C" fn special_n2_main(fighter: &mut L2CFighterCommon) -> L2CValue return fighter.main_shift(special_n2_main_loop); } -pub fn install() { - smashline::Agent::new("trail") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .status(Pre, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_pre) - .status(Main, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Pre, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_pre); + agent.status(Main, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_main); } diff --git a/fighters/trail/src/status/special_s.rs b/fighters/trail/src/status/special_s.rs index 5d992d4393..0b17605ee6 100644 --- a/fighters/trail/src/status/special_s.rs +++ b/fighters/trail/src/status/special_s.rs @@ -1,15 +1,17 @@ use super::*; -unsafe extern "C" fn trail_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_S + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("special_s_start").into(), Hash40::new("special_air_s_start").into(), false.into()); fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_s").into()); WorkModule::set_int(fighter.module_accessor, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); WorkModule::set_int(fighter.module_accessor, *BATTLE_OBJECT_ID_INVALID, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_SEARCH_TARGET_ID); - fighter.sub_shift_status_main(L2CValue::Ptr(trail_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn trail_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { trail_special_s_set_angle_guide(fighter); if MotionModule::is_end(fighter.module_accessor) { fighter.change_status(FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_ATTACK.into(), false.into()); @@ -95,7 +97,7 @@ unsafe extern "C" fn trail_special_s_get_guide_pos(fighter: &mut L2CFighterCommo Vector2f{x: x_pos, y: y_pos} } -unsafe extern "C" fn trail_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { let effect = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_SEARCH_GUIDE_EFFECT_HANDLE) as u32; if effect != 0 { EffectModule::kill(fighter.module_accessor, effect, true, true); @@ -106,19 +108,13 @@ unsafe extern "C" fn trail_special_s_end(fighter: &mut L2CFighterCommon) -> L2CV // FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END -pub unsafe extern "C" fn trail_special_s_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::trail::status::STOP_SIDE_SPECIAL); 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, trail_special_s_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, trail_special_s_end) - .status( - End, - *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END, - trail_special_s_end_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + agent.status(End, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END, special_s_end_end); } diff --git a/fighters/trail/src/thunder/acmd.rs b/fighters/trail/src/thunder/acmd.rs new file mode 100644 index 0000000000..7aaee7b318 --- /dev/null +++ b/fighters/trail/src/thunder/acmd.rs @@ -0,0 +1,19 @@ +use super::*; + +unsafe extern "C" fn game_falllast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, None, None, None, 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, Some(0.0), Some(10.0), Some(0.0), 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 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_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_falllast", game_falllast); +} diff --git a/fighters/trail/src/thunder/mod.rs b/fighters/trail/src/thunder/mod.rs new file mode 100644 index 0000000000..4f8677bcb8 --- /dev/null +++ b/fighters/trail/src/thunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("trail_thunder"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wario/src/acmd/aerials.rs b/fighters/wario/src/acmd/aerials.rs index fdda4fd29c..41fd9dde68 100644 --- a/fighters/wario/src/acmd/aerials.rs +++ b/fighters/wario/src/acmd/aerials.rs @@ -1,502 +1,500 @@ use super::*; -unsafe extern "C" fn wario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 40, 100, 0, 25, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 40, 100, 0, 25, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); - ATK_POWER(fighter, 1, 3); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + ATK_POWER(agent, 1, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 72, 100, 0, 65, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 16.0/(39.0-20.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 72, 100, 0, 65, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 16.0/(39.0-20.0)); } frame(lua_state, 39.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(51.0-39.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(51.0-39.0)); AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wario_landing_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 55, 85, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 80, 0, 30, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 55, 85, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 80, 0, 30, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 65, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 65, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 8.0 / (37.0 - 21.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0 / (37.0 - 21.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wario_landing_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0 / (16.0 - 1.0)); + FT_MOTION_RATE(agent, 11.0 / (16.0 - 1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 19.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 101, 0, 20, 4.6, 7.3, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 101, 0, 20, 4.6, 4.1, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 361, 102, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 17.0, 19.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 101, 0, 20, 4.6, 7.3, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 101, 0, 20, 4.6, 4.1, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 361, 102, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 6.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 4.2, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 6.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 4.2, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 28.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 28.0, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wario_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"),Hash40::new("top"), -0.9, 7.9, -0.5, 170, 30, 254, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter,0.9,0.5,0.9); - LAST_EFFECT_SET_RATE(fighter, 1.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"),Hash40::new("top"), -0.9, 7.9, -0.5, 170, 30, 254, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent,0.9,0.5,0.9); + LAST_EFFECT_SET_RATE(agent, 1.8); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"),false,false); } } -unsafe extern "C" fn wario_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_rise")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_rise")); } frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("vc_wario_attack07")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("vc_wario_attack07")); } frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_smash_s01")); } } -unsafe extern "C" fn wario_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // capsules used to avoid bad interpolation - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 16.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 14.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 16.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 14.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wario_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn wario_landing_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.375); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.375); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 270, 75, 0, 50, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 270, 70, 0, 30, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 270, 75, 0, 50, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 270, 70, 0, 30, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 95, 0, 30, 5.5, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 95, 0, 30, 5.5, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 1.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } } -unsafe extern "C" fn wario_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_machstamp"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter,1,1,0.625); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_machstamp"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent,1,1,0.625); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_machstamp"),false,true); } } -unsafe extern "C" fn wario_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump01")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_attackair_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_attackair_l01")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_007")); } } -unsafe extern "C" fn wario_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 30, 0, 70, 4.0, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 30, 0, 70, 4.0, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_landing03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_landing03")); } } -unsafe extern "C" fn wario_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT(agent, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_merikomi"),false,true); } } -unsafe extern "C" fn wario_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } //AttackAirLw2 is the upwards bounce// -unsafe extern "C" fn wario_attack_air_lw2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let speed_max=0.75; frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - SET_SPEED_EX(fighter, 0, 1.875, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1.875, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_max, 0.0 ); sv_kinetic_energy!( set_limit_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_max, 0.0 ); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_attack_air_lw2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 1, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 1, 0, 0, 0, 0, true); } } -unsafe extern "C" fn wario_attack_air_lw2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump02")); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attackairn", wario_attack_air_n_game) - .acmd("expression_landingairn", wario_landing_air_n_expression) - .acmd("game_attackairf", wario_attack_air_f_game) - .acmd("expression_landingairf", wario_landing_air_f_expression) - .acmd("game_attackairb", wario_attack_air_b_game) - .acmd("effect_attackairb", wario_attack_air_b_effect) - .acmd("sound_attackairb", wario_attack_air_b_sound) - .acmd("expression_attackairb", wario_attack_air_b_expression) - .acmd("game_attackairhi", wario_attack_air_hi_game) - .acmd("expression_attackairhi", wario_attack_air_hi_expression) - .acmd("expression_landingairhi", wario_landing_air_hi_expression) - .acmd("game_attackairlw", wario_attack_air_lw_game) - .acmd("effect_attackairlw", wario_attack_air_lw_effect) - .acmd("sound_attackairlw", wario_attack_air_lw_sound) - .acmd("expression_attackairlw", wario_attack_air_lw_expression) - .acmd("game_landingairlw", wario_landing_air_lw_game) - .acmd("sound_landingairlw", wario_landing_air_lw_sound) - .acmd("effect_landingairlw", wario_landing_air_lw_effect) - .acmd("expression_landingairlw", wario_landing_air_lw_expression) - .acmd("game_attackairlw2", wario_attack_air_lw2_game) - .acmd("effect_attackairlw2", wario_attack_air_lw2_effect) - .acmd("sound_attackairlw2", wario_attack_air_lw2_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_landingairn", expression_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_landingairf", expression_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("expression_landingairhi", expression_landingairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); + agent.acmd("game_attackairlw2", game_attackairlw2); + agent.acmd("effect_attackairlw2", effect_attackairlw2); + agent.acmd("sound_attackairlw2", sound_attackairlw2); } diff --git a/fighters/wario/src/acmd/ground.rs b/fighters/wario/src/acmd/ground.rs index 47c8633bdd..5e5978d0ab 100644 --- a/fighters/wario/src/acmd/ground.rs +++ b/fighters/wario/src/acmd/ground.rs @@ -1,127 +1,122 @@ - use super::*; -unsafe extern "C" fn wario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.429); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.429); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // jab lock hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn wario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 79, 70, 0, 60, 3.8, 0.0, 8.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 6.0, 79, 70, 0, 60, 5.8, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 79, 70, 0, 60, 3.8, 0.0, 8.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 6.0, 79, 70, 0, 60, 5.8, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.5, 0.0, 5.0, 6.0, Some(0.0), Some(10.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.5, 0.0, 5.0, 6.0, Some(0.0), Some(10.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wario_attack_dash"), Hash40::new("top"), 0, 4, 16, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wario_attack_dash"), Hash40::new("top"), 0, 4, 16, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attack11", wario_attack_11_game) - .acmd("game_attack12", wario_attack_12_game) - .acmd("expression_attack12", wario_attack_12_expression) - .acmd("game_attackdash", wario_attack_dash_game) - .acmd("effect_attackdash", wario_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/wario/src/acmd/mod.rs b/fighters/wario/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/wario/src/acmd/mod.rs +++ b/fighters/wario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wario/src/acmd/other.rs b/fighters/wario/src/acmd/other.rs index 3d6434ab4c..9bfd8f83f7 100644 --- a/fighters/wario/src/acmd/other.rs +++ b/fighters/wario/src/acmd/other.rs @@ -1,188 +1,109 @@ - 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(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"));} - } - } - 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_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(); - frame(lua_state, 1.0); - if is_excute(fighter) { - 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"));} - } - } - 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_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_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 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"));} - } -} - -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(boma) { - PLAY_FLY_VOICE(fighter, 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 play_vc == 0 {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_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) { - 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"));} + 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) { - 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 is_excute(agent) { + 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_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); } diff --git a/fighters/wario/src/acmd/smashes.rs b/fighters/wario/src/acmd/smashes.rs index 60438c2b06..37e99fc058 100644 --- a/fighters/wario/src/acmd/smashes.rs +++ b/fighters/wario/src/acmd/smashes.rs @@ -1,175 +1,172 @@ - use super::*; -unsafe extern "C" fn wario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 20.0, 361, 80, 0, 25, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 80, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 20.0, 361, 80, 0, 25, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 80, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 361, 80, 0, 25, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 361, 80, 0, 25, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.244); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.244); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("head"), 17.0, 95, 86, 0, 35, 7.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("head"), 17.0, 95, 86, 0, 35, 7.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 13); + if is_excute(agent) { + ATK_POWER(agent, 0, 13); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 275, 28, 0, 100, 6.5, 0.0, 7.0, -9.0, Some(0.0), Some(7.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 80, 80, 0, 25, 6.5, 0.0, 7.0, -7.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 275, 28, 0, 100, 6.5, 0.0, 7.0, -9.0, Some(0.0), Some(7.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 80, 80, 0, 25, 6.5, 0.0, 7.0, -7.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 13.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.0, 13.0, 5.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 15.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 13.0, 15.0, 3.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 33.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 33.0, 9.0); frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn wario_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_attack07")); - PLAY_SE(fighter, Hash40::new("se_wario_smash_s01")); - } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_attack07")); + PLAY_SE(agent, Hash40::new("se_wario_smash_s01")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn wario_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attacks4", wario_attack_s4_s_game) - .acmd("game_attackhi4", wario_attack_hi4_game) - .acmd("game_attacklw4", wario_attack_lw4_game) - .acmd("effect_attacklw4", wario_attack_lw4_effect) - .acmd("sound_attacklw4", wario_attack_lw4_sound) - .acmd("expression_attacklw4", wario_attack_lw4_expression) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); +} \ No newline at end of file diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index ba4e0e66fe..ce3cdfa7f7 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -1,127 +1,126 @@ - use super::*; -unsafe extern "C" fn wario_special_n_bite_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..999{ wait(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn wario_special_air_n_bite_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..999{ wait(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn wario_special_hi_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 127, 100, 110, 0, 3.0, 0.0, 5.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 127, 110, 110, 0, 3.0, 0.0, 5.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 127, 100, 110, 0, 3.0, 0.0, 5.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 127, 110, 110, 0, 3.0, 0.0, 5.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, 7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, -7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 7.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, 7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, -7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 7.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_HI_FLAG_DISABLE_MOTION_ANGLE); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -130,107 +129,106 @@ unsafe extern "C" fn wario_special_hi_jump_game(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn wario_special_hi_jump_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -// #[acmd_script( agent = "wario", scripts = ["game_speciallwsr", "game_specialairlwsr"], category = ACMD_GAME, low_priority )] -// unsafe fn wario_special_lw_sr_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_speciallwsr(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 16.0); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 270, 100, 80, 0, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 270, 30, 0, 50, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 270, 100, 80, 0, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +// ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 270, 30, 0, 50, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // } // frame(lua_state, 19.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); // } // } -unsafe extern "C" fn wario_special_lw_lr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwlr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.6); + FT_MOTION_RATE(agent, 1.6); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 45, 68, 0, 50, 11.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 45, 68, 0, 50, 11.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 7.8); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_special_lw_flyr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwflyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 3.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 30.0, 50, 50, 0, 50, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 50, 50, 0, 50, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_JUMP); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_CRITICAL_HIT); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); WorkModule::off_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 80, 95, 0, 0, 7.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 80, 95, 0, 0, 7.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); } wait(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_specialnbite", wario_special_n_bite_game) - .acmd("game_specialairnbite", wario_special_air_n_bite_game) - .acmd("game_specialhijump", wario_special_hi_jump_game) - .acmd("expression_specialhijump", wario_special_hi_jump_expression) - .acmd("game_speciallwlr", wario_special_lw_lr_game) - .acmd("game_specialairlwlr", wario_special_lw_lr_game) - .acmd("game_speciallwflyr", wario_special_lw_flyr_game) - .acmd("game_specialairlwflyr", wario_special_lw_flyr_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnbite", game_specialnbite); + agent.acmd("game_specialairnbite", game_specialairnbite); + + agent.acmd("game_specialhijump", game_specialhijump); + agent.acmd("expression_specialhijump", expression_specialhijump); + + agent.acmd("game_speciallwlr", game_speciallwlr); + agent.acmd("game_specialairlwlr", game_speciallwlr); + agent.acmd("game_speciallwflyr", game_speciallwflyr); + agent.acmd("game_specialairlwflyr", game_speciallwflyr); } diff --git a/fighters/wario/src/acmd/throws.rs b/fighters/wario/src/acmd/throws.rs index 75b35c5a81..097d984b15 100644 --- a/fighters/wario/src/acmd/throws.rs +++ b/fighters/wario/src/acmd/throws.rs @@ -1,141 +1,191 @@ - use super::*; -unsafe extern "C" fn wario_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 11.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wario_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 14.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wario_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wario_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.0); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_NONE, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_frame(boma.get_grabbed_opponent_boma(), 0.1, false); } wait(lua_state,1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } } -unsafe extern "C" fn wario_catch_attack_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.0, 7.25, 11.0, 260, 0, 0, 1.1, true); +unsafe extern "C" fn effect_catchattack(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.0, 7.25, 11.0, 260, 0, 0, 1.1, true); } } -unsafe extern "C" fn wario_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -2, 0); - //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + frame(lua_state, 12.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 3); + lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 7.5, y: 1.0, z: 0.0}); } - frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 21.0/(55.0-30.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); + wait(lua_state, 1.0); + FT_MOTION_RATE(agent, 32.0/(55.0-13.0)); + if is_excute(agent) { + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + //frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_wario_rnd_attack")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + } +} + +unsafe extern "C" fn expression_throwf(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); + lua_args!(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); + smash::app::sv_animcmd::FT_ATTACK_ABS_CAMERA_QUAKE(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } } pub const THROWHI_FRAME_FALL: f32 = 48.0; pub const THROWHI_FRAME_LAND: f32 = 55.0; -unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { CameraModule::set_enable_camera(boma,true,0); CameraModule::set_enable_update_pos(boma,*CAMERA_UPDATE_POS_Y as u8,0); - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 3); + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 80, 80, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 80, 80, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } //Affect hitbox size based on scale let opponent = boma.get_grabbed_opponent_boma(); @@ -165,9 +215,9 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { //Add rate based on item status let mut addRate = 0.0; - if opponentScale != PostureModule::scale(fighter.boma()) + if opponentScale != PostureModule::scale(agent.boma()) { - addRate = if {opponentScale > PostureModule::scale(fighter.boma())} {0.25} else {-0.25}; + addRate = if {opponentScale > PostureModule::scale(agent.boma())} {0.25} else {-0.25}; } let leadHead = WorkModule::is_flag(opponent, *FIGHTER_INSTANCE_WORK_ID_FLAG_METAL) || WorkModule::is_flag(opponent, *FIGHTER_INSTANCE_WORK_ID_FLAG_GOLD); @@ -177,26 +227,26 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { let rise_speedUp = 0.75; frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, factorRate*rise_speedUp); - if is_excute(fighter) { + FT_MOTION_RATE(agent, factorRate*rise_speedUp); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } //Going up// frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("throw"), 8.0, 50, 70, 0, 100, 5.5*factorSize, 0.0, -5.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("throw"), 8.0, 50, 70, 0, 100, 5.5*factorSize, 0.0, -5.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, THROWHI_FRAME_FALL); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); KineticModule::suspend_energy(boma,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); @@ -204,230 +254,179 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { let speed = Vector3f { x: 0.0, y: -3.75, z: 0.0 }; KineticModule::add_speed(boma, &speed); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("rot"), 8.0*factorPower, 50, 70, 0, 100, 6.0*factorSize, 0.0, 0.0, 0.0, Some(0.0), Some(2.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("rot"), 8.0*factorPower, 50, 70, 0, 100, 6.0*factorSize, 0.0, 0.0, 0.0, Some(0.0), Some(2.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, THROWHI_FRAME_LAND+1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0*factorPower, 270, 90, 0, 15, 2.5*factorSize, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0*factorPower, 270, 90, 0, 15, 2.5*factorSize, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("rot"), 7.0, 65, 95, 0, 85, 8.25*factorSize, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("rot"), 7.0, 65, 95, 0, 85, 8.25*factorSize, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_THROW); StatusModule::set_situation_kind(boma, SituationKind(*SITUATION_KIND_GROUND), false); - CHECK_FINISH_CAMERA(fighter, 9, 0); + CHECK_FINISH_CAMERA(agent, 9, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 3.0, y: -3.0, z: 0.0}); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); let opponent = boma.get_grabbed_opponent_boma(); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn wario_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let opponent = boma.get_grabbed_opponent_boma(); let opponentScale = PostureModule::scale(opponent); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, -0.4, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_landing_smoke"), Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, -0.4, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 3, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 2, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 3, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 2, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 4, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); - LAST_EFFECT_SET_RATE(fighter,1.25); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 5, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter,1.25); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 4, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); + LAST_EFFECT_SET_RATE(agent,1.25); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 5, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent,1.25); } frame(lua_state, THROWHI_FRAME_FALL+1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), 0, 20, 0, 90, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), 0, 20, 0, 90, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, THROWHI_FRAME_LAND+3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn wario_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump02")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 32.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, THROWHI_FRAME_FALL-5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_006")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_006")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, THROWHI_FRAME_LAND); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_heavy_hit_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_heavy_hit_l")); } } -unsafe extern "C" fn wario_throw_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 13); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 13); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, THROWHI_FRAME_FALL); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, THROWHI_FRAME_LAND); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 3); - lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 7.5, y: 1.0, z: 0.0}); + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_HIP); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, -2, 0); + //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); } - wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 32.0/(55.0-13.0)); - if is_excute(fighter) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 21.0/(55.0-30.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - //frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); -unsafe extern "C" fn wario_throw_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_wario_rnd_attack")); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); - } -} + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("effect_catchattack", effect_catchattack); -unsafe extern "C" fn wario_throw_f_expression(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); - lua_args!(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); - smash::app::sv_animcmd::FT_ATTACK_ABS_CAMERA_QUAKE(lua_state); - fighter.clear_lua_stack(); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } -} + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + agent.acmd("sound_throwf", sound_throwf); + agent.acmd("expression_throwf", expression_throwf); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_catch", wario_catch_game) - .acmd("game_catchdash", wario_catch_dash_game) - .acmd("game_catchturn", wario_catch_turn_game) - .acmd("game_catchattack", wario_catch_attack_game) - .acmd("effect_catchattack", wario_catch_attack_effect) - .acmd("game_throwlw", wario_throw_lw_game) - .acmd("game_throwhi", wario_throw_hi_game) - .acmd("effect_throwhi", wario_throw_hi_effect) - .acmd("sound_throwhi", wario_throw_hi_sound) - .acmd("expression_throwhi", wario_throw_hi_expression) - .acmd("game_throwf", wario_throw_f_game) - .acmd("effect_throwf", wario_throw_f_effect) - .acmd("sound_throwf", wario_throw_f_sound) - .acmd("expression_throwf", wario_throw_f_expression) - .install(); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/wario/src/acmd/tilts.rs b/fighters/wario/src/acmd/tilts.rs index 3a7b5ac60a..5ec2704fd9 100644 --- a/fighters/wario/src/acmd/tilts.rs +++ b/fighters/wario/src/acmd/tilts.rs @@ -1,156 +1,150 @@ - use super::*; -unsafe extern "C" fn wario_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/5.0); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 10.0, 90, 89, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 10.0, 90, 89, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 6.0, 90, 50, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 6.0, 90, 50, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 45, 0, 35, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 65, 45, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 4.5, 5.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 2.5, 11.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 45, 0, 35, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 65, 45, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 4.5, 5.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 2.5, 11.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wario_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 3, 8.5, -3.0, 20, -15, 0, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 3, 8.5, -3.0, 20, -15, 0, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_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_impact"), Hash40::new("arml"), 9.5, -1.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("arml"), 9.5, -1.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 7.0); } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attacks3hi", wario_attack_s3_hi_game) - .acmd("game_attacks3", wario_attack_s3_s_game) - .acmd("game_attacks3lw", wario_attack_s3_lw_game) - .acmd("game_attackhi3", wario_attack_hi3_game) - .acmd("game_attacklw3", wario_attack_lw3_game) - .acmd("effect_attacklw3", wario_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/wario/src/lib.rs b/fighters/wario/src/lib.rs index 8e2ddcc726..73c7ae37f5 100644 --- a/fighters/wario/src/lib.rs +++ b/fighters/wario/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod wariobike; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wario"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + wariobike::install(); } diff --git a/fighters/wario/src/opff.rs b/fighters/wario/src/opff.rs index c32706f591..4b1d2806cc 100644 --- a/fighters/wario/src/opff.rs +++ b/fighters/wario/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -112,8 +111,7 @@ pub unsafe fn wario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wario") - .on_line(Main, wario_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wario_frame_wrapper); } diff --git a/fighters/wario/src/status.rs b/fighters/wario/src/status.rs deleted file mode 100644 index c710fc43b8..0000000000 --- a/fighters/wario/src/status.rs +++ /dev/null @@ -1,170 +0,0 @@ -use super::*; -use globals::*; - -mod special_s; -mod special_hi; - -pub const THROW_HI_STATUS_KIND: i32 = 0x47; - -extern "C" fn wario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_WARIO { - fighter.global_table[THROW_HI_STATUS_KIND].assign(&FIGHTER_STATUS_KIND_THROW_KIRBY.into()); - } - } -} - -//Force opponent rotation - -unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - - let boma = fighter.boma(); - - let mut vec =Vector3f{x: 0.0, y: 0.0, z: 0.0}; - let offset = ModelModule::joint_global_rotation(fighter.module_accessor,Hash40::new("throw"),&mut vec,false); - let rot = Vector3f{x: vec.x, y: 0.0, z: 0.0}; - PostureModule::set_rot( - boma.get_grabbed_opponent_boma(), - &rot, - 0 - ); - return false.into(); -} -//Reset opponent rotation - -unsafe extern "C" fn catch_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let boma = fighter.boma(); - - PostureModule::set_rot( - boma.get_grabbed_opponent_boma(), - &Vector3f::zero(), - 0 - ); - - smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_ATTACK)(fighter) -} - -unsafe extern "C" fn wario_throwk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - let boma = fighter.boma(); - - return fighter.status_pre_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_init(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_uniq_process_ThrowKirby_initStatus(); - - let hitStop = 8; - WorkModule::set_int(fighter.module_accessor, hitStop, *FIGHTER_STATUS_THROW_WORK_INT_STOP_FRAME); - - return false.into(); -} - -unsafe extern "C" fn wario_throwk_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return fighter.sub_status_uniq_process_ThrowKirby_exitStatus(); -} - -unsafe extern "C" fn wario_throwk_end(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return fighter.status_end_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let FRAME_FALL = 48.0; - let FRAME_FALLLOOP = FRAME_FALL+2.0; - let FRAME_LAND = 55.0; - - let currentFrame = MotionModule::frame(fighter.module_accessor); - if currentFrame >= FRAME_LAND { - let grounded = GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); - let status = if grounded {FIGHTER_STATUS_KIND_WAIT} else {FIGHTER_STATUS_KIND_FALL}; - let lastFrame = if grounded {MotionModule::end_frame(fighter.module_accessor)-3.0} else {MotionModule::end_frame(fighter.module_accessor)-9.0}; - - if currentFrame >= lastFrame { - if !grounded{ - let speed = Vector3f { x: 0.0, y: -0.1, z: 0.0 }; - KineticModule::add_speed(fighter.module_accessor, &speed); - } - fighter.change_status(status.into(), false.into()); - } - return false.into(); - } - - //If we go past a certain frame, then freeze animation and accel downwards - if (currentFrame >= FRAME_FALLLOOP && currentFrame < FRAME_LAND) - { - MotionModule::set_rate(fighter.module_accessor, 0.0); - let speed = Vector3f { x: 0.0, y: -0.425, z: 0.0 }; - KineticModule::add_speed(fighter.module_accessor, &speed); - } - //Groundcast to see if we touched the ground (only after falling), then cut to the landing frame - if currentFrame >= FRAME_FALL - { - if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) - { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, FRAME_LAND, true,true,false); - MotionModule::set_rate(fighter.module_accessor, 1.0); - KineticModule::resume_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - //Spawn effects// - let boma = fighter.boma(); - let opponent = boma.get_grabbed_opponent_boma(); - let opponentScale = PostureModule::scale(opponent); - //Bury effect - //EFFECT_FOLLOW(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, (opponentScale+0.4), true); - - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown_collision"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - } - } - - return false.into(); -} - -unsafe extern "C" fn wario_landing_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return false.into(); -} - -unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let dairAnim = Hash40::new("attack_air_lw"); - let dairRiseAnim = Hash40::new("attack_air_lw2"); - - if MotionModule::motion_kind(fighter.module_accessor) != dairAnim.hash{ - return false.into(); - } - if (AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD)){ - MotionModule::change_motion(fighter.module_accessor, dairRiseAnim, 18.0, 1.0, false, 0.0, false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); - AttackModule::clear_all(fighter.module_accessor); - } - - return false.into(); -} -pub fn install() { - special_s::install(); - special_hi::install(); - - smashline::Agent::new("wario") - .on_start(wario_init) - .status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec) - .status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end) - .status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre) - .status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init) - .status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main) - .status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit) - .status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end) - .status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec) - .status( - End, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - wario_landing_attack_end, - ) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec) - .install(); -} diff --git a/fighters/wario/src/status/attack_air.rs b/fighters/wario/src/status/attack_air.rs new file mode 100644 index 0000000000..3882320544 --- /dev/null +++ b/fighters/wario/src/status/attack_air.rs @@ -0,0 +1,31 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let dairAnim = Hash40::new("attack_air_lw"); + let dairRiseAnim = Hash40::new("attack_air_lw2"); + + if MotionModule::motion_kind(fighter.module_accessor) != dairAnim.hash{ + return false.into(); + } + if (AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD)){ + MotionModule::change_motion(fighter.module_accessor, dairRiseAnim, 18.0, 1.0, false, 0.0, false, false); + EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); + AttackModule::clear_all(fighter.module_accessor); + } + + return false.into(); +} + +// FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR + +unsafe extern "C" fn landing_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return false.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(End, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, landing_attack_air_end); +} diff --git a/fighters/wario/src/status/catch_attack.rs b/fighters/wario/src/status/catch_attack.rs new file mode 100644 index 0000000000..89a68cfb84 --- /dev/null +++ b/fighters/wario/src/status/catch_attack.rs @@ -0,0 +1,39 @@ +use super::*; + +// FIGHTER_STATUS_KIND_CATCH_ATTACK + +// Force opponent rotation + +unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + + let boma = fighter.boma(); + + let mut vec =Vector3f{x: 0.0, y: 0.0, z: 0.0}; + let offset = ModelModule::joint_global_rotation(fighter.module_accessor,Hash40::new("throw"),&mut vec,false); + let rot = Vector3f{x: vec.x, y: 0.0, z: 0.0}; + PostureModule::set_rot( + boma.get_grabbed_opponent_boma(), + &rot, + 0 + ); + return false.into(); +} + +// Reset opponent rotation + +unsafe extern "C" fn catch_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let boma = fighter.boma(); + + PostureModule::set_rot( + boma.get_grabbed_opponent_boma(), + &Vector3f::zero(), + 0 + ); + + smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_ATTACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end); +} diff --git a/fighters/wario/src/status/mod.rs b/fighters/wario/src/status/mod.rs new file mode 100644 index 0000000000..a24d9acc00 --- /dev/null +++ b/fighters/wario/src/status/mod.rs @@ -0,0 +1,25 @@ +use super::*; +use globals::*; +// status script import + +mod attack_air; +mod catch_attack; +mod throw_kirby; + +mod special_hi; + +pub const THROW_HI_STATUS_KIND: i32 = 0x47; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[THROW_HI_STATUS_KIND].assign(&FIGHTER_STATUS_KIND_THROW_KIRBY.into()); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + catch_attack::install(agent); + throw_kirby::install(agent); + + special_hi::install(agent); +} diff --git a/fighters/wario/src/status/special_hi.rs b/fighters/wario/src/status/special_hi.rs index 4a79ca6094..9a14041d1a 100644 --- a/fighters/wario/src/status/special_hi.rs +++ b/fighters/wario/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP @@ -47,13 +46,7 @@ pub unsafe extern "C" fn fall_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Fall() } -pub fn install() { - smashline::Agent::new("wario") - .status( - Main, - *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP, - special_hi_jump_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_FALL, fall_pre) - .install(); +pub fn install(agent: &mut Agent) { + agent.status( Main, *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_FALL, fall_pre); } diff --git a/fighters/wario/src/status/throw_kirby.rs b/fighters/wario/src/status/throw_kirby.rs new file mode 100644 index 0000000000..dbad4cf9c8 --- /dev/null +++ b/fighters/wario/src/status/throw_kirby.rs @@ -0,0 +1,94 @@ +use super::*; + +// FIGHTER_STATUS_KIND_THROW_KIRBY + +unsafe extern "C" fn throw_kirby_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let boma = fighter.boma(); + + return fighter.status_pre_ThrowKirby(); +} + +unsafe extern "C" fn throw_kirby_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_uniq_process_ThrowKirby_initStatus(); + + let hitStop = 8; + WorkModule::set_int(fighter.module_accessor, hitStop, *FIGHTER_STATUS_THROW_WORK_INT_STOP_FRAME); + + return false.into(); +} + +unsafe extern "C" fn throw_kirby_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_ThrowKirby(); +} + +unsafe extern "C" fn throw_kirby_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return fighter.sub_status_uniq_process_ThrowKirby_exitStatus(); +} + +unsafe extern "C" fn throw_kirby_end(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return fighter.status_end_ThrowKirby(); +} + +unsafe extern "C" fn throw_kirby_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let FRAME_FALL = 48.0; + let FRAME_FALLLOOP = FRAME_FALL+2.0; + let FRAME_LAND = 55.0; + + let currentFrame = MotionModule::frame(fighter.module_accessor); + if currentFrame >= FRAME_LAND { + let grounded = GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); + let status = if grounded {FIGHTER_STATUS_KIND_WAIT} else {FIGHTER_STATUS_KIND_FALL}; + let lastFrame = if grounded {MotionModule::end_frame(fighter.module_accessor)-3.0} else {MotionModule::end_frame(fighter.module_accessor)-9.0}; + + if currentFrame >= lastFrame { + if !grounded{ + let speed = Vector3f { x: 0.0, y: -0.1, z: 0.0 }; + KineticModule::add_speed(fighter.module_accessor, &speed); + } + fighter.change_status(status.into(), false.into()); + } + return false.into(); + } + + //If we go past a certain frame, then freeze animation and accel downwards + if (currentFrame >= FRAME_FALLLOOP && currentFrame < FRAME_LAND) + { + MotionModule::set_rate(fighter.module_accessor, 0.0); + let speed = Vector3f { x: 0.0, y: -0.425, z: 0.0 }; + KineticModule::add_speed(fighter.module_accessor, &speed); + } + //Groundcast to see if we touched the ground (only after falling), then cut to the landing frame + if currentFrame >= FRAME_FALL + { + if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) + { + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, FRAME_LAND, true,true,false); + MotionModule::set_rate(fighter.module_accessor, 1.0); + KineticModule::resume_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + //Spawn effects// + let boma = fighter.boma(); + let opponent = boma.get_grabbed_opponent_boma(); + let opponentScale = PostureModule::scale(opponent); + //Bury effect + //EFFECT_FOLLOW(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, (opponentScale+0.4), true); + + LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + EFFECT(fighter, Hash40::new("sys_crown_collision"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + } + } + + return false.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_init); + agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_main); + agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_exit); + agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_exec); +} diff --git a/fighters/wario/src/wariobike/mod.rs b/fighters/wario/src/wariobike/mod.rs new file mode 100644 index 0000000000..8f36818944 --- /dev/null +++ b/fighters/wario/src/wariobike/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod status; + +pub fn install() { + let agent = &mut Agent::new("wario_wariobike"); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wario/src/status/special_s.rs b/fighters/wario/src/wariobike/status.rs similarity index 73% rename from fighters/wario/src/status/special_s.rs rename to fighters/wario/src/wariobike/status.rs index bbf815472a..498cf223cb 100644 --- a/fighters/wario/src/status/special_s.rs +++ b/fighters/wario/src/wariobike/status.rs @@ -14,12 +14,6 @@ pub unsafe extern "C" fn special_s_escape_start_exit(weapon: &mut L2CWeaponCommo 0.into() } -pub fn install() { - smashline::Agent::new("wario_wariobike") - .status( - Exit, - *WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START, - special_s_escape_start_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exit, *WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START, special_s_escape_start_exit); } diff --git a/fighters/wiifit/src/acmd/aerials.rs b/fighters/wiifit/src/acmd/aerials.rs index 935d63f19f..886c58a534 100644 --- a/fighters/wiifit/src/acmd/aerials.rs +++ b/fighters/wiifit/src/acmd/aerials.rs @@ -1,228 +1,230 @@ use super::*; -unsafe extern "C" fn wiifit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 5.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("head"), 5.0, 110, 72, 0, 50, 4.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 90, 72, 0, 50, 4.0, 0.0, 0.0, -0.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("head"), 5.0, 110, 72, 0, 50, 4.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 90, 72, 0, 50, 4.0, 0.0, 0.0, -0.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 8.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 8.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 12.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 2.0, Hash40::new("top"), Vector3f::new(0.0, 9.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 2.0, Hash40::new("top"), Vector3f::new(0.0, 9.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 50, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 50, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 45, 102, 0, 20, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.5, 55, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 45, 102, 0, 20, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.5, 55, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 0.640); - //FT_MOTION_RATE_RANGE(fighter, 19.0, 46.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.640); + //FT_MOTION_RATE_RANGE(agent, 19.0, 46.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wiifit_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 9.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 17.0, 0.75, 1.0, Hash40::new("handr"), Vector3f::new(0.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 17.0, 0.75, 1.0, Hash40::new("handr"), Vector3f::new(0.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 102, 0, 40, 3.5, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 4.0, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 102, 0, 40, 4.5, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 102, 0, 40, 3.5, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 4.0, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 102, 0, 40, 4.5, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.0, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.5, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 4.0, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.0, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.5, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 4.0, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 5.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("top"), Vector3f::new(0.0, 4.0, -8.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("top"), Vector3f::new(0.0, 4.0, -8.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 6.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("head"), Vector3f::new(3.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("head"), Vector3f::new(3.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 13.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 20.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 27.0, 1.25, 1.75, Hash40::new("kneer"), Vector3f::new(1.5, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 27.0, 1.25, 1.75, Hash40::new("kneer"), Vector3f::new(1.5, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attackairn", wiifit_attack_air_n_game) - .acmd("effect_attackairn", wiifit_attack_air_n_effect) - .acmd("game_attackairf", wiifit_attack_air_f_game) - .acmd("effect_attackairf", wiifit_attack_air_f_effect) - .acmd("game_attackairb", wiifit_attack_air_b_game) - .acmd("effect_attackairb", wiifit_attack_air_b_effect) - .acmd("game_attackairhi", wiifit_attack_air_hi_game) - .acmd("effect_attackairhi", wiifit_attack_air_hi_effect) - .acmd("game_attackairlw", wiifit_attack_air_lw_game) - .acmd("effect_attackairlw", wiifit_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/wiifit/src/acmd/ground.rs b/fighters/wiifit/src/acmd/ground.rs index 520b4a7cee..0aa58fd812 100644 --- a/fighters/wiifit/src/acmd/ground.rs +++ b/fighters/wiifit/src/acmd/ground.rs @@ -1,125 +1,123 @@ use super::*; -unsafe extern "C" fn wiifit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 3.0, 361, 25, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 20, 2.75, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 5.0, 361, 130, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("handl"), 3.0, 361, 25, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 20, 2.75, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("footr"), 5.0, 361, 130, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn wiifit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.8, 5.2); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.2, 2.2); } } -unsafe extern "C" fn wiifit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(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) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.5, 5.2); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 10, 1.8, 0.0, 1.5, 4.7, Some(0.0), Some(1.5), Some(6.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 45, 95, 0, 50, 6.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 10, 1.8, 0.0, 1.5, 4.7, Some(0.0), Some(1.5), Some(6.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 45, 95, 0, 50, 6.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.2, 2.2); } } -unsafe extern "C" fn wiifit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 3.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(2.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 3.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(2.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 4.5, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 3.0, 4.0, Some(0.0), Some(1.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 4.5, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 3.0, 4.0, Some(0.0), Some(1.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.4); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wiifit_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.6, Hash40::new("top"), Vector3f::new(0.0, 7.0, 6.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attack11", wiifit_attack_11_game) - .acmd("game_attack12", wiifit_attack_12_game) - .acmd("game_attack13", wiifit_attack_13_game) - .acmd("game_attackdash", wiifit_attack_dash_game) - .acmd("effect_attackdash", wiifit_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/wiifit/src/acmd/mod.rs b/fighters/wiifit/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/wiifit/src/acmd/mod.rs +++ b/fighters/wiifit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wiifit/src/acmd/other.rs b/fighters/wiifit/src/acmd/other.rs index e59c419a50..244f43f037 100644 --- a/fighters/wiifit/src/acmd/other.rs +++ b/fighters/wiifit/src/acmd/other.rs @@ -1,208 +1,113 @@ - 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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_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(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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_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_wiifit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_wiifit_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, 19.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wiifit_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wiifit_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wiifit_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wiifit_step_left_m")); } } -unsafe extern "C" fn wiifit_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, 16.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); } } -unsafe extern "C" fn wiifit_sunbullet_hold_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"), 0.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - } -} +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); -pub fn install() { - smashline::Agent::new("wiifit") - .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", wiifit_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("wiifit_sunbullet") - .acmd("game_hold", wiifit_sunbullet_hold_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wiifit/src/acmd/smashes.rs b/fighters/wiifit/src/acmd/smashes.rs index 24efd1ef6c..6225bf4138 100644 --- a/fighters/wiifit/src/acmd/smashes.rs +++ b/fighters/wiifit/src/acmd/smashes.rs @@ -1,149 +1,143 @@ use super::*; -unsafe extern "C" fn wiifit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.75); - + FT_MOTION_RATE(agent, 0.75); } -unsafe extern "C" fn wiifit_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 1.75, 2.4, Hash40::new("bust"), Vector3f::new(-1.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -unsafe extern "C" fn wiifit_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 90, 97, 0, 31, 2.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.6, 0.0, 24.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 90, 97, 0, 31, 2.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.6, 0.0, 24.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 90, 112, 0, 30, 1.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 2.8, 0.0, 18.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 3.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 90, 112, 0, 30, 1.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 2.8, 0.0, 18.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 3.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 20, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 20, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } // frame(lua_state, 14.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 0.75, 1.25, Hash40::new("top"), Vector3f::new(0.0, 24.5, -0.3), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } - } -unsafe extern "C" fn wiifit_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 18.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 18.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 26.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 26.0, 7.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wiifit_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 1.75, 2.4, Hash40::new("top"), Vector3f::new(0.0, 4.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attacks4", wiifit_attack_s4_s_game) - .acmd("effect_attacks4", wiifit_attack_s4_effect) - .acmd("game_attackhi4", wiifit_attack_hi4_game) - .acmd("game_attackhi4l", wiifit_attack_hi4_game) - .acmd("effect_attackhi4", wiifit_attack_hi4_effect) - .acmd("effect_attackhi4l", wiifit_attack_hi4_effect) - .acmd("game_attacklw4", wiifit_attack_lw4_game) - .acmd("effect_attacklw4", wiifit_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4l", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("effect_attackhi4l", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/wiifit/src/acmd/specials.rs b/fighters/wiifit/src/acmd/specials.rs index 3e0d9fd315..8887003101 100644 --- a/fighters/wiifit/src/acmd/specials.rs +++ b/fighters/wiifit/src/acmd/specials.rs @@ -1,40 +1,38 @@ use super::*; -unsafe extern "C" fn wiifit_special_s_heading_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsheading(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 7.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 7.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 12.0, 295, 60, 0, 27, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 12.0, 295, 60, 0, 27, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 5.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 5.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 10.0, 295, 64, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 10.0, 295, 64, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.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("wiifit") - .acmd("game_specialsheading", wiifit_special_s_heading_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsheading", game_specialsheading); } diff --git a/fighters/wiifit/src/acmd/throws.rs b/fighters/wiifit/src/acmd/throws.rs index d7716868de..aeb97d3362 100644 --- a/fighters/wiifit/src/acmd/throws.rs +++ b/fighters/wiifit/src/acmd/throws.rs @@ -1,100 +1,98 @@ use super::*; -unsafe extern "C" fn wiifit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 8.6, 0.0, Some(0.0), Some(8.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.6, 0.0, Some(0.0), Some(8.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wiifit_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 4.0, Some(0.0), Some(7.5), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 4.0, Some(0.0), Some(7.5), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wiifit_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wiifit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 100, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 100, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 361, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 361, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 37.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 23); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 23); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_catch", wiifit_catch_game) - .acmd("game_catchdash", wiifit_catch_dash_game) - .acmd("game_catchturn", wiifit_catch_turn_game) - .acmd("game_throwf", wiifit_throw_f_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); } diff --git a/fighters/wiifit/src/acmd/tilts.rs b/fighters/wiifit/src/acmd/tilts.rs index b22d2d34db..86893ede98 100644 --- a/fighters/wiifit/src/acmd/tilts.rs +++ b/fighters/wiifit/src/acmd/tilts.rs @@ -1,145 +1,140 @@ use super::*; -unsafe extern "C" fn wiifit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("kneel"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 361, 85, 0, 50, 3.5, 3.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 11.0, 361, 85, 0, 50, 3.5, 1.5, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 361, 85, 0, 50, 3.5, 3.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 11.0, 361, 85, 0, 50, 3.5, 1.5, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - // if is_excute(fighter) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { + // if is_excute(agent) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.5, Hash40::new("kneel"), Vector3f::new(1.5, 2.5, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } - } -unsafe extern "C" fn wiifit_attack_s3_expression(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_R); +unsafe extern "C" fn expression_attacks3(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_R); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn wiifit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 75, 70, 0, 80, 3.0, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 90, 70, 0, 80, 2.5, 0.0, 11.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 10.0, 75, 70, 0, 80, 3.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 75, 70, 0, 80, 3.0, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 90, 70, 0, 80, 2.5, 0.0, 11.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("footl"), 10.0, 75, 70, 0, 80, 3.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } // frame(lua_state, 5.0); - // if is_excute(fighter) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { + // if is_excute(agent) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 0.75, 1.5, Hash40::new("handr"), Vector3f::new(-0.25, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } } -unsafe extern "C" fn wiifit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 5.3); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 35, 86, 0, 30, 4.0, 0.0, 3.0, 10.5, Some(0.0), Some(4.8), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 35, 86, 0, 30, 3.5, 0.0, 3.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 35, 86, 0, 30, 4.0, 0.0, 3.0, 10.5, Some(0.0), Some(4.8), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 35, 86, 0, 30, 3.5, 0.0, 3.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.8, 5.8); } - } -unsafe extern "C" fn wiifit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("wiifit_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("wiifit_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); // if WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.5, Hash40::new("top"), Vector3f::new(11.0, 4.5, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attacks3", wiifit_attack_s3_s_game) - .acmd("effect_attacks3", wiifit_attack_s3_effect) - .acmd("expression_attacks3", wiifit_attack_s3_expression) - .acmd("game_attackhi3", wiifit_attack_hi3_game) - .acmd("effect_attackhi3", wiifit_attack_hi3_effect) - .acmd("game_attacklw3", wiifit_attack_lw3_game) - .acmd("effect_attacklw3", wiifit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/wiifit/src/lib.rs b/fighters/wiifit/src/lib.rs index 8e2ddcc726..2416456e0a 100644 --- a/fighters/wiifit/src/lib.rs +++ b/fighters/wiifit/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod sunbullet; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wiifit"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + sunbullet::install(); } diff --git a/fighters/wiifit/src/opff.rs b/fighters/wiifit/src/opff.rs index 1b86919096..5332d431b6 100644 --- a/fighters/wiifit/src/opff.rs +++ b/fighters/wiifit/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn header_cancel(boma: &mut BattleObjectModuleAccessor) { let status_kind_prev = StatusModule::prev_status_kind(boma, 0); @@ -220,8 +219,7 @@ pub unsafe fn wiifit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wiifit") - .on_line(Main, wiifit_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wiifit_frame_wrapper); } diff --git a/fighters/wiifit/src/status/mod.rs b/fighters/wiifit/src/status/mod.rs index e77e8d79bf..8a78a0fb93 100644 --- a/fighters/wiifit/src/status/mod.rs +++ b/fighters/wiifit/src/status/mod.rs @@ -1,5 +1,7 @@ use super::*; use globals::*; +// status script import + mod special_s; unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -11,16 +13,12 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn wiifit_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_WIIFIT { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("wiifit") - .on_start(wiifit_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); } diff --git a/fighters/wiifit/src/status/special_s.rs b/fighters/wiifit/src/status/special_s.rs index 33e8134c4c..a9df09b216 100644 --- a/fighters/wiifit/src/status/special_s.rs +++ b/fighters/wiifit/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S @@ -95,19 +94,9 @@ unsafe extern "C" fn special_s_jump_end(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("wiifit") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end) - .status( - Init, - *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_init, - ) - .status( - End, - *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + agent.status(Init, *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init); + agent.status(End, *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_end); } diff --git a/fighters/wiifit/src/sunbullet/acmd.rs b/fighters/wiifit/src/sunbullet/acmd.rs new file mode 100644 index 0000000000..f28a7781b7 --- /dev/null +++ b/fighters/wiifit/src/sunbullet/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hold", game_hold); +} diff --git a/fighters/wiifit/src/sunbullet/mod.rs b/fighters/wiifit/src/sunbullet/mod.rs new file mode 100644 index 0000000000..13be9fa2ab --- /dev/null +++ b/fighters/wiifit/src/sunbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wiifit_sunbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/acmd/aerials.rs b/fighters/wolf/src/acmd/aerials.rs index 7b6e936559..dccc759562 100644 --- a/fighters/wolf/src/acmd/aerials.rs +++ b/fighters/wolf/src/acmd/aerials.rs @@ -1,169 +1,165 @@ - use super::*; -unsafe extern "C" fn wolf_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 75, 0, 30, 4.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 75, 0, 30, 4.0, 3.5, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 75, 0, 30, 3.5, 2.5, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 75, 0, 30, 4.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 75, 0, 30, 4.0, 3.5, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 75, 0, 30, 3.5, 2.5, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 81, 0, 25, 3.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 81, 0, 25, 3.0, 3.4, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 361, 81, 0, 25, 3.0, 2.0, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 81, 0, 25, 3.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 81, 0, 25, 3.0, 3.4, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 361, 81, 0, 25, 3.0, 2.0, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(7.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 60, 82, 0, 48, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 60, 85, 0, 47, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 11.0, 60, 85, 0, 47, 4.5, 3.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 60, 82, 0, 48, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 60, 85, 0, 47, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 11.0, 60, 85, 0, 47, 4.5, 3.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE (fighter, 8.0/(38.0-25.0)); - if is_excute(fighter) { + FT_MOTION_RATE (agent, 8.0/(38.0-25.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(13.0-1.0)); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 98, 0, 20, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 4.25, 4.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 98, 0, 20, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 4.25, 4.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(6.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 11.0, 55, 95, 0, 20, 5.5, 1.0, -0.5, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 11.0, 55, 95, 0, 20, 5.5, 1.0, -0.5, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn wolf_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 4.0/(12.0-5.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(12.0-5.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); // f13 ingame - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 70, 0, 6, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 64, 0, 6, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 70, 0, 6, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 64, 0, 6, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 270, 85, 0, 30, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 85, 0, 30, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 270, 85, 0, 30, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 85, 0, 30, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); // f16 ingame - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); // f33 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attackairn", wolf_attack_air_n_game) - .acmd("game_attackairf", wolf_attack_air_f_game) - .acmd("game_attackairb", wolf_attack_air_b_game) - .acmd("game_attackairhi", wolf_attack_air_hi_game) - .acmd("expression_attackairhi", wolf_attack_air_hi_expression) - .acmd("game_attackairlw", wolf_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/wolf/src/acmd/ground.rs b/fighters/wolf/src/acmd/ground.rs index 17fe2c0913..1ccf1320ff 100644 --- a/fighters/wolf/src/acmd/ground.rs +++ b/fighters/wolf/src/acmd/ground.rs @@ -1,32 +1,31 @@ - use super::*; -unsafe extern "C" fn wolf_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 6.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 7.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 6.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 7.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 13.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 11.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 10.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 13.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 11.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 10.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } @@ -40,110 +39,110 @@ unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn wolf_attack_11_expression(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_attack11(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); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn wolf_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.5, 0.0, 8.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.5, 0.0, 8.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn wolf_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wolf_attack_13_expression(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_attack13(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); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn wolf_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 80, 92, 0, 40, 2.5, 0.0, 0.0, 0.0, Some(-3.3), Some(0.0), Some(-3.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 50, 91, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 85, 0, 45, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 80, 92, 0, 40, 2.5, 0.0, 0.0, 0.0, Some(-3.3), Some(0.0), Some(-3.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 50, 91, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 85, 0, 45, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 80, 60, 0, 60, 2.5, 0.0, 0.0, 0.0, Some(-3.5), Some(0.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 60, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 60, 0, 60, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 80, 60, 0, 60, 2.5, 0.0, 0.0, 0.0, Some(-3.5), Some(0.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 60, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 60, 0, 60, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attack11", wolf_attack_11_game) - .acmd("effect_attack11", effect_attack11) - .acmd("expression_attack11", wolf_attack_11_expression) - .acmd("game_attack12", wolf_attack_12_game) - .acmd("game_attack13", wolf_attack_13_game) - .acmd("expression_attack13", wolf_attack_13_expression) - .acmd("game_attackdash", wolf_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("expression_attack11", expression_attack11); + + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/wolf/src/acmd/mod.rs b/fighters/wolf/src/acmd/mod.rs index e2d01f3d67..d8a22387b4 100644 --- a/fighters/wolf/src/acmd/mod.rs +++ b/fighters/wolf/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wolf/src/acmd/other.rs b/fighters/wolf/src/acmd/other.rs index 7edc3374a1..a4f0403c02 100644 --- a/fighters/wolf/src/acmd/other.rs +++ b/fighters/wolf/src/acmd/other.rs @@ -1,210 +1,121 @@ - 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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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(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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_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_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.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 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_wolf_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_wolf_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, 12.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wolf_landing01")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wolf_landing01")); } } -unsafe extern "C" fn 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, 12.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 wolf_blaster_bullet_fly_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"), 4.0, 40, 120, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - } -} - -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("wolf") - .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("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) - .install(); - smashline::Agent::new("wolf_blaster_bullet") - .acmd("game_fly", wolf_blaster_bullet_fly_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("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wolf/src/acmd/smashes.rs b/fighters/wolf/src/acmd/smashes.rs index ec0b72387a..0f1d4b88dc 100644 --- a/fighters/wolf/src/acmd/smashes.rs +++ b/fighters/wolf/src/acmd/smashes.rs @@ -1,128 +1,125 @@ - use super::*; -unsafe extern "C" fn wolf_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.701); + FT_MOTION_RATE(agent, 1.701); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 17.0, 361, 106, 0, 30, 4.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 106, 0, 30, 4.0, -1.5, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 15.0, 361, 106, 0, 30, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 15.0, 361, 106, 0, 30, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 17.0, 361, 106, 0, 30, 4.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 106, 0, 30, 4.0, -1.5, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 15.0, 361, 106, 0, 30, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 15.0, 361, 106, 0, 30, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state,17.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 45, 80, 0, 50, 3.5, -1.0, -0.6, -0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 40, 93, 0, 37, 4.0, 0.0, 0.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 16.0, 40, 93, 0, 37, 4.5, 3.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 45, 80, 0, 50, 3.5, -1.0, -0.6, -0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 40, 93, 0, 37, 4.0, 0.0, 0.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 16.0, 40, 93, 0, 37, 4.5, 3.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 80, 0, 50, 2.5, -0.3, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 40, 90, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0, 40, 90, 0, 50, 3.5, 4.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 80, 0, 50, 2.5, -0.3, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 40, 90, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0, 40, 90, 0, 50, 3.5, 4.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wolf_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 5.0, 1.5, 16, -20, 5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 5.0, 1.5, 16, -20, 5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 6, -4, 160, 40, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 3, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 6, -4, 160, 40, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 3, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attacks4", wolf_attack_s4_s_game) - .acmd("game_attackhi4", wolf_attack_hi4_game) - .acmd("game_attacklw4", wolf_attack_lw4_game) - .acmd("effect_attacklw4", wolf_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/wolf/src/acmd/specials.rs b/fighters/wolf/src/acmd/specials.rs index 3012c2efa8..8c01105a2e 100644 --- a/fighters/wolf/src/acmd/specials.rs +++ b/fighters/wolf/src/acmd/specials.rs @@ -1,341 +1,323 @@ use super::*; -unsafe extern "C" fn wolf_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 1, false); - } +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 34, 85, 0, 30, 4.5, 0.0, 6.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.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) { + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); } - frame(lua_state, 10.0); - if is_excute(fighter) { - JostleModule::set_status(boma, true); + if ArticleModule::is_exist(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); } - -} - -unsafe extern "C" fn wolf_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 60, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 15.0); + if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, -3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 70, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 16.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); } - frame(lua_state, 26.0); - if is_excute(fighter) { + frame(lua_state, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn wolf_special_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::select_cliff_hangdata(boma, *FIGHTER_FOX_CLIFF_HANG_DATA_SPECIAL_HI as u32); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, -3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 38.0); + if MotionModule::motion_kind(boma) == smash::hash40("special_air_n") { + FT_MOTION_RATE(agent, 1.8); } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if ArticleModule::is_exist(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_KICK); - WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_ENABLE_CONTROL); + frame(lua_state, 45.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn wolf_special_s_end_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash_scratch"), Hash40::new("top"), 5, 13, 0, -40, 0, 0, 0.45, true); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5.5, 5.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - } +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + EFFECT(agent, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + } } -unsafe extern "C" fn wolf_special_s_game(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { - JostleModule::set_status(fighter.module_accessor, false); - } - frame(fighter.lua_state_agent, 0.66); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT(agent, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); } + frame(lua_state, 22.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + } } -unsafe extern "C" fn wolf_illusion_move_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { + JostleModule::set_status(boma, false); + } + frame(lua_state, 0.66); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn wolf_special_s_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash"), Hash40::new("top"), -3, 5.5, 0, 65, 0, 0, 0.75, false); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - // EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash_rush"), Hash40::new("top"), -3, 20.7, 35, 65, 0, 0, 0.75, false); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_slash"), Hash40::new("top"), -3, 5.5, 0, 65, 0, 0, 0.75, false); + EffectModule::enable_sync_init_pos_last(boma); + // EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_rush"), Hash40::new("top"), -3, 20.7, 35, 65, 0, 0, 0.75, false); } } -unsafe extern "C" fn wolf_special_s_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.33); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wolf_special_s01")); - PLAY_SE(fighter, Hash40::new("se_wolf_special_s02")); +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.33); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wolf_special_s01")); + PLAY_SE(agent, Hash40::new("se_wolf_special_s02")); } } -unsafe extern "C" fn wolf_special_air_n_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); - } - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(fighter) { - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); - } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, -3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); } - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 34, 85, 0, 30, 4.5, 0.0, 6.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, 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_MAGIC, *ATTACK_REGION_PUNCH); } - frame(fighter.lua_state_agent, 38.0); - if MotionModule::motion_kind(fighter.module_accessor) == smash::hash40("special_air_n") { - FT_MOTION_RATE(fighter, 1.8); + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(fighter) { - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - frame(fighter.lua_state_agent, 45.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + frame(lua_state, 10.0); + if is_excute(agent) { + JostleModule::set_status(boma, true); } } -unsafe extern "C" fn wolf_special_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - EFFECT(fighter, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - } +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_scratch"), Hash40::new("top"), 5, 13, 0, -40, 0, 0, 0.45, true); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5.5, 5.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + } } -unsafe extern "C" fn wolf_special_air_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT(fighter, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 60, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 70, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - } } -unsafe extern "C" fn wolf_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 7.7, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - //Reflection begins on same frame shine hitbox is active - ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.72); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, *FIGHTER_FOX_CLIFF_HANG_DATA_SPECIAL_HI as u32); } - frame(lua_state, 2.0); - if is_excute(fighter) { + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, -3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_KICK); + WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_ENABLE_CONTROL); + } } -unsafe extern "C" fn wolf_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 8.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 7.7, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + //Reflection begins on same frame shine hitbox is active ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.75); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.72); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_loop"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); - EFFECT_FLW_POS(fighter, Hash40::new("wolf_ref_ref"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 1, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_loop"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("wolf_ref_ref"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 1, 0, 0, 0, 0.8, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("wolf_ref_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("wolf_ref_start"), -1); } else{; frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("wolf_ref_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("wolf_ref_start"), -1); } } -unsafe extern "C" fn wolf_special_lw_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wolf_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wolf_special_l01")); } } -unsafe extern "C" fn wolf_special_lw_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn wolf_special_air_lw_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - } +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 8.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); + // Reflection begins on same frame shine hitbox is active + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.75); } - frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_specialsend", wolf_special_s_end_game) - .acmd("game_specialairsend", wolf_special_s_end_game) - .acmd("game_specialhi", wolf_special_hi_game) - .acmd("game_specialhifall", wolf_special_hi_fall_game) - .acmd("game_speciallwstart", wolf_special_lw_start_game) - .acmd("game_specialairlwstart", wolf_special_air_lw_start_game) - .acmd("effect_speciallwstart", wolf_special_lw_start_effect) - .acmd("effect_specialairlwstart", wolf_special_lw_start_effect) - .acmd("sound_speciallwstart", wolf_special_lw_start_sound) - .acmd("sound_specialairlwstart", wolf_special_lw_start_sound) - .acmd("effect_specialairsend", wolf_special_s_end_effect) - .acmd("effect_specialsend", wolf_special_s_end_effect) - .acmd("game_specialairs", wolf_special_s_game) - .acmd("game_specials", wolf_special_s_game) - .acmd("effect_specialairs", wolf_special_s_effect) - .acmd("effect_specials", wolf_special_s_effect) - .acmd("sound_specialairs", wolf_special_s_sound) - .acmd("sound_specials", wolf_special_s_sound) - .acmd("game_specialn", wolf_special_air_n_game) - .acmd("game_specialairn", wolf_special_air_n_game) - .acmd("effect_specialn", wolf_special_n_effect) - .acmd("effect_specialairn", wolf_special_air_n_effect) - .install(); - smashline::Agent::new("wolf_illusion") - .acmd("game_moveair", wolf_illusion_move_game) - .acmd("game_moveground", wolf_illusion_move_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialairn", effect_specialairn); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("sound_specialairs", sound_specials); + + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_specialhifall", game_specialhifall); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("sound_speciallwstart", sound_speciallwstart); + agent.acmd("expression_speciallwstart", expression_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("sound_specialairlwstart", sound_speciallwstart); + agent.acmd("expression_specialairlwstart", expression_speciallwstart); } diff --git a/fighters/wolf/src/acmd/throws.rs b/fighters/wolf/src/acmd/throws.rs index bc60b49c68..3d2ffb1bc5 100644 --- a/fighters/wolf/src/acmd/throws.rs +++ b/fighters/wolf/src/acmd/throws.rs @@ -1,137 +1,132 @@ - use super::*; -unsafe extern "C" fn wolf_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { 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"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 wolf_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(10.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(10.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } - FT_MOTION_RATE(fighter, 1.16); + FT_MOTION_RATE(agent, 1.16); } -unsafe extern "C" fn wolf_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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); } - FT_MOTION_RATE(fighter, 1.15); + FT_MOTION_RATE(agent, 1.15); } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 55, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 55, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 55, 100, 140, 10, 5.5, 0.0, 8.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 55, 100, 140, 10, 5.5, 0.0, 8.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 7); + CHECK_FINISH_CAMERA(agent, 16, 7); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 58, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 58, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.813); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.813); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 120, 100, 0, 50, 8.0, 2.0, 1.0, 2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 120, 100, 0, 50, 8.0, 0.0, 12.0, -8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 120, 100, 0, 50, 8.0, 2.0, 1.0, 2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 120, 100, 0, 50, 8.0, 0.0, 12.0, -8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 9); + CHECK_FINISH_CAMERA(agent, 11, 9); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); //AttackModule::resume_absolute_catch_damage(); } - } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_catch", wolf_catch_game) - .acmd("game_catchdash", wolf_catch_dash_game) - .acmd("game_catchturn", wolf_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/wolf/src/acmd/tilts.rs b/fighters/wolf/src/acmd/tilts.rs index 3ab835ee16..62b22f7025 100644 --- a/fighters/wolf/src/acmd/tilts.rs +++ b/fighters/wolf/src/acmd/tilts.rs @@ -1,124 +1,120 @@ - use super::*; -unsafe extern "C" fn wolf_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 13.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 7.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 6.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 6.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 13.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 7.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 3.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 4.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 3.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 4.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 115, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 80, 110, 0, 35, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 10.0, 85, 105, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 4.0/(8.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 115, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 80, 110, 0, 35, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 10.0, 85, 105, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(32.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(32.0-9.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wolf_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn wolf_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 60, 100, 0, 45, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 68, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 60, 100, 0, 45, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 68, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attacks3hi", wolf_attack_s3_hi_game) - .acmd("game_attacks3", wolf_attack_s3_s_game) - .acmd("game_attacks3lw", wolf_attack_s3_lw_game) - .acmd("game_attackhi3", wolf_attack_hi3_game) - .acmd("expression_attackhi3", wolf_attack_hi3_expression) - .acmd("game_attacklw3", wolf_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/wolf/src/blaster_bullet/acmd.rs b/fighters/wolf/src/blaster_bullet/acmd.rs new file mode 100644 index 0000000000..64f6b52906 --- /dev/null +++ b/fighters/wolf/src/blaster_bullet/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 40, 120, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 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_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/wolf/src/blaster_bullet/mod.rs b/fighters/wolf/src/blaster_bullet/mod.rs new file mode 100644 index 0000000000..9b216f1f15 --- /dev/null +++ b/fighters/wolf/src/blaster_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wolf_blaster_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/illusion/acmd.rs b/fighters/wolf/src/illusion/acmd.rs new file mode 100644 index 0000000000..60671ea60e --- /dev/null +++ b/fighters/wolf/src/illusion/acmd.rs @@ -0,0 +1,12 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_moveair", game_move); + agent.acmd("game_moveground", game_move); +} diff --git a/fighters/wolf/src/illusion/mod.rs b/fighters/wolf/src/illusion/mod.rs new file mode 100644 index 0000000000..91d859d37f --- /dev/null +++ b/fighters/wolf/src/illusion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wolf_illusion"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/lib.rs b/fighters/wolf/src/lib.rs index 59499afacc..ada167b68c 100644 --- a/fighters/wolf/src/lib.rs +++ b/fighters/wolf/src/lib.rs @@ -6,8 +6,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod blaster_bullet; +mod illusion; use smash::{ lib::{ @@ -39,9 +44,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wolf"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + blaster_bullet::install(); + illusion::install(); } diff --git a/fighters/wolf/src/opff.rs b/fighters/wolf/src/opff.rs index 12e6a2e9f7..44c51f149e 100644 --- a/fighters/wolf/src/opff.rs +++ b/fighters/wolf/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -95,8 +94,7 @@ pub unsafe fn wolf_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wolf") - .on_line(Main, wolf_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wolf_frame_wrapper); } diff --git a/fighters/wolf/src/status.rs b/fighters/wolf/src/status.rs deleted file mode 100644 index ee9a974345..0000000000 --- a/fighters/wolf/src/status.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -mod special_s; -mod special_hi; -mod special_lw; - -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); -} diff --git a/fighters/wolf/src/status/mod.rs b/fighters/wolf/src/status/mod.rs new file mode 100644 index 0000000000..ebc51138a1 --- /dev/null +++ b/fighters/wolf/src/status/mod.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; +// status script import + +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} diff --git a/fighters/wolf/src/status/special_hi.rs b/fighters/wolf/src/status/special_hi.rs index 6527177c4a..5faf4cea9f 100644 --- a/fighters/wolf/src/status/special_hi.rs +++ b/fighters/wolf/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI @@ -25,13 +24,7 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("wolf") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - End, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); } diff --git a/fighters/wolf/src/status/special_lw.rs b/fighters/wolf/src/status/special_lw.rs index 6864fbeeba..68ced523a6 100644 --- a/fighters/wolf/src/status/special_lw.rs +++ b/fighters/wolf/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_LW @@ -119,15 +118,9 @@ pub unsafe extern "C" fn special_lw_loop_end(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("wolf") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status( - End, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, - special_lw_loop_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(End, *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, special_lw_loop_end); } diff --git a/fighters/wolf/src/status/special_s.rs b/fighters/wolf/src/status/special_s.rs index 48c9f75664..97037c80fc 100644 --- a/fighters/wolf/src/status/special_s.rs +++ b/fighters/wolf/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; use vars::wolf::status::*; use consts::statuses::wolf::*; @@ -416,33 +415,25 @@ unsafe extern "C" fn special_s_end_exec(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -extern "C" fn wolf_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_WOLF { - return; - } - - let instruction = 0x7100001Fu32 | ((SPECIAL_S_RUSH as u32 & 0xFFF) << 10); - skyline::patching::Patch::in_text(0x12c29c0).data(instruction); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + let instruction = 0x7100001Fu32 | ((SPECIAL_S_RUSH as u32 & 0xFFF) << 10); + skyline::patching::Patch::in_text(0x12c29c0).data(instruction); } -pub fn install() { - smashline::Agent::new("wolf") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_end) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_exec) - .status(Pre, SPECIAL_S_RUSH, special_s_rush_pre) - .status(Main, SPECIAL_S_RUSH, special_s_rush_main) - .status(End, SPECIAL_S_RUSH, special_s_rush_end) - .status(Init, SPECIAL_S_RUSH, special_s_rush_init) - .status(Pre, SPECIAL_S_END, special_s_end_pre) - .status(Main, SPECIAL_S_END, special_s_end_main) - .status(End, SPECIAL_S_END, special_s_end_end) - .status(Init, SPECIAL_S_END, special_s_end_init) - .status(Exec, SPECIAL_S_END, special_s_end_exec) - .on_start(wolf_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_end); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_exec); + agent.status(Pre, SPECIAL_S_RUSH, special_s_rush_pre); + agent.status(Main, SPECIAL_S_RUSH, special_s_rush_main); + agent.status(End, SPECIAL_S_RUSH, special_s_rush_end); + agent.status(Init, SPECIAL_S_RUSH, special_s_rush_init); + agent.status(Pre, SPECIAL_S_END, special_s_end_pre); + agent.status(Main, SPECIAL_S_END, special_s_end_main); + agent.status(End, SPECIAL_S_END, special_s_end_end); + agent.status(Init, SPECIAL_S_END, special_s_end_init); + agent.status(Exec, SPECIAL_S_END, special_s_end_exec); } diff --git a/fighters/yoshi/src/acmd/aerials.rs b/fighters/yoshi/src/acmd/aerials.rs index 1dc7996189..ca5213798a 100644 --- a/fighters/yoshi/src/acmd/aerials.rs +++ b/fighters/yoshi/src/acmd/aerials.rs @@ -1,280 +1,277 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 4.3, 7.5, Some(0.0), Some(3.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 4.3, 7.5, Some(0.0), Some(3.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 4.5, 5.0, Some(0.0), Some(3.7), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 4.5, 5.0, Some(0.0), Some(3.7), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn yoshi_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 15.0, 361, 96, 0, 15, 5.0, 0.5, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 15.0, 361, 96, 0, 15, 5.0, 0.5, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("head"), 14.0, 270, 90, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 14.0, 270, 90, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 14.0, 270, 79, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 14.0, 270, 79, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 67.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 yoshi_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_c"), Hash40::new("top"), 4, 9, 4.5, 0, -50, -90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_c"), Hash40::new("top"), 4, 9, 4.5, 0, -50, -90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } } -unsafe extern "C" fn yoshi_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); MotionModule::set_rate(boma, 0.5); frame(lua_state, 10.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 12.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.5, 60, 100, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.5, 60, 100, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 19.5); MotionModule::set_rate(boma, (50.0 - 29.0) / 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn yoshi_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 3, -4, 175.671, -17.429, 82.039, 1, true, 0.3); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 3, -4, 175.671, -17.429, 82.039, 1, true, 0.3); + LAST_EFFECT_SET_RATE(agent, 2.5); } frame(lua_state, 13.5); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 4, -1.5, 184, -16, -105, 1, true, 0.3); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 4, -1.5, 184, -16, -105, 1, true, 0.3); + LAST_EFFECT_SET_RATE(agent, 2.5); } - frame(fighter.lua_state_agent, 17.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 4, -4.5, -175.777, 8.688, 80.371, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); + frame(lua_state, 17.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 4, -4.5, -175.777, 8.688, 80.371, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn yoshi_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } frame(lua_state, 11.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } frame(lua_state, 15.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); MotionModule::set_rate(boma, (4.2 - 0.0) / 5.0); frame(lua_state, 4.2); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 5.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 5.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); MotionModule::set_rate(boma, 1.11); frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn yoshi_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.2); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 12, -2, 111, -66.6, -211, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 12, -2, 111, -66.6, -211, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn yoshi_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.2); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.2); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } for _ in 0..6 { wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.3, 367, 80, 0, 5, 5.0, 0.0, 1.0, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.3, 367, 80, 0, 5, 5.0, 0.0, 1.0, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } for _ in 0..7 { wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.9, 367, 100, 0, 5, 5.0, 0.0, 0.5, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.9, 367, 100, 0, 5, 5.0, 0.0, 0.5, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.8, 80, 179, 0, 55, 6.5, 0.0, 0.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, -2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.8, 80, 179, 0, 55, 6.5, 0.0, 0.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, -2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attackairn", yoshi_attack_air_n_game) - .acmd("game_attackairf", yoshi_attack_air_f_game) - .acmd("effect_attackairf", yoshi_attack_air_f_effect) - .acmd("game_attackairb", yoshi_attack_air_b_game) - .acmd("effect_attackairb", yoshi_attack_air_b_effect) - .acmd("expression_attackairb", yoshi_attack_air_b_expression) - .acmd("game_attackairhi", yoshi_attack_air_hi_game) - .acmd("effect_attackairhi", yoshi_attack_air_hi_effect) - .acmd("expression_attackairhi", yoshi_attack_air_hi_expression) - .acmd("game_attackairlw", yoshi_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/yoshi/src/acmd/ground.rs b/fighters/yoshi/src/acmd/ground.rs index 54120ed416..ce8879773c 100644 --- a/fighters/yoshi/src/acmd/ground.rs +++ b/fighters/yoshi/src/acmd/ground.rs @@ -1,110 +1,107 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 50, 38, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 55, 38, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 4.0, 60, 38, 0, 8, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 50, 38, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 55, 38, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 4.0, 60, 38, 0, 8, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Jab-Lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 20, 0, 10, 2.5, 0.0, 3.0, -2.0, Some(0.0), Some(3.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 20, 0, 10, 2.5, 0.0, 3.0, -2.0, Some(0.0), Some(3.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn yoshi_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 361, 100, 0, 25, 5.0, 1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 361, 100, 0, 25, 5.0, 1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn yoshi_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - 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); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1, 9, 3, -9.678, -9.226, 18.31, 0.9, true, *EF_FLIP_YZ, 1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1, 9, 3, -9.678, -9.226, 18.31, 0.9, true, *EF_FLIP_YZ, 1); } } -unsafe extern "C" fn yoshi_attack_12_expression(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_L); +unsafe extern "C" fn expression_attack12(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_L); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn yoshi_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.79); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.79); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 5.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 65, 45, 0, 90, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 5.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 65, 45, 0, 90, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 4.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 4.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attack11", yoshi_attack_11_game) - .acmd("game_attack12", yoshi_attack_12_game) - .acmd("effect_attack12", yoshi_attack_12_effect) - .acmd("expression_attack12", yoshi_attack_12_expression) - .acmd("game_attackdash", yoshi_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/yoshi/src/acmd/mod.rs b/fighters/yoshi/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/yoshi/src/acmd/mod.rs +++ b/fighters/yoshi/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/yoshi/src/acmd/other.rs b/fighters/yoshi/src/acmd/other.rs index 0c3f89c104..6cf9f075c3 100644 --- a/fighters/yoshi/src/acmd/other.rs +++ b/fighters/yoshi/src/acmd/other.rs @@ -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(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_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(boma) { + 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(boma, 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); } diff --git a/fighters/yoshi/src/acmd/smashes.rs b/fighters/yoshi/src/acmd/smashes.rs index f85ba05bc1..4c96430b77 100644 --- a/fighters/yoshi/src/acmd/smashes.rs +++ b/fighters/yoshi/src/acmd/smashes.rs @@ -1,183 +1,178 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 107, 0, 30, 4.5, 0.0, 11.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 105, 0, 30, 5.0, 0.0, 11.5, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 6.5, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 6.5, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 107, 0, 30, 4.5, 0.0, 11.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 105, 0, 30, 5.0, 0.0, 11.5, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 4.2, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 4.2, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 4.2, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 4.2, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 75, 104, 0, 38, 5.0, 0.0, -2.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 75, 104, 0, 38, 4.5, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 75, 104, 0, 38, 5.0, 0.0, -2.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 75, 104, 0, 38, 4.5, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_NORMAL); - ATK_POWER(fighter, 0, 12); - ATK_POWER(fighter, 1, 12); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_NORMAL); + ATK_POWER(agent, 0, 12); + ATK_POWER(agent, 1, 12); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 46, 2.5, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(19.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 46, 2.5, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(19.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 44, 2.5, 0.0, 2.0, -3.0, Some(0.0), Some(2.0), Some(-18.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 44, 2.5, 0.0, 2.0, -3.0, Some(0.0), Some(2.0), Some(-18.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn yoshi_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -2.5, 4.0, 6, -4.564, 0.576, -162.823, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.198, 0.754, 1.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -2.5, 4.0, 6, -4.564, 0.576, -162.823, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.198, 0.754, 1.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 3.5, 20, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 3.5, 20, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, -5, 172.748, -44.731, 5.118, 1.3, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.198, 0.754, 1.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, -5, 172.748, -44.731, 5.118, 1.3, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.198, 0.754, 1.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -20, 3, -15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -20, 3, -15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attacks4hi", yoshi_attack_s4_hi_game) - .acmd("game_attacks4", yoshi_attack_s4_s_game) - .acmd("game_attacks4lw", yoshi_attack_s4_lw_game) - .acmd("game_attackhi4", yoshi_attack_hi4_game) - .acmd("game_attacklw4", yoshi_attack_lw4_game) - .acmd("effect_attacklw4", yoshi_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/yoshi/src/acmd/specials.rs b/fighters/yoshi/src/acmd/specials.rs index 8a7106a36b..a4cd77074f 100644 --- a/fighters/yoshi/src/acmd/specials.rs +++ b/fighters/yoshi/src/acmd/specials.rs @@ -1,102 +1,75 @@ - use super::*; -unsafe extern "C" fn yoshi_special_s_loop_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"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - JostleModule::set_status(fighter.module_accessor, false); - } -} - -unsafe extern "C" fn yoshi_special_air_s_loop_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"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - JostleModule::set_status(fighter.module_accessor, false); +unsafe extern "C" fn game_specialsloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + JostleModule::set_status(boma, false); } } -unsafe extern "C" fn yoshi_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_S_FLAG_HIDE_EGG); } } -unsafe extern "C" fn yoshi_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_S_FLAG_HIDE_EGG); - } -} - -unsafe extern "C" fn yoshi_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 7.0, 0.0, 7.0, 10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 7.0, 0.0, 7.0, 10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_LW_FLAG_LANDING_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 80, 0, 60, 6.8, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 80, 0, 60, 6.8, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } - } -unsafe extern "C" fn yoshi_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_LW_FLAG_LANDING_ENABLE); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_specialsloop", yoshi_special_s_loop_game) - .acmd("game_specialairsloop", yoshi_special_air_s_loop_game) - .acmd("game_specialsend", yoshi_special_s_end_game) - .acmd("game_specialairsend", yoshi_special_air_s_end_game) - .acmd("game_speciallw", yoshi_special_lw_game) - .acmd("game_specialairlw", yoshi_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsloop", game_specialsloop); + agent.acmd("game_specialairsloop", game_specialsloop); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/yoshi/src/acmd/throws.rs b/fighters/yoshi/src/acmd/throws.rs index 208acb1f03..aa43c37ca8 100644 --- a/fighters/yoshi/src/acmd/throws.rs +++ b/fighters/yoshi/src/acmd/throws.rs @@ -1,98 +1,94 @@ - use super::*; -unsafe extern "C" fn yoshi_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.857); + FT_MOTION_RATE(agent, 0.857); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("mouth2"), 3.5, -2.5, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 7.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("mouth2"), 3.5, -2.5, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 7.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); } frame(lua_state, 22.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); } - } -unsafe extern "C" fn yoshi_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("mouth2"), 3.5, -2.5, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("mouth2"), 3.5, -2.5, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 24.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); } } -unsafe extern "C" fn yoshi_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("mouth2"), 3.5, -2.0, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.5, 0.0, 6.0, -8.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("mouth2"), 3.5, -2.0, -0.5, 0.0, Some(0.7), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.5, 0.0, 6.0, -8.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); } } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_catch", yoshi_catch_game) - .acmd("game_catchdash", yoshi_catch_dash_game) - .acmd("game_catchturn", yoshi_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/yoshi/src/acmd/tilts.rs b/fighters/yoshi/src/acmd/tilts.rs index 5c949b67b5..0610cefb69 100644 --- a/fighters/yoshi/src/acmd/tilts.rs +++ b/fighters/yoshi/src/acmd/tilts.rs @@ -1,205 +1,199 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn yoshi_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 11, 6, 18, -27, 156, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 9, 4, 173, -156, 2, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn yoshi_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 9, 4, 173, -156, 2, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 11, 6, 18, -27, 156, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } - -unsafe extern "C" fn yoshi_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 6, 4, 166, -162, 9, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 6, 4, 166, -162, 9, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 9.0, 90, 112, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 9.0, 90, 112, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } - + } } -unsafe extern "C" fn yoshi_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 16, -1, 0, 52, 88, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 16, -1, 0, 52, 88, 1.15, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn yoshi_attack_hi3_expression(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_attackhi3(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); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 9.0, 361, 30, 0, 67, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 9.0, 361, 30, 0, 67, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 10.0, 28, 40, 0, 67, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 9.0, 361, 30, 0, 67, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 9.0, 361, 30, 0, 67, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 10.0, 28, 40, 0, 67, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 0.900); + FT_MOTION_RATE(agent, 0.900); } - } -unsafe extern "C" fn yoshi_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 10, 0, 35, 180, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 10, 0, 35, 180, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, -2.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, -2.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attacks3hi", yoshi_attack_s3_hi_game) - .acmd("effect_attacks3hi", yoshi_attack_s3_hi_effect) - .acmd("game_attacks3", yoshi_attack_s3_s_game) - .acmd("effect_attacks3", yoshi_attack_s3_s_effect) - .acmd("game_attacks3lw", yoshi_attack_s3_lw_game) - .acmd("effect_attacks3lw", yoshi_attack_s3_lw_effect) - .acmd("game_attackhi3", yoshi_attack_hi3_game) - .acmd("effect_attackhi3", yoshi_attack_hi3_effect) - .acmd("expression_attackhi3", yoshi_attack_hi3_expression) - .acmd("game_attacklw3", yoshi_attack_lw3_game) - .acmd("effect_attacklw3", yoshi_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/yoshi/src/lib.rs b/fighters/yoshi/src/lib.rs index 8e2ddcc726..faab10c1bc 100644 --- a/fighters/yoshi/src/lib.rs +++ b/fighters/yoshi/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles; + +mod tamago; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("yoshi"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + tamago::install(); } diff --git a/fighters/yoshi/src/opff.rs b/fighters/yoshi/src/opff.rs index 101ea124e4..192ce96d1c 100644 --- a/fighters/yoshi/src/opff.rs +++ b/fighters/yoshi/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - /*unsafe fn egg_roll_jc_waveland(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, stick_x: f32, facing: f32) { if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_YOSHI_STATUS_KIND_SPECIAL_S_LOOP, @@ -67,8 +66,7 @@ pub unsafe fn yoshi_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("yoshi") - .on_line(Main, yoshi_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, yoshi_frame_wrapper); } diff --git a/fighters/yoshi/src/status.rs b/fighters/yoshi/src/status.rs deleted file mode 100644 index 60f6b845d8..0000000000 --- a/fighters/yoshi/src/status.rs +++ /dev/null @@ -1,306 +0,0 @@ -use super::*; -use globals::*; -utils::import!(common::djc::attack_air_main_status); -// status script import - -// FIGHTER_STATUS_KIND_GUARD_ON - -pub unsafe extern "C" fn guard_on(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - fighter.sub_status_guard_on_common(); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - init_guard_damage_uniq(fighter); - fighter.main_shift(guard_on_main) -} - -unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_status_guard_on_main_air_common().get_bool() { - return 0.into(); - } - - fighter.sub_guard_cont(); - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND - && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD, false); - return 1.into(); - } - else { - let guard_shield = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_GUARD_SHIELD); - let min_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_GUARD_ON_WORK_INT_MIN_FRAME); - - if guard_shield > 0.0 - && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_GUARD) - && min_frame <= 0 - && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::off_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ); - fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD_OFF, true); - return 1.into(); - } - } - - 0.into() -} - -// FIGHTER_STATUS_KIND_GUARD_DAMAGE // - -pub unsafe extern "C" fn init_guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_ftStatusUniqProcessGuardDamage_initStatus_Inner(); - smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { - let shield_radius = - WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let throw_scale: Vector3f = Vector3f { - x: shield_radius, - y: shield_radius, - z: shield_radius, - }; - - ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); - - fighter.clear_lua_stack(); - lua_args!(fighter, 0x2dc1210b69i64); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); -} - -pub unsafe extern "C" fn exit_guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_ftStatusUniqProcessGuardDamage_exitStatus_common(); - smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -pub unsafe extern "C" fn guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardDamage_common(L2CValue::Bool(false)); - fighter.sub_shift_status_main(L2CValue::Ptr( - L2CFighterCommon_status_GuardDamage_Main as *const () as _, - )) -} - -// FIGHTER_STATUS_KIND_GUARD_OFF // - -pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("just_shield_off"), - 0.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_yoshi_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - }; - fighter.sub_shift_status_main(L2CValue::Ptr(guard_off_main as *const () as _)) -} - -unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_GuardOff_Main_common().get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false), - ); - return 1.into(); - } - if fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_JUMP_TRIGGER != 0 { - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE, - ) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_ESCAPE), - L2CValue::Bool(false), - ); - return 1.into(); - } - } - } - } - return 0.into(); -} - -// FIGHTER_STATUS_KIND_JUMP_AERIAL - -pub unsafe extern "C" fn pre_jump_aerial(fighter: &mut L2CFighterCommon) -> L2CValue { - let is_0 = fighter.status_pre_JumpAerial_sub().get_i32() == 0; - let should_end = is_0 as i32 & 1 == 0; - if !should_end { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_AIR), - *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION, - *GROUND_CORRECT_KIND_AIR as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0, - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_ENABLE, - true, - false, - true, - 0, - *FIGHTER_STATUS_ATTR_INTO_DOOR as u32, - 0, - 0, - ); - } - return (should_end as i32).into(); -} - -pub unsafe extern "C" fn jump_aerial(fighter: &mut L2CFighterCommon) -> L2CValue { - let aerial_damage_reaction = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLOAT_AERIAL_DAMAGE_REACTION, - ); - DamageModule::set_no_reaction_mode_status( - fighter.module_accessor, - DamageNoReactionMode { - _address: *DAMAGE_NO_REACTION_MODE_REACTION_VALUE as u8, - }, - aerial_damage_reaction, - -1.0, - -1, - ); - WorkModule::on_flag( - fighter.module_accessor, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLAG_JUMP_AERIAL_ARMOR, - ); - let turn_cont_value = WorkModule::get_param_float( - fighter.module_accessor, - hash40("jump_aerial"), - hash40("turn_cont_value"), - ); - if fighter.global_table[STICK_X].get_f32() * -1.0 * PostureModule::lr(fighter.module_accessor) - > turn_cont_value - { - let turn_count = WorkModule::get_param_int( - fighter.module_accessor, - hash40("jump_aerial"), - hash40("turn_count"), - ); - WorkModule::set_int( - fighter.module_accessor, - turn_count, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, - ); - } else { - WorkModule::set_int( - fighter.module_accessor, - 0, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, - ); - } - MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); - fighter.status_JumpAerial(); - 0.into() -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); - 0.into() -} - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -pub unsafe extern "C" fn exec_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(); - 0.into() -} - -pub unsafe extern "C" fn exit_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exit(); - 0.into() -} - -pub fn install() { - smashline::Agent::new("yoshi") - .status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on) - .status(Init, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, init_guard_damage) - .status(Exit, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, exit_guard_damage) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, pre_jump_aerial) - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, exec_attack_air) - .status(Exit, *FIGHTER_STATUS_KIND_ATTACK_AIR, exit_attack_air) - .install(); -} diff --git a/fighters/yoshi/src/status/attack_air.rs b/fighters/yoshi/src/status/attack_air.rs new file mode 100644 index 0000000000..56ed97e169 --- /dev/null +++ b/fighters/yoshi/src/status/attack_air.rs @@ -0,0 +1,29 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); + 0.into() +} + +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(); + 0.into() +} + +pub unsafe extern "C" fn attack_air_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exit(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exit); +} diff --git a/fighters/yoshi/src/status/guard_damage.rs b/fighters/yoshi/src/status/guard_damage.rs new file mode 100644 index 0000000000..2b629a6433 --- /dev/null +++ b/fighters/yoshi/src/status/guard_damage.rs @@ -0,0 +1,26 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD_DAMAGE + +pub unsafe extern "C" fn guard_damage_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_ftStatusUniqProcessGuardDamage_initStatus_Inner(); + smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +pub unsafe extern "C" fn guard_damage_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_ftStatusUniqProcessGuardDamage_exitStatus_common(); + smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +pub unsafe extern "C" fn guard_damage_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardDamage_common(L2CValue::Bool(false)); + fighter.sub_shift_status_main(L2CValue::Ptr( + L2CFighterCommon_status_GuardDamage_Main as *const () as _, + )) +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_init); + agent.status(Exit, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_exit); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_main); +} diff --git a/fighters/yoshi/src/status/guard_off.rs b/fighters/yoshi/src/status/guard_off.rs new file mode 100644 index 0000000000..7b8474b9cf --- /dev/null +++ b/fighters/yoshi/src/status/guard_off.rs @@ -0,0 +1,110 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD_OFF + +pub unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("just_shield_off"), + 0.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_yoshi_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + }; + fighter.sub_shift_status_main(L2CValue::Ptr(guard_off_main_loop as *const () as _)) +} + +unsafe extern "C" fn guard_off_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_GuardOff_Main_common().get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false), + ); + return 1.into(); + } + if fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_JUMP_TRIGGER != 0 { + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE, + ) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_ESCAPE), + L2CValue::Bool(false), + ); + return 1.into(); + } + } + } + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off_main); +} diff --git a/fighters/yoshi/src/status/guard_on.rs b/fighters/yoshi/src/status/guard_on.rs new file mode 100644 index 0000000000..2c08edd457 --- /dev/null +++ b/fighters/yoshi/src/status/guard_on.rs @@ -0,0 +1,64 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD_ON + +unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { + let shield_radius = + WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let throw_scale: Vector3f = Vector3f { + x: shield_radius, + y: shield_radius, + z: shield_radius, + }; + + ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); + + fighter.clear_lua_stack(); + lua_args!(fighter, 0x2dc1210b69i64); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); +} + +pub unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + fighter.sub_status_guard_on_common(); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + init_guard_damage_uniq(fighter); + fighter.main_shift(guard_on_main_loop) +} + +unsafe extern "C" fn guard_on_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_status_guard_on_main_air_common().get_bool() { + return 0.into(); + } + + fighter.sub_guard_cont(); + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND + && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD, false); + return 1.into(); + } + else { + let guard_shield = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_GUARD_SHIELD); + let min_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_GUARD_ON_WORK_INT_MIN_FRAME); + + if guard_shield > 0.0 + && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_GUARD) + && min_frame <= 0 + && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::off_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ); + fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD_OFF, true); + return 1.into(); + } + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on_main); +} diff --git a/fighters/yoshi/src/status/jump_aerial.rs b/fighters/yoshi/src/status/jump_aerial.rs new file mode 100644 index 0000000000..690d82ca31 --- /dev/null +++ b/fighters/yoshi/src/status/jump_aerial.rs @@ -0,0 +1,88 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP_AERIAL + +pub unsafe extern "C" fn jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let is_0 = fighter.status_pre_JumpAerial_sub().get_i32() == 0; + let should_end = is_0 as i32 & 1 == 0; + if !should_end { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_AIR), + *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION, + *GROUND_CORRECT_KIND_AIR as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0, + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_ENABLE, + true, + false, + true, + 0, + *FIGHTER_STATUS_ATTR_INTO_DOOR as u32, + 0, + 0, + ); + } + return (should_end as i32).into(); +} + +pub unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let aerial_damage_reaction = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLOAT_AERIAL_DAMAGE_REACTION, + ); + DamageModule::set_no_reaction_mode_status( + fighter.module_accessor, + DamageNoReactionMode { + _address: *DAMAGE_NO_REACTION_MODE_REACTION_VALUE as u8, + }, + aerial_damage_reaction, + -1.0, + -1, + ); + WorkModule::on_flag( + fighter.module_accessor, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLAG_JUMP_AERIAL_ARMOR, + ); + let turn_cont_value = WorkModule::get_param_float( + fighter.module_accessor, + hash40("jump_aerial"), + hash40("turn_cont_value"), + ); + if fighter.global_table[STICK_X].get_f32() * -1.0 * PostureModule::lr(fighter.module_accessor) + > turn_cont_value + { + let turn_count = WorkModule::get_param_int( + fighter.module_accessor, + hash40("jump_aerial"), + hash40("turn_count"), + ); + WorkModule::set_int( + fighter.module_accessor, + turn_count, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, + ); + } else { + WorkModule::set_int( + fighter.module_accessor, + 0, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, + ); + } + MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); + fighter.status_JumpAerial(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); +} diff --git a/fighters/yoshi/src/status/mod.rs b/fighters/yoshi/src/status/mod.rs new file mode 100644 index 0000000000..868ccc1e9b --- /dev/null +++ b/fighters/yoshi/src/status/mod.rs @@ -0,0 +1,18 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +mod guard_on; +mod guard_off; +mod guard_damage; +mod jump_aerial; +mod attack_air; + +pub fn install(agent: &mut Agent) { + guard_on::install(agent); + guard_off::install(agent); + guard_damage::install(agent); + jump_aerial::install(agent); + attack_air::install(agent); +} diff --git a/fighters/yoshi/src/tamago/acmd.rs b/fighters/yoshi/src/tamago/acmd.rs new file mode 100644 index 0000000000..53de5e5266 --- /dev/null +++ b/fighters/yoshi/src/tamago/acmd.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 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 game_burst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 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(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwed", game_throwed); + agent.acmd("game_burst", game_burst); +} diff --git a/fighters/yoshi/src/tamago/mod.rs b/fighters/yoshi/src/tamago/mod.rs new file mode 100644 index 0000000000..b38bf8b608 --- /dev/null +++ b/fighters/yoshi/src/tamago/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("yoshi_tamago"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/younglink/src/acmd/aerials.rs b/fighters/younglink/src/acmd/aerials.rs index accdbcfe1d..cc77e5f7e4 100644 --- a/fighters/younglink/src/acmd/aerials.rs +++ b/fighters/younglink/src/acmd/aerials.rs @@ -1,242 +1,287 @@ - use super::*; -unsafe extern "C" fn younglink_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 105, 0, 20, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 105, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 361, 105, 0, 20, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 105, 0, 20, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 105, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 361, 105, 0, 20, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 10, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 10, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.23/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.23/(3.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 367, 30, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 367, 30, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(24.0-16.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(24.0-16.0)); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 50, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 50, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 13); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 13); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn younglink_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 5.0, 365, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 5.0, 75, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 5.0, 365, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 5.0, 75, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 55, 75, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 55, 75, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 80, 85, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 80, 85, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 80, 80, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 80, 80, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn attack_air_lw2_bounce(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let bounce_speed = Vector3f {x: 0.0, y: 1.8, z: 0.0}; - KineticModule::add_speed(boma, &bounce_speed); - } } -unsafe extern "C" fn attack_air_lw2_attack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - // these are the same as the weak hits below - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 80, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 281, 83, 0, 30, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } -} - -unsafe extern "C" fn younglink_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 281, 50, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 281, 50, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0);{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 281, 60, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 281, 60, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0);{ - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } - frame(lua_state, 67.0);{ - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + AttackModule::clear_all(boma); + } } -} frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); } frame(lua_state, 72.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn game_attackairlw2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + // these are the same as the weak hits below + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 80, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 281, 83, 0, 30, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } +} + +unsafe extern "C" fn game_attackairlw2bound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let bounce_speed = Vector3f {x: 0.0, y: 1.8, z: 0.0}; + KineticModule::add_speed(boma, &bounce_speed); + } } -unsafe extern "C" fn younglink_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); + WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); + } + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 53.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 72.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attackairn", younglink_attack_air_n_game) - .acmd("game_attackairf", younglink_attack_air_f_game) - .acmd("expression_attackairf", younglink_attack_air_f_expression) - .acmd("game_attackairb", younglink_attack_air_b_game) - .acmd("game_attackairhi", younglink_attack_air_hi_game) - .acmd("game_attackairlw2bound", attack_air_lw2_bounce) - .acmd("game_attackairlw2attack", attack_air_lw2_attack) - .acmd("game_attackairlw", younglink_attack_air_lw_game) - .acmd("game_aircatchlanding", younglink_landing_air_catch_game) - .install(); +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw2attack", game_attackairlw2attack); + agent.acmd("game_attackairlw2bound", game_attackairlw2bound); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/younglink/src/acmd/ground.rs b/fighters/younglink/src/acmd/ground.rs index fc5b6132d4..1c557cf837 100644 --- a/fighters/younglink/src/acmd/ground.rs +++ b/fighters/younglink/src/acmd/ground.rs @@ -1,168 +1,163 @@ - use super::*; -unsafe extern "C" fn younglink_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 361, 15, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 361, 15, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn younglink_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 80, 15, 0, 32, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 80, 15, 0, 32, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn younglink_attack_13_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 75, 3.0, 5.5, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.5, 361, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 75, 3.0, 5.5, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.5, 361, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } - } -unsafe extern "C" fn younglink_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 70, 70, 0, 60, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 70, 70, 0, 60, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 50, 80, 0, 50, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 80, 0, 50, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 47.0, 18.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 47.0, 18.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 35.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn younglink_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rng = sv_math::rand(hash40("fighter"), 3) as i32; if rng == 2 { - PLAY_SE(fighter, Hash40::new("vc_younglink_appeal_h01")); + PLAY_SE(agent, Hash40::new("vc_younglink_appeal_h01")); } else { - PLAY_SE(fighter, Hash40::new("vc_younglink_attack01")); + PLAY_SE(agent, Hash40::new("vc_younglink_attack01")); } } } -unsafe extern "C" fn younglink_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attack11", younglink_attack_11_game) - .acmd("game_attack12", younglink_attack_12_game) - .acmd("game_attack13", younglink_attack_13_game) - .acmd("game_attackdash", younglink_attack_dash_game) - .acmd("effect_attackdash", younglink_attack_dash_effect) - .acmd("sound_attackdash", younglink_attack_dash_sound) - .acmd("expression_attackdash", younglink_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/younglink/src/acmd/mod.rs b/fighters/younglink/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/younglink/src/acmd/mod.rs +++ b/fighters/younglink/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/younglink/src/acmd/other.rs b/fighters/younglink/src/acmd/other.rs index dec73d7151..6d00150e2d 100644 --- a/fighters/younglink/src/acmd/other.rs +++ b/fighters/younglink/src/acmd/other.rs @@ -1,323 +1,145 @@ - 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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - -} - -unsafe extern "C" fn damageflylw_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_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(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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_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_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - -} - -unsafe extern "C" fn younglink_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.500); - } - frame(lua_state, 61.0); - if is_excute(fighter) { - if DamageModule::damage(boma, 0) > 2.5 { - DamageModule::add_damage(boma, -2.5, 0); - } - } - frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); } - } -unsafe extern "C" fn younglink_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.500); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { if DamageModule::damage(boma, 0) > 2.5 { DamageModule::add_damage(boma, -2.5, 0); } } frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.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 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_younglink_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_younglink_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, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_younglink_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_younglink_step_left_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_younglink_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_younglink_step_right_m")); } - } -unsafe extern "C" fn 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, 14.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); } - } -unsafe extern "C" fn younglink_boomerang_game_fly(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"), 11.8, 75, 30, 0, 75, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 30, 0, 55, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3.5, 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_KICK, *ATTACK_REGION_OBJECT); - } +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("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); -unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.5); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); - } - frame(lua_state, 12.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); - WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); - } - frame(lua_state, 46.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 53.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 72.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("younglink_boomerang") - .acmd("game_fly", younglink_boomerang_game_fly) - .install(); - smashline::Agent::new("younglink") - .acmd("game_aircatch", game_aircatch) - .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("game_appeallwr", younglink_appeal_lw_r_game) - .acmd("game_appeallwl", younglink_appeal_lw_l_game) - .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) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/younglink/src/acmd/smashes.rs b/fighters/younglink/src/acmd/smashes.rs index 93a274d96d..17b780c6c9 100644 --- a/fighters/younglink/src/acmd/smashes.rs +++ b/fighters/younglink/src/acmd/smashes.rs @@ -1,24 +1,39 @@ use super::*; -unsafe extern "C" fn younglink_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.8, 0.5, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.5, 5.4, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.8, 0.5, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.5, 5.4, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn younglink_attack_s4_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_younglink_attack03")); + PLAY_SE(agent, Hash40::new("se_common_smashswing_03")); + PLAY_SE(agent, Hash40::new("se_younglink_swing_ll")); + } +} + +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -51,7 +66,7 @@ unsafe extern "C" fn younglink_attack_s4_s_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn younglink_attack_s4_charge_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -63,92 +78,75 @@ unsafe extern "C" fn younglink_attack_s4_charge_expression(agent: &mut L2CAgentB if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_02")); - } - wait(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_younglink_attack03")); - PLAY_SE(agent, Hash40::new("se_common_smashswing_03")); - PLAY_SE(agent, Hash40::new("se_younglink_swing_ll")); - } } -unsafe extern "C" fn younglink_attack_hi4_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 33, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.0, 95, 100, 23, 0, 3.2, 0.0, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 4.0, 149, 100, 23, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 4.0, 105, 100, 48, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 6.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 33, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.0, 95, 100, 23, 0, 3.2, 0.0, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 4.0, 149, 100, 23, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 4.0, 105, 100, 48, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.8, 1.0, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.5, 5.6, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0, 100, 108, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 100, 108, 0, 75, 3.5, 0.0, 8.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.8, 1.0, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.5, 5.6, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0, 100, 108, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 100, 108, 0, 75, 3.5, 0.0, 8.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 31.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 50.0); - FT_MOTION_RATE_RANGE(fighter, 50.0, 60.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 50.0, 60.0, 7.0); frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); } frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 40.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn younglink_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -167,79 +165,79 @@ unsafe extern "C" fn younglink_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn younglink_attack_hi4_expression(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_attackhi4(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); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 37.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn younglink_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 30, 95, 0, 30, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 30, 95, 0, 30, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 30, 95, 0, 25, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 30, 95, 0, 25, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attacks4", younglink_attack_s4_s_game) - .acmd("expression_attacks4", younglink_attack_s4_s_expression) - .acmd("expression_attacks4charge", younglink_attack_s4_charge_expression) - .acmd("game_attackhi4", younglink_attack_hi4_game) - .acmd("effect_attackhi4", younglink_attack_hi4_effect) - .acmd("sound_attackhi4", younglink_attack_hi4_sound) - .acmd("expression_attackhi4", younglink_attack_hi4_expression) - .acmd("game_attacklw4", younglink_attack_lw4_game) - .acmd("sound_attacks4", sound_attacks4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("expression_attacks4charge", expression_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/younglink/src/acmd/specials.rs b/fighters/younglink/src/acmd/specials.rs index bab10b2871..61ad1ad3bc 100644 --- a/fighters/younglink/src/acmd/specials.rs +++ b/fighters/younglink/src/acmd/specials.rs @@ -1,157 +1,127 @@ - use super::*; -unsafe extern "C" fn younglink_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.54/(5.0-1.0)); + FT_MOTION_RATE(agent, 1.54/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, false, 0); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.54/(5.0-1.0)); + FT_MOTION_RATE(agent, 1.54/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG) { ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, false, 0); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } - } -unsafe extern "C" fn younglink_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 2.2, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 5.7, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 1.0, 173, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 80, 100, 10, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 2.2, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 5.7, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 1.0, 173, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 80, 100, 10, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 85, 0, 90, 4.0, 0.0, 7.0, -11.0, Some(0.0), Some(4.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 85, 0, 90, 4.0, 0.0, 7.0, -11.0, Some(0.0), Some(4.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 66.0); - FT_MOTION_RATE(fighter, 9.0/(70.0-66.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 9.0/(70.0-66.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 66.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } - } -unsafe extern "C" fn younglink_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - if VarModule::get_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 1); + if VarModule::get_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { + VarModule::set_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 1); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_BOMBCHU), 0, 0, false, false); - } - else { + } else { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); } - } - else { + } else { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); } } - } -unsafe extern "C" fn younglink_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - if VarModule::get_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 1); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_BOMBCHU), 0, 0, false, false); - } - else { - WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); - } - } - else { - WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); - } - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_specials1", younglink_special_s1_game) - .acmd("game_specialairs1", younglink_special_air_s1_game) - .acmd("game_specialhi", younglink_special_hi_game) - .acmd("game_specialairhi", younglink_special_air_hi_game) - .acmd("game_speciallw", younglink_special_lw_game) - .acmd("game_specialairlw", younglink_special_air_lw_game) - .install(); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/younglink/src/acmd/throws.rs b/fighters/younglink/src/acmd/throws.rs index 3ae7d992af..a05ef349cf 100644 --- a/fighters/younglink/src/acmd/throws.rs +++ b/fighters/younglink/src/acmd/throws.rs @@ -1,116 +1,116 @@ use super::*; -unsafe extern "C" fn younglink_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 187, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 187, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 3.5, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - AttackModule::set_catch_only_all(fighter.module_accessor, true, false); - CHECK_FINISH_CAMERA(fighter, 21, 11); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 3.5, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, 21, 11); } frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn younglink_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 130, 105, 0, 35, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 130, 105, 0, 35, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 3.1, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 3.1, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -14, 11); + CHECK_FINISH_CAMERA(agent, -14, 11); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn younglink_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 21); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn younglink_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 2); - FT_LEAVE_NEAR_OTTOTTO(fighter, 2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 138, 68, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 2); + FT_LEAVE_NEAR_OTTOTTO(agent, 2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 138, 68, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 60, 5.5, 0.0, 3.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 60, 5.5, 0.0, 3.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_ELBOW); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_throwf", younglink_throw_f_game) - .acmd("game_throwb", younglink_throw_b_game) - .acmd("game_throwhi", younglink_throw_hi_game) - .acmd("game_throwlw", younglink_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/younglink/src/acmd/tilts.rs b/fighters/younglink/src/acmd/tilts.rs index c9090a965b..99760dd914 100644 --- a/fighters/younglink/src/acmd/tilts.rs +++ b/fighters/younglink/src/acmd/tilts.rs @@ -1,67 +1,63 @@ - use super::*; -unsafe extern "C" fn younglink_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 361, 88, 0, 30, 3.5, 1.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.0, 361, 88, 0, 30, 3.5, 6.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 88, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 361, 88, 0, 30, 3.5, 1.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.0, 361, 88, 0, 30, 3.5, 6.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 88, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn younglink_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 40, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 8.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 9.0, 276, 85, 0, 45, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 9.0, 276, 60, 0, 30, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.0, 85, 90, 0, 50, 3.5, 1.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 85, 88, 0, 50, 3.5, 6.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("bust"), 8.0, 85, 86, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - wait(lua_state, 3.0); - if is_excute(fighter) { + wait(lua_state, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 11.0);{ - FT_MOTION_RATE(fighter, 3.0); -} - frame(lua_state, 13.0);{ -FT_MOTION_RATE(fighter, 1.0); -} } -unsafe extern "C" fn younglink_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.0, 85, 90, 0, 50, 3.5, 1.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 85, 88, 0, 50, 3.5, 6.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 85, 86, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 40, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 8.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 9.0, 276, 85, 0, 45, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 9.0, 276, 60, 0, 30, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } - wait(lua_state, 6.0); - if is_excute(fighter) { + wait(lua_state, 3.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 3.0); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attacks3", younglink_attack_s3_s_game) - .acmd("game_attacklw3", younglink_attack_lw3_game) - .acmd("game_attackhi3", younglink_attack_hi3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/younglink/src/boomerang/acmd.rs b/fighters/younglink/src/boomerang/acmd.rs new file mode 100644 index 0000000000..bbfba28242 --- /dev/null +++ b/fighters/younglink/src/boomerang/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.8, 75, 30, 0, 75, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 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_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 30, 0, 55, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3.5, 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_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/younglink/src/boomerang/mod.rs b/fighters/younglink/src/boomerang/mod.rs new file mode 100644 index 0000000000..b9458f01fb --- /dev/null +++ b/fighters/younglink/src/boomerang/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("younglink_boomerang"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/younglink/src/lib.rs b/fighters/younglink/src/lib.rs index 8e2ddcc726..a41ccb2176 100644 --- a/fighters/younglink/src/lib.rs +++ b/fighters/younglink/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod boomerang; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("younglink"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + boomerang::install(); } diff --git a/fighters/younglink/src/opff.rs b/fighters/younglink/src/opff.rs index 9e08cafeff..e0dc656f53 100644 --- a/fighters/younglink/src/opff.rs +++ b/fighters/younglink/src/opff.rs @@ -66,6 +66,7 @@ unsafe fn sword_length(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo let long_sword_scale = Vector3f{x: 1.0, y: 1.1, z: 1.0}; ModelModule::set_joint_scale(boma, smash::phx::Hash40::new("sword"), &long_sword_scale); } + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -128,8 +129,6 @@ pub unsafe fn younglink_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("younglink") - .on_line(Main, younglink_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, younglink_frame_wrapper); } diff --git a/fighters/younglink/src/status/attack_s4.rs b/fighters/younglink/src/status/attack_s4.rs new file mode 100644 index 0000000000..7b798a6528 --- /dev/null +++ b/fighters/younglink/src/status/attack_s4.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4 + +// override vanilla shield visibility on forward smash +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_AttackS4() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); +} diff --git a/fighters/younglink/src/status/mod.rs b/fighters/younglink/src/status/mod.rs new file mode 100644 index 0000000000..35d8b31153 --- /dev/null +++ b/fighters/younglink/src/status/mod.rs @@ -0,0 +1,11 @@ +use super::*; +use globals::*; +// status script import + +mod attack_s4; +mod special_hi; + +pub fn install(agent: &mut Agent) { + attack_s4::install(agent); + special_hi::install(agent); +} diff --git a/fighters/younglink/src/status.rs b/fighters/younglink/src/status/special_hi.rs similarity index 89% rename from fighters/younglink/src/status.rs rename to fighters/younglink/src/status/special_hi.rs index f6ea59d676..9cb2cf0de9 100644 --- a/fighters/younglink/src/status.rs +++ b/fighters/younglink/src/status/special_hi.rs @@ -1,10 +1,8 @@ use super::*; -use globals::*; - -// FIGHTER_STATUS_KIND_SPECIAL_HI // +// FIGHTER_STATUS_KIND_SPECIAL_HI -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); @@ -61,7 +59,7 @@ unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2 return 0.into() } -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; StatusModule::init_settings( fighter.module_accessor, @@ -90,7 +88,7 @@ pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { @@ -106,10 +104,10 @@ pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CVal WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); } - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) } -unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_x = fighter.global_table[STICK_X].get_f32(); let frame = MotionModule::frame(fighter.module_accessor); let mut motion_value = 0.55; @@ -219,28 +217,9 @@ unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L return 0.into() } -// override vanilla shield visibility on forward smash -unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_AttackS4() -} +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); -pub fn install() { - smashline::Agent::new("younglink") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status( - Pre, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - pre_specialhi_end, - ) - .status( - Main, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - specialhi_end, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4, - attack_s4_main, - ) - .install(); + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); } diff --git a/fighters/zelda/src/acmd/aerials.rs b/fighters/zelda/src/acmd/aerials.rs index 4450ca76ae..2b606dcfeb 100644 --- a/fighters/zelda/src/acmd/aerials.rs +++ b/fighters/zelda/src/acmd/aerials.rs @@ -1,26 +1,25 @@ - use super::*; -unsafe extern "C" fn zelda_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); for _ in 0..4 { - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("waist"), 2.0, 366, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("head"), 2.0, 366, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("waist"), 2.0, 366, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("head"), 2.0, 366, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("armr"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 0, Hash40::new("waist"), 2.0, 80, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 7, 0, Hash40::new("head"), 2.0, 80, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("armr"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("arml"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 0, Hash40::new("waist"), 2.0, 80, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 7, 0, Hash40::new("head"), 2.0, 80, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); @@ -31,267 +30,265 @@ unsafe extern "C" fn zelda_attack_air_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 7, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 9.0, 8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 13.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("head"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 9.0, 8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 13.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("head"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 89, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 89, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("toel"), 18.0, 361, 111, 0, 30, 1.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 9.0, 361, 89, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 89, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 89, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("toel"), 18.0, 361, 111, 0, 30, 1.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("toel"), 9.0, 361, 89, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new_raw(0x148397b09f)); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 38, 100, 0, 25, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 38, 100, 0, 25, 3.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 8.0, 38, 100, 0, 25, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 38, 100, 0, 25, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 38, 100, 0, 25, 3.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("toel"), 8.0, 38, 100, 0, 25, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 37.0, 22.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 37.0, 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 4, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_flash"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 4, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_flash"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_status_defense_up"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("toel"), 0.0, 0.0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("toel"), 0.0, 0.0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn zelda_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(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_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 17.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 103, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 10, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 15.0, 361, 103, 0, 24, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 17.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 103, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 10, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toer"), 15.0, 361, 103, 0, 24, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new_raw(0x1484fa7486)); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5, 55, 50, 0, 65, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.5, 55, 50, 0, 65, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 7.5, 55, 50, 0, 65, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5, 55, 50, 0, 65, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.5, 55, 50, 0, 65, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toer"), 7.5, 55, 50, 0, 65, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 39.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 39.0, 14.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); //let mut handle: u32 = 0; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("toer"), 0.0, 0.0, -2.0, 0, 0, 0, 1.15, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("toer"), 0.0, 0.0, -2.0, 0, 0, 0, 1.15, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 5.7, -1, 0, 180, 180, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_flash"), Hash40::new("toer"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 5.7, -1, 0, 180, 180, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_flash"), Hash40::new("toer"), 0, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn zelda_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackll") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_1); - //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackm") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_2); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //WorkModule::set_int64(boma, hash40("rbkind_attackll") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_1); + //WorkModule::set_int64(boma, hash40("rbkind_attackm") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_2); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 0); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 1); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackll"), 0, 2); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackll"), 0, 2); sv_animcmd::RUMBLE_HIT(lua_state); } wait(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn zelda_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 3.0, 90, 30, 0, 85, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 3.0, 90, 30, 0, 85, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 90, 70, 0, 55, 5.0, 0.0, 23.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 90, 68, 0, 55, 9.0, 0.0, 26.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 90, 70, 0, 55, 5.0, 0.0, 23.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 90, 68, 0, 55, 9.0, 0.0, 26.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("footl"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 275, 85, 0, 10, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 275, 80, 0, 0, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 275, 85, 0, 10, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 275, 80, 0, 0, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE_RANGE(fighter, 25.0, 45.0, 15.0); + FT_MOTION_RATE_RANGE(agent, 25.0, 45.0, 15.0); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn zelda_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -1, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -1, 0, 0, 0, 0, 0.8, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, 90, 0, 1, true); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, -90, 0, 1, true); } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("footl"), 3.0, 1.0, -1.0, 0, 0, 0, 1.2, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("footl"), 3.0, 1.0, -1.0, 0, 0, 0, 1.2, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_lw_line"), Hash40::new("top"), -0.5, 15.0, 0, 90, 0, 0, 1.1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_lw_line"), Hash40::new("top"), -0.5, 15.0, 0, 90, 0, 0, 1.1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attackairn", zelda_attack_air_n_game) - .acmd("game_attackairf", zelda_attack_air_f_game) - .acmd("effect_attackairf", zelda_attack_air_f_effect) - .acmd("game_attackairb", zelda_attack_air_b_game) - .acmd("effect_attackairb", zelda_attack_air_b_effect) - .acmd("expression_attackairb", zelda_attack_air_b_expression) - .acmd("game_attackairhi", zelda_attack_air_hi_game) - .acmd("game_attackairlw", zelda_attack_air_lw_game) - .acmd("effect_attackairlw", zelda_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/zelda/src/acmd/ground.rs b/fighters/zelda/src/acmd/ground.rs index 65f600f852..2d1559b554 100644 --- a/fighters/zelda/src/acmd/ground.rs +++ b/fighters/zelda/src/acmd/ground.rs @@ -1,127 +1,123 @@ - use super::*; -unsafe extern "C" fn zelda_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 35, 0, 25, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 30, 0, 25, 3.0, 0.0, 12.0, 8.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 361, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 35, 0, 25, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 30, 0, 25, 3.0, 0.0, 12.0, 8.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 361, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 25, 2.5, 0.0, 5.5, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 25, 2.5, 0.0, 5.5, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 5.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 5.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 25, 0, 40, 2.5, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(8.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 25, 0, 40, 2.5, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(8.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 6.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 180, 40, 0, 20, 4.0, 0.0, 11.5, 14.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 6.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 180, 40, 0, 20, 4.0, 0.0, 11.5, 14.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.2); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.2); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn zelda_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - 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); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 5.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 5.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 8.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 8.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 15, 11.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 15, 11.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn zelda_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 13.0, 80, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 13.0, 80, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 83, 72, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 83, 72, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 10, 8, 0, 0, 0, 0.6, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 10, 8, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1.2, true); } frame(lua_state, 24.0); - 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); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attack11", zelda_attack_11_game) - .acmd("effect_attack11", zelda_attack_11_effect) - .acmd("game_attackdash", zelda_attack_dash_game) - .acmd("effect_attackdash", zelda_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/zelda/src/acmd/mod.rs b/fighters/zelda/src/acmd/mod.rs index 636eb505dd..d8a22387b4 100644 --- a/fighters/zelda/src/acmd/mod.rs +++ b/fighters/zelda/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + ground::install(agent); + tilts::install(agent); + smashes::install(agent); + aerials::install(agent); + specials::install(agent); + throws::install(agent); + other::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/acmd/other.rs b/fighters/zelda/src/acmd/other.rs index 7a43323928..b1cc7f0742 100644 --- a/fighters/zelda/src/acmd/other.rs +++ b/fighters/zelda/src/acmd/other.rs @@ -1,881 +1,109 @@ - 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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_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(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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(boma) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_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_zelda_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_zelda_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, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_zelda_step_left_l"), Hash40::new("se_zelda_step_right_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_zelda_step_left_l"), Hash40::new("se_zelda_step_right_l")); } } -unsafe extern "C" fn zelda_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, 16.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 zelda_dein_move_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"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } -} - -unsafe extern "C" fn zelda_dein_tame_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_bullet_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - // Generate and store effects - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.6, false, 0, 0, 0, 0, 0, false, false); - let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle); - } - } - for h in 21..=146 { - if is_excute(fighter) { - let start_color = Vector3f { x: 1.0, y: 1.0, z: 1.0 }; - let end_color = Vector3f { x: 0.885, y: 0.051, z: 0.051 }; - // Smoothly interpolate from starting to ending color - let blend_vector = Vector3f { - x: start_color.x + ((end_color.x - start_color.x) * ((h as f32) / 146.0)), - y: start_color.y + ((end_color.y - start_color.y) * ((h as f32) / 146.0)), - z: start_color.z + ((end_color.z - start_color.z) * ((h as f32) / 146.0)) - }; - //println!("blend: {}, {}, {}", blend_vector.x, blend_vector.y, blend_vector.z); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH); - let fire_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE); - // Spawn (and store) new effects at certain frame intervals - if [50, 80, 112, 146].contains(&h) { - //println!("aha! h is {}", h); - let tame_size = fighter.get_float(*WEAPON_ZELDA_DEIN_STATUS_WORK_FLOAT_COUNT); - let flash_size = if h == 50 { 1.0 + 0.003 * tame_size } else if h == 80 { 1.0 + 0.0135 * tame_size } else if h == 112 { 1.0 + 0.0165 * tame_size } else { 1.0 + 0.021 * tame_size }; - let fire_size = if h == 146 { 0.8 + 0.0037 * tame_size } else { 0.8 + 0.024 * tame_size }; - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), flash_size, false, 0, 0, 0, 0, 0, false, false); - let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), fire_size, false, 0, 0, 0, 0, 0, false, false); - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle as u64); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle as u64); - } - else { - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - } - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn zelda_phantom_build_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let pos = Vector3f { x: pos_x + 35.2 * (1.0*PostureModule::lr(boma)) , y: pos_y, z: 0.0 }; - PostureModule::set_pos(boma, &pos); - VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - } - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 180.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } -} - -unsafe extern "C" fn zelda_phantom_build_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = EffectModule::req_follow(boma, Hash40::new("zelda_entry"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::new(0.0, 150.0, 0.0), 0.75, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER, handle); - } - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 1.0); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), -2, -1, 0, 0, 0, 90, 1.8, true); - } -} - -unsafe extern "C" fn zelda_phantom_attack_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 4.5; - frame(lua_state, 0.0); - FT_MOTION_RATE(fighter, 6.0/(5.0-0.0)); - if is_excute(fighter) { - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 50, 5.5, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 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_KICK, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn zelda_phantom_attack_kick_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 33.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 12, 0, 180, 0, 0.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - } - frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 7, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - } -} - -unsafe extern "C" fn zelda_phantom_attack_punch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 5.0; - frame(lua_state, 0.0); - FT_MOTION_RATE(fighter, 2.0/(0.5-0.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 60, 0, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 6.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 0.5); - FT_MOTION_RATE(fighter, 1.0/(1.0-0.5)); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 5.5, 0.0, 10.0, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 4.5, 0.0, 9.5, 19.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_PUNCH, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn zelda_phantom_attack_punch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 57.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 4, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - } -} - -unsafe extern "C" fn zelda_phantom_attack_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 5.5; - frame(lua_state, 0.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 5.0/(3.0-0.0)); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 5.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 87, 40, 0, 100, 6.5, 0.0, 8.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.885, 0.051, 0.051); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - //EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_build"), false, true); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); - } - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 6, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); - - //EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 4, -3, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - } -} - -unsafe extern "C" fn zelda_phantom_attack_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 6.0; - frame(lua_state, 0.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 20.0/3.0); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 110, 0, 5.5, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - // Air-only - ATTACK(fighter, 0, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 57, 0, 60, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 270, 40, 0, 120, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_l_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 50.0); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1, true); - - /* - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - */ - - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); - } - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 16, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("null"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.7); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_sword_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_sword"), true, true); - } - frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_body_aura"), false, true); - } - frame(lua_state, 74.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn zelda_phantom_attack_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 7.0; - frame(lua_state, 0.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(3.0-0.0)); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 130, 0, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 6, 100, 85, 0, 8.5, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 0.0, 1.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 1.0, 9.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 2.0, 16.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 11.0, 46, 90, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_atk_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), 0, 0, 0, 0, 0, 90, 2, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_phantom_start"), Hash40::new("trans"), 0, 3, 0, -90, 0, 0, 1, true); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -7, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -7, 0, 0, 0, 1, true); - } - - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_hi_flash"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 2.0, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 9, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 7, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - } - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 8); - } - frame(lua_state, 119.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("zelda_phantom_body_aura"), 32); - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn zelda_phantom_cancel_game(fighter: &mut L2CAgentBase) { - let owner_id = WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - frame(fighter.lua_state_agent, 1.0); - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 99.0); - } - frame(fighter.lua_state_agent, 30.0);//100 - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - FT_MOTION_RATE_RANGE(fighter, 30.0, 90.0, 320.0); //8 seconds - VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - } -} - -unsafe extern "C" fn zelda_phantom_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_phantom_hit"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_end2"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.3, false); - } - frame(lua_state, 89.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 2, 0, 0, 0, 0, 1.18, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 1.5, 0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - fighter.on_flag(*WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_FLAG_END); - } } -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("zelda_phantom") - .acmd("game_build", zelda_phantom_build_game) - .acmd("effect_build", zelda_phantom_build_effect) - .acmd("game_attackkick", zelda_phantom_attack_kick_game) - .acmd("effect_attackkick", zelda_phantom_attack_kick_effect) - .acmd("game_attackpunch", zelda_phantom_attack_punch_game) - .acmd("effect_attackpunch", zelda_phantom_attack_punch_effect) - .acmd("game_attacks", zelda_phantom_attack_s_game) - .acmd("effect_attacks", zelda_phantom_attack_s_effect) - .acmd("game_attackl", zelda_phantom_attack_l_game) - .acmd("effect_attackl", zelda_phantom_attack_l_effect) - .acmd("game_attackmax", zelda_phantom_attack_max_game) - .acmd("effect_attackmax", zelda_phantom_attack_max_effect) - .acmd("game_cancel", zelda_phantom_cancel_game) - .acmd("effect_cancel", zelda_phantom_cancel_effect) - .install(); - smashline::Agent::new("zelda_dein_s") - .acmd("game_move", zelda_dein_move_game) - .install(); - smashline::Agent::new("zelda_dein") - .acmd("effect_tame", zelda_dein_tame_effect) - .install(); - smashline::Agent::new("zelda") - .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", zelda_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_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); } diff --git a/fighters/zelda/src/acmd/smashes.rs b/fighters/zelda/src/acmd/smashes.rs index 292ffd40d6..27d7e00805 100644 --- a/fighters/zelda/src/acmd/smashes.rs +++ b/fighters/zelda/src/acmd/smashes.rs @@ -1,156 +1,153 @@ - use super::*; -unsafe extern "C" fn zelda_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 5.333); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 5.333); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 350, 100, 40, 0, 4.2, 0.0, 9.1, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 185, 100, 50, 0, 4.5, 0.0, 9.1, 17.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 350, 100, 40, 0, 4.2, 0.0, 9.1, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 185, 100, 50, 0, 4.5, 0.0, 9.1, 17.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 5.5, 0.0, 9.1, 10.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 6.0, 0.0, 9.1, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 5.5, 0.0, 9.1, 10.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 6.0, 0.0, 9.1, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(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) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 0.8, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 0.8, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 7.0, 0.0, 22.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 8.0, 0.0, 15.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 7.0, 0.0, 22.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 8.0, 0.0, 15.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_trace_l"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_trace_l"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_trace_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_trace_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_flash"), Hash40::new("havel"), 0, 0, 0, -0.0, 0.0, 0.0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_flash"), Hash40::new("havel"), 0, 0, 0, -0.0, 0.0, 0.0, 1, true); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 19.5, -2.5, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 19.5, -2.5, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn zelda_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(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_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 20, 96, 0, 20, 4.2, 0.0, 3.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 96, 0, 20, 3.0, 0.0, 3.0, 11.0, Some(0.0), Some(5.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 20, 96, 0, 20, 4.2, 0.0, 3.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 96, 0, 20, 3.0, 0.0, 3.0, 11.0, Some(0.0), Some(5.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 20, 104, 0, 20, 4.2, 0.0, 3.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 20, 3.0, 0.0, 3.0, -9.0, Some(0.0), Some(7.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 20, 104, 0, 20, 4.2, 0.0, 3.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 20, 3.0, 0.0, 3.0, -9.0, Some(0.0), Some(7.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *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_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attacks4", zelda_attack_s4_s_game) - .acmd("game_attackhi4", zelda_attack_hi4_game) - .acmd("effect_attackhi4", zelda_attack_hi4_effect) - .acmd("game_attacklw4", zelda_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/zelda/src/acmd/specials.rs b/fighters/zelda/src/acmd/specials.rs index 859012be90..fa986aa3a3 100644 --- a/fighters/zelda/src/acmd/specials.rs +++ b/fighters/zelda/src/acmd/specials.rs @@ -1,272 +1,271 @@ - use super::*; -unsafe extern "C" fn zelda_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.444); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); + FT_MOTION_RATE(agent, 0.444); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 160, 40, 0, 12, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 160, 40, 0, 12, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 160, 40, 0, 12, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 160, 40, 0, 12, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 50, 7.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(4.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 50, 7.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(4.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); } } -unsafe extern "C" fn zelda_special_n_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.444); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); + FT_MOTION_RATE(agent, 0.444); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 77, 80, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 77, 80, 0, 40, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 77, 80, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 77, 80, 0, 40, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 60, 100, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 100, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); } } -unsafe extern "C" fn zelda_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_S_FLAG_1); - //VarModule::on_flag(fighter.battle_object, vars::zelda::instance::DEIN_ACTIVE); + //VarModule::on_flag(agent.battle_object, vars::zelda::instance::DEIN_ACTIVE); } } -unsafe extern "C" fn zelda_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn zelda_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 30, 0, 125, 9.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 30, 0, 125, 9.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 85, 0, 60, 10.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 85, 0, 60, 10.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 9.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); AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(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) { JostleModule::set_status(boma, true); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 13.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 13.0); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 10.0, 361, 89, 0, 80, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 7.0, 361, 87, 0, 60, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.75); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 10.0, 361, 89, 0, 80, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 361, 87, 0, 60, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.75); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); //f4 - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 29.0/(34.0 - 11.0)); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 29.0/(34.0 - 11.0)); } } -unsafe extern "C" fn zelda_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(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) { JostleModule::set_status(boma, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 2.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 12.0, 55, 93, 0, 80, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 8.0, 55, 85, 0, 60, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.75); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 12.0, 55, 93, 0, 80, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("rot"), 8.0, 55, 85, 0, 60, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.75); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_1); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_DIVE); WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_CONTROL); } - } -unsafe extern "C" fn zelda_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_teleport"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0.0, 10.0, -5.0, 0, 0, 0, 1.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 3.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_teleport"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0.0, 10.0, -5.0, 0, 0, 0, 1.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 3.0, 1.0); } else { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); } } EffectModule::set_disable_render_offset_last(boma); EffectModule::enable_sync_init_pos_last(boma); - FLASH(fighter, 0.62, 0.94, 0.9, 0.6); + FLASH(agent, 0.62, 0.94, 0.9, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 0.33, 0.83, 0.9, 0.2); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if is_excute(agent) { + FLASH(agent, 0.33, 0.83, 0.9, 0.2); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.6, 1, 1, 0.5); + if is_excute(agent) { + FLASH(agent, 0.6, 1, 1, 0.5); } wait(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0.33, 0.83, 0.9, 0.2); + if is_excute(agent) { + FLASH(agent, 0.33, 0.83, 0.9, 0.2); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new_raw(0x109837f34d), false, false); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new_raw(0x109837f34d), false, false); } } -unsafe extern "C" fn zelda_special_hi_land_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.5); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_specialn", zelda_special_n_game) - .acmd("game_specialairn", zelda_special_n_air_game) - .acmd("game_specialsstart", zelda_special_s_start_game) - .acmd("game_specialairsstart", zelda_special_s_start_game) - .acmd("effect_specialsend", zelda_special_s_end_effect) - .acmd("effect_specialairsend", zelda_special_s_end_effect) - .acmd("game_specialhistart", zelda_special_hi_start_game) - .acmd("game_specialairhistart", zelda_special_air_hi_start_game) - .acmd("game_specialhi", zelda_special_hi_game) - .acmd("game_specialairhi", zelda_special_air_hi_game) - .acmd("effect_specialhi", zelda_special_air_hi_effect) - .acmd("effect_specialairhi", zelda_special_air_hi_effect) - .acmd("game_landingfallspecial", zelda_special_hi_land_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + + agent.acmd("game_landingfallspecial", game_landingfallspecial); } diff --git a/fighters/zelda/src/acmd/throws.rs b/fighters/zelda/src/acmd/throws.rs index c316ae867b..47d8756eba 100644 --- a/fighters/zelda/src/acmd/throws.rs +++ b/fighters/zelda/src/acmd/throws.rs @@ -1,90 +1,89 @@ use super::*; -unsafe extern "C" fn zelda_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 zelda_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(12.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(12.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 zelda_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 9.0, -4.0, Some(0.0), Some(9.0), Some(-18.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 9.0, -4.0, Some(0.0), Some(9.0), Some(-18.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + 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 zelda_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 4); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 4); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn zelda_throw_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -104,59 +103,58 @@ unsafe extern "C" fn zelda_throw_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn zelda_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 26.0, 29.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 95, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 26.0, 29.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 95, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 7); + CHECK_FINISH_CAMERA(agent, 11, 7); } frame(lua_state, 27.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn zelda_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 87, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 87, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 25); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 25); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_catch", zelda_catch_game) - .acmd("game_catchdash", zelda_catch_dash_game) - .acmd("game_catchturn", zelda_catch_turn_game) - .acmd("game_throwf", zelda_throw_f_game) - .acmd("effect_throwf", zelda_throw_f_effect) - .acmd("game_throwb", zelda_throw_b_game) - .acmd("game_throwhi", zelda_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/zelda/src/acmd/tilts.rs b/fighters/zelda/src/acmd/tilts.rs index 508b6851af..ce4478f93f 100644 --- a/fighters/zelda/src/acmd/tilts.rs +++ b/fighters/zelda/src/acmd/tilts.rs @@ -1,299 +1,244 @@ - use super::*; -unsafe extern "C" fn zelda_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 145, 42, 0, 75, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 110, 52, 0, 80, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 12, 0, -20, 0, 8, 1.05, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 11.3, 0, 3, 0, 5, 1.05, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 110, 52, 0, 80, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - } - wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { - AttackModule::clear_all(boma); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } -} - -unsafe extern "C" fn zelda_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 11.3, 0, 3, 0, 5, 1.05, true, *EF_FLIP_YZ); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn zelda_attack_s3_s_expression(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_attacks3(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); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn zelda_attack_s3_hi_expression(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); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 145, 42, 0, 75, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + wait(lua_state, 4.0); + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { + AttackModule::clear_all(boma); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_lw_expression(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); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 12, 0, -20, 0, 8, 1.05, true, *EF_FLIP_YZ); } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(lua_state, 14.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 130, 52, 0, 60, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 4.0, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 130, 52, 0, 60, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 4.0, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 9, 0, 22, 0, 3, 1.05, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 9, 0, 22, 0, 3, 1.05, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.5, 100, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.5, 100, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn zelda_attack_hi3_expression(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 effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_hi_flash"), Hash40::new("armr"), 4.5, 0, 0, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn expression_attackhi3(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); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn zelda_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - 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); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_hi_flash"), Hash40::new("armr"), 4.5, 0, 0, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn zelda_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 90, 60, 0, 60, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 270, 65, 0, 80, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *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_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 90, 60, 0, 60, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 270, 65, 0, 80, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -1, 4.6, -6, 14, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -1, 4.6, -6, 14, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 2.0, 3.0, 12.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 2.0, 3.0, 12.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attacks3hi", zelda_attack_s3_hi_game) - .acmd("effect_attacks3hi", zelda_attack_s3_hi_effect) - .acmd("game_attacks3", zelda_attack_s3_s_game) - .acmd("effect_attacks3", zelda_attack_s3_s_effect) - .acmd("expression_attacks3", zelda_attack_s3_s_expression) - .acmd("expression_attacks3hi", zelda_attack_s3_hi_expression) - .acmd("expression_attacks3lw", zelda_attack_s3_lw_expression) - .acmd("game_attacks3lw", zelda_attack_s3_lw_game) - .acmd("effect_attacks3lw", zelda_attack_s3_lw_effect) - .acmd("game_attackhi3", zelda_attack_hi3_game) - .acmd("expression_attackhi3", zelda_attack_hi3_expression) - .acmd("effect_attackhi3", zelda_attack_hi3_effect) - .acmd("game_attacklw3", zelda_attack_lw3_game) - .acmd("effect_attacklw3", zelda_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/zelda/src/dein/acmd.rs b/fighters/zelda/src/dein/acmd.rs new file mode 100644 index 0000000000..433fc0a812 --- /dev/null +++ b/fighters/zelda/src/dein/acmd.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn effect_tame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_bullet_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + frame(lua_state, 20.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + // Generate and store effects + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.6, false, 0, 0, 0, 0, 0, false, false); + let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle); + } + } + for h in 21..=146 { + if is_excute(agent) { + let start_color = Vector3f { x: 1.0, y: 1.0, z: 1.0 }; + let end_color = Vector3f { x: 0.885, y: 0.051, z: 0.051 }; + // Smoothly interpolate from starting to ending color + let blend_vector = Vector3f { + x: start_color.x + ((end_color.x - start_color.x) * ((h as f32) / 146.0)), + y: start_color.y + ((end_color.y - start_color.y) * ((h as f32) / 146.0)), + z: start_color.z + ((end_color.z - start_color.z) * ((h as f32) / 146.0)) + }; + //println!("blend: {}, {}, {}", blend_vector.x, blend_vector.y, blend_vector.z); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH); + let fire_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE); + // Spawn (and store) new effects at certain frame intervals + if [50, 80, 112, 146].contains(&h) { + //println!("aha! h is {}", h); + let tame_size = agent.get_float(*WEAPON_ZELDA_DEIN_STATUS_WORK_FLOAT_COUNT); + let flash_size = if h == 50 { 1.0 + 0.003 * tame_size } else if h == 80 { 1.0 + 0.0135 * tame_size } else if h == 112 { 1.0 + 0.0165 * tame_size } else { 1.0 + 0.021 * tame_size }; + let fire_size = if h == 146 { 0.8 + 0.0037 * tame_size } else { 0.8 + 0.024 * tame_size }; + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), flash_size, false, 0, 0, 0, 0, 0, false, false); + let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), fire_size, false, 0, 0, 0, 0, 0, false, false); + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle as u64); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle as u64); + } + else { + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + } + } + } + wait(lua_state, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_tame", effect_tame); +} diff --git a/fighters/zelda/src/dein/mod.rs b/fighters/zelda/src/dein/mod.rs new file mode 100644 index 0000000000..649c301c1e --- /dev/null +++ b/fighters/zelda/src/dein/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("zelda_dein"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/status/dein.rs b/fighters/zelda/src/dein/status.rs similarity index 77% rename from fighters/zelda/src/status/dein.rs rename to fighters/zelda/src/dein/status.rs index 3da394b541..dc34a7097a 100644 --- a/fighters/zelda/src/status/dein.rs +++ b/fighters/zelda/src/dein/status.rs @@ -9,8 +9,6 @@ unsafe extern "C" fn move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { smashline::original_status(Main, weapon, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE)(weapon) } -pub fn install() { - smashline::Agent::new("zelda_dein") - .status(Main, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE, move_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE, move_main); } diff --git a/fighters/zelda/src/dein_s/acmd.rs b/fighters/zelda/src/dein_s/acmd.rs new file mode 100644 index 0000000000..58e4fdb5e6 --- /dev/null +++ b/fighters/zelda/src/dein_s/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 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_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/zelda/src/dein_s/mod.rs b/fighters/zelda/src/dein_s/mod.rs new file mode 100644 index 0000000000..523b13aff2 --- /dev/null +++ b/fighters/zelda/src/dein_s/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("zelda_dein_s"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/lib.rs b/fighters/zelda/src/lib.rs index 8e2ddcc726..a883107ff6 100644 --- a/fighters/zelda/src/lib.rs +++ b/fighters/zelda/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod dein; +mod dein_s; +mod phantom; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("zelda"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + dein::install(); + dein_s::install(); + phantom::install(); } diff --git a/fighters/zelda/src/opff.rs b/fighters/zelda/src/opff.rs index d36a2608a2..c0ecaf5e0c 100644 --- a/fighters/zelda/src/opff.rs +++ b/fighters/zelda/src/opff.rs @@ -144,8 +144,7 @@ pub unsafe fn phantom_platdrop_effect(fighter:&mut smash::lua2cpp::L2CFighterCom VarModule::set_int(fighter.battle_object, vars::zelda::instance::EFF_COOLDOWN_HANDLER, -1); } //reapply } - - } +} unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() @@ -205,84 +204,6 @@ pub unsafe fn zelda_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub unsafe extern "C" fn phantom_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - GroundModule::correct(weapon.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - let zelda_boma = &mut *(*zelda).module_accessor; - //hitcheck - if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(zelda, vars::zelda::instance::PHANTOM_HIT); - } - if StopModule::is_stop(weapon.module_accessor) && !VarModule::is_flag(zelda, vars::zelda::instance::PHANTOM_HIT) { - VarModule::on_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - }//misc mechanics - if weapon.is_status(*WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD) { - let remaining_hitstun = WorkModule::get_float(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLOAT_DAMAGE_REACTION_FRAME); - if weapon.is_situation(*SITUATION_KIND_AIR) { - let through_passable_ground_stick_y= WorkModule::get_param_float(zelda_boma, hash40("common"), hash40("through_passable_ground_stick_y")) * -1.0; - if zelda_boma.stick_y() < through_passable_ground_stick_y { - GroundModule::set_passable_check(weapon.module_accessor, true); - } - else { - GroundModule::set_passable_check(weapon.module_accessor, false); - } - } - if zelda_boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_GUARD, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE_F, - *FIGHTER_STATUS_KIND_ESCAPE_B, - *FIGHTER_STATUS_KIND_ESCAPE_AIR, - *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_CATCH_DASH, - *FIGHTER_STATUS_KIND_CATCH_TURN, - *FIGHTER_STATUS_KIND_CATCH_PULL, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - *FIGHTER_STATUS_KIND_CATCH_ATTACK, - *FIGHTER_STATUS_KIND_CATCH_CUT, - *FIGHTER_STATUS_KIND_SHOULDERED_DONKEY, - *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, - *FIGHTER_STATUS_KIND_CATCHED_REFLET, - *FIGHTER_STATUS_KIND_CATCHED_GANON, - *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, - *FIGHTER_STATUS_KIND_CATCHED_CUT_GANON, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FALL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FALL, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_CHARGE, - *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_END, - *FIGHTER_STATUS_KIND_THROW - ]) - || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_AIR) - || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_GROUND) - || remaining_hitstun > 0.0 - { - return - } - - if AttackModule::is_infliction_status(zelda_boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) - && zelda_boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_force(weapon.module_accessor, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_ATTACK, false); - } - } -} - -pub fn install() { - smashline::Agent::new("zelda") - .on_line(Main, zelda_frame_wrapper) - .install(); - - smashline::Agent::new("zelda_phantom") - .on_line(Main, phantom_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, zelda_frame_wrapper); } diff --git a/fighters/zelda/src/phantom/acmd.rs b/fighters/zelda/src/phantom/acmd.rs new file mode 100644 index 0000000000..d67a525827 --- /dev/null +++ b/fighters/zelda/src/phantom/acmd.rs @@ -0,0 +1,619 @@ +use super::*; + +unsafe extern "C" fn game_build(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let pos = Vector3f { x: pos_x + 35.2 * (1.0*PostureModule::lr(boma)) , y: pos_y, z: 0.0 }; + PostureModule::set_pos(boma, &pos); + VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + } + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 19.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 29.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 31.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 37.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 44.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 180.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } +} + +unsafe extern "C" fn effect_build(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = EffectModule::req_follow(boma, Hash40::new("zelda_entry"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::new(0.0, 150.0, 0.0), 0.75, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER, handle); + } + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 1.0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), -2, -1, 0, 0, 0, 90, 1.8, true); + } +} + +unsafe extern "C" fn game_attackkick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 4.5; + frame(lua_state, 0.0); + FT_MOTION_RATE(agent, 6.0/(5.0-0.0)); + if is_excute(agent) { + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 50, 5.5, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 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_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackkick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 33.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 12, 0, 180, 0, 0.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 7, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + } +} + +unsafe extern "C" fn game_attackpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 5.0; + frame(lua_state, 0.0); + FT_MOTION_RATE(agent, 2.0/(0.5-0.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 60, 0, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 6.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 0.5); + FT_MOTION_RATE(agent, 1.0/(1.0-0.5)); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 5.5, 0.0, 10.0, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 4.5, 0.0, 9.5, 19.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 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_PUNCH, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 57.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 4, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + } +} + +unsafe extern "C" fn game_attacks(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 5.5; + frame(lua_state, 0.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 5.0/(3.0-0.0)); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 5.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 87, 40, 0, 100, 6.5, 0.0, 8.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 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_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacks(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.885, 0.051, 0.051); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + //EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_build"), false, true); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); + } + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 6, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); + + //EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + frame(lua_state, 7.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 30.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + } + frame(lua_state, 55.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 4, -3, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } +} + +unsafe extern "C" fn game_attackl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 6.0; + frame(lua_state, 0.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 20.0/3.0); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 110, 0, 5.5, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + // Air-only + ATTACK(agent, 0, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 57, 0, 60, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // Ground-only + ATTACK(agent, 3, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 270, 40, 0, 120, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 50.0); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1, true); + + /* + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + */ + + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); + } + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 16, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("null"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.7); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_sword_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 12.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_sword"), true, true); + } + frame(lua_state, 64.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_body_aura"), false, true); + } + frame(lua_state, 74.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn game_attackmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 7.0; + frame(lua_state, 0.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(3.0-0.0)); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 130, 0, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 6, 100, 85, 0, 8.5, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 0.0, 1.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 1.0, 9.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 2.0, 16.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 11.0, 46, 90, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 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_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_atk_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), 0, 0, 0, 0, 0, 90, 2, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_phantom_start"), Hash40::new("trans"), 0, 3, 0, -90, 0, 0, 1, true); + } + frame(lua_state, 2.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -7, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -7, 0, 0, 0, 1, true); + } + + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_hi_flash"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 2.0, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 9, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 7, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + } + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 8); + } + frame(lua_state, 119.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("zelda_phantom_body_aura"), 32); + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn game_cancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + frame(lua_state, 1.0); + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 99.0); + } + frame(lua_state, 30.0);//100 + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + FT_MOTION_RATE_RANGE(agent, 30.0, 90.0, 320.0); //8 seconds + VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + } +} + +unsafe extern "C" fn effect_cancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_phantom_hit"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_end2"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.3, false); + } + frame(lua_state, 89.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 2, 0, 0, 0, 0, 1.18, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 1.5, 0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + agent.on_flag(*WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_FLAG_END); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_build", game_build); + agent.acmd("effect_build", effect_build); + + agent.acmd("game_attackkick", game_attackkick); + agent.acmd("effect_attackkick", effect_attackkick); + + agent.acmd("game_attackpunch", game_attackpunch); + agent.acmd("effect_attackpunch", effect_attackpunch); + + agent.acmd("game_attacks", game_attacks); + agent.acmd("effect_attacks", effect_attacks); + + agent.acmd("game_attackl", game_attackl); + agent.acmd("effect_attackl", effect_attackl); + + agent.acmd("game_attackmax", game_attackmax); + agent.acmd("effect_attackmax", effect_attackmax); + + agent.acmd("game_cancel", game_cancel); + agent.acmd("effect_cancel", effect_cancel); +} diff --git a/fighters/zelda/src/phantom/mod.rs b/fighters/zelda/src/phantom/mod.rs new file mode 100644 index 0000000000..9da040a927 --- /dev/null +++ b/fighters/zelda/src/phantom/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("zelda_phantom"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/phantom/opff.rs b/fighters/zelda/src/phantom/opff.rs new file mode 100644 index 0000000000..c34cb0eba6 --- /dev/null +++ b/fighters/zelda/src/phantom/opff.rs @@ -0,0 +1,80 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn phantom_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + GroundModule::correct(weapon.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + let zelda_boma = &mut *(*zelda).module_accessor; + //hitcheck + if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { + VarModule::on_flag(zelda, vars::zelda::instance::PHANTOM_HIT); + } + if StopModule::is_stop(weapon.module_accessor) && !VarModule::is_flag(zelda, vars::zelda::instance::PHANTOM_HIT) { + VarModule::on_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + }//misc mechanics + if weapon.is_status(*WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD) { + let remaining_hitstun = WorkModule::get_float(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLOAT_DAMAGE_REACTION_FRAME); + if weapon.is_situation(*SITUATION_KIND_AIR) { + let through_passable_ground_stick_y= WorkModule::get_param_float(zelda_boma, hash40("common"), hash40("through_passable_ground_stick_y")) * -1.0; + if zelda_boma.stick_y() < through_passable_ground_stick_y { + GroundModule::set_passable_check(weapon.module_accessor, true); + } + else { + GroundModule::set_passable_check(weapon.module_accessor, false); + } + } + if zelda_boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_GUARD, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE_F, + *FIGHTER_STATUS_KIND_ESCAPE_B, + *FIGHTER_STATUS_KIND_ESCAPE_AIR, + *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_CATCH_DASH, + *FIGHTER_STATUS_KIND_CATCH_TURN, + *FIGHTER_STATUS_KIND_CATCH_PULL, + *FIGHTER_STATUS_KIND_CATCH_WAIT, + *FIGHTER_STATUS_KIND_CATCH_ATTACK, + *FIGHTER_STATUS_KIND_CATCH_CUT, + *FIGHTER_STATUS_KIND_SHOULDERED_DONKEY, + *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, + *FIGHTER_STATUS_KIND_CATCHED_REFLET, + *FIGHTER_STATUS_KIND_CATCHED_GANON, + *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, + *FIGHTER_STATUS_KIND_CATCHED_CUT_GANON, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FALL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FALL, + *FIGHTER_STATUS_KIND_SPECIAL_LW, + *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_CHARGE, + *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_END, + *FIGHTER_STATUS_KIND_THROW + ]) + || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_AIR) + || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_GROUND) + || remaining_hitstun > 0.0 + { + return + } + + if AttackModule::is_infliction_status(zelda_boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) + && zelda_boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_force(weapon.module_accessor, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_ATTACK, false); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, phantom_callback); +} diff --git a/fighters/zelda/src/status/phantom.rs b/fighters/zelda/src/phantom/status.rs similarity index 79% rename from fighters/zelda/src/status/phantom.rs rename to fighters/zelda/src/phantom/status.rs index 873b477e6f..86c44bccde 100644 --- a/fighters/zelda/src/status/phantom.rs +++ b/fighters/zelda/src/phantom/status.rs @@ -11,8 +11,6 @@ unsafe extern "C" fn build_main(weapon: &mut L2CWeaponCommon) -> L2CValue { ret } -pub fn install() { - smashline::Agent::new("zelda_phantom") - .status(Main, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD, build_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD, build_main); } diff --git a/fighters/zelda/src/status.rs b/fighters/zelda/src/status/mod.rs similarity index 79% rename from fighters/zelda/src/status.rs rename to fighters/zelda/src/status/mod.rs index a91fdf3dae..d0209c53b8 100644 --- a/fighters/zelda/src/status.rs +++ b/fighters/zelda/src/status/mod.rs @@ -1,9 +1,8 @@ -use smash::app::sv_battle_object::module_accessor; - use super::*; +use globals::*; +// status script import -mod dein; -mod phantom; +use smash::app::sv_battle_object::module_accessor; // Prevents side special from being used if a Din's Fire is present unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -35,17 +34,11 @@ unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommo } } -extern "C" fn zelda_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ZELDA { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("zelda").on_start(zelda_init).install(); - dein::install(); - phantom::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); } diff --git a/hdr-macros/Cargo.lock b/hdr-macros/Cargo.lock new file mode 100644 index 0000000000..6dcb0f56b1 --- /dev/null +++ b/hdr-macros/Cargo.lock @@ -0,0 +1,180 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + +[[package]] +name = "binrw" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab81d22cbd2d745852348b2138f3db2103afa8ce043117a374581926a523e267" +dependencies = [ + "array-init", + "binrw_derive", + "bytemuck", +] + +[[package]] +name = "binrw_derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b019a3efebe7f453612083202887b6f1ace59e20d010672e336eea4ed5be97" +dependencies = [ + "either", + "owo-colors", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "diff-struct" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30a0f0aafc8da0d598388b1897310646f45f47f17e31d581b4390f9dd88e826" +dependencies = [ + "diff_derive", + "serde", +] + +[[package]] +name = "diff_derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f9c37d395456d9c1785499421c6288931b6e3dbc2500acb95b8adaa0e69db3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "hash40" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c76fa4f247c50db43ae8b86975fc923ab9170b2cb242ce90231e0caca81352b5" +dependencies = [ + "bimap", + "binrw", + "byteorder", + "diff-struct", + "lazy_static", + "serde", +] + +[[package]] +name = "hdr-macros" +version = "0.1.0" +dependencies = [ + "hash40", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "proc-macro2" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/scripts/characters.py b/scripts/characters.py index 8c878020d9..255f457869 100644 --- a/scripts/characters.py +++ b/scripts/characters.py @@ -1,2 +1,2 @@ -characters = {"pitb","eflame","pfushigisou","purin","younglink","plizardon","shulk","chrom","miifighter","gamewatch","krool","samusd","ryu","rosetta","yoshi","lucas","link","lucario","zelda","kamui","wolf","nana","tantan","koopag","ridley","gekkouga","ike","roy","rockman","peach","elight","gaogaen","falco","ness","kirby","pikachu","daisy","sheik","mariod","luigi","captain","mario","jack","palutena","dolly","pickel","wiifit","pzenigame","pichu","pit","ken","brave","richter","miiswordsman","reflet","master","robot","szerosuit","ganon","wario","diddy","shizue","littlemac","pacman","edge","marth","trail","mewtwo","metaknight","toonlink","koopajr","sonic","donkey","inkling","packun","miigunner","buddy","pikmin","cloud","fox","duckhunt","lucina","murabito","bayonetta","samus","koopa","simon","popo","dedede","snake","demon"} +characters = {"pitb","eflame","pfushigisou","purin","younglink","plizardon","shulk","chrom","miifighter","gamewatch","krool","samusd","ryu","rosetta","yoshi","lucas","link","lucario","zelda","kamui","wolf","iceclimber","tantan","koopag","ridley","gekkouga","ike","roy","rockman","peach","elight","gaogaen","falco","ness","kirby","pikachu","daisy","sheik","mariod","luigi","captain","mario","jack","palutena","dolly","pickel","wiifit","pzenigame","pichu","pit","ken","brave","richter","miiswordsman","reflet","master","robot","szerosuit","ganon","wario","diddy","shizue","littlemac","pacman","edge","marth","trail","mewtwo","metaknight","toonlink","koopajr","sonic","donkey","inkling","packun","miigunner","buddy","pikmin","cloud","fox","duckhunt","lucina","murabito","bayonetta","samus","koopa","simon","dedede","snake","demon"} diff --git a/src/fighters.rs b/src/fighters.rs index 791302b7bb..5c7c062dea 100644 --- a/src/fighters.rs +++ b/src/fighters.rs @@ -37,6 +37,7 @@ pub fn install() { ganon = "ganon", gaogaen = "gaogaen", gekkouga = "gekkouga", + iceclimber = "iceclimber", ike = "ike", inkling = "inkling", jack = "jack", @@ -62,7 +63,6 @@ pub fn install() { miigunner = "miigunner", miiswordsman = "miiswordsman", murabito = "murabito", - nana = "nana", ness = "ness", packun = "packun", pacman = "pacman", @@ -76,7 +76,6 @@ pub fn install() { pit = "pit", pitb = "pitb", plizardon = "plizardon", - popo = "popo", purin = "purin", pzenigame = "pzenigame", reflet = "reflet",